themed lualine
This commit is contained in:
@@ -53,15 +53,37 @@ local cmp_mappings = lsp.defaults.cmp_mappings({
|
||||
cmp_mappings['<Tab>'] = nil
|
||||
cmp_mappings['<S-Tab>'] = nil
|
||||
|
||||
local lspkind = require('lspkind')
|
||||
|
||||
cmp.setup({
|
||||
sources = {
|
||||
{ name = 'path' },
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'lsp-zero' },
|
||||
{ name = 'nvim_lua' },
|
||||
{ name = 'luasnip', keyword_length = 2 },
|
||||
{ name = 'buffer', keyword_length = 3 },
|
||||
},
|
||||
formatting = lsp.cmp_format(),
|
||||
view = {
|
||||
entries = 'native',
|
||||
},
|
||||
completion = {
|
||||
completeopt = 'menu,menuone,noinsert'
|
||||
},
|
||||
window = {
|
||||
documentation = cmp.config.window.bordered()
|
||||
},
|
||||
formatting = {
|
||||
format = lspkind.cmp_format({
|
||||
mode = 'symbol_text',
|
||||
menu = ({
|
||||
buffer = '[Buffer]',
|
||||
nvim_lsp = '[LSP]',
|
||||
nvim_lua = '[Lua]',
|
||||
luasnip = '[LuaSnip]'
|
||||
})
|
||||
})
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
|
||||
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
|
||||
@@ -71,8 +93,9 @@ cmp.setup({
|
||||
['<S-Tab>'] = nil
|
||||
}),
|
||||
})
|
||||
|
||||
lsp.set_preferences({
|
||||
suggest_lsp_servers = false,
|
||||
suggest_lsp_servers = true,
|
||||
sign_icons = {
|
||||
error = 'E',
|
||||
warn = 'W',
|
||||
|
||||
@@ -1,11 +1,57 @@
|
||||
local theme = function()
|
||||
local colors = {
|
||||
darkgray = "#181825",
|
||||
gray = "#cdd6f4",
|
||||
innerbg = nil,
|
||||
outerbg = "#313244",
|
||||
normal = "#89b4fa",
|
||||
insert = "#a6e3a1",
|
||||
visual = "#cdd6f4",
|
||||
replace = "#f38ba8",
|
||||
command = "#fab387",
|
||||
}
|
||||
return {
|
||||
inactive = {
|
||||
a = { fg = colors.gray, bg = colors.outerbg, gui = "bold" },
|
||||
b = { fg = colors.gray, bg = colors.outerbg },
|
||||
c = { fg = colors.gray, bg = colors.innerbg },
|
||||
},
|
||||
visual = {
|
||||
a = { fg = colors.darkgray, bg = colors.visual, gui = "bold" },
|
||||
b = { fg = colors.gray, bg = colors.outerbg },
|
||||
c = { fg = colors.gray, bg = colors.innerbg },
|
||||
},
|
||||
replace = {
|
||||
a = { fg = colors.darkgray, bg = colors.replace, gui = "bold" },
|
||||
b = { fg = colors.gray, bg = colors.outerbg },
|
||||
c = { fg = colors.gray, bg = colors.innerbg },
|
||||
},
|
||||
normal = {
|
||||
a = { fg = colors.darkgray, bg = colors.normal, gui = "bold" },
|
||||
b = { fg = colors.gray, bg = colors.outerbg },
|
||||
c = { fg = colors.gray, bg = colors.innerbg },
|
||||
},
|
||||
insert = {
|
||||
a = { fg = colors.darkgray, bg = colors.insert, gui = "bold" },
|
||||
b = { fg = colors.gray, bg = colors.outerbg },
|
||||
c = { fg = colors.gray, bg = colors.innerbg },
|
||||
},
|
||||
command = {
|
||||
a = { fg = colors.darkgray, bg = colors.command, gui = "bold" },
|
||||
b = { fg = colors.gray, bg = colors.outerbg },
|
||||
c = { fg = colors.gray, bg = colors.innerbg },
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'auto',
|
||||
theme = theme(),
|
||||
component_separators = { left = '', right = '' },
|
||||
section_separators = { left = '', right = '' },
|
||||
disabled_filetypes = {
|
||||
statusline = {},
|
||||
statusline = { 'packer' },
|
||||
winbar = {},
|
||||
},
|
||||
ignore_focus = {},
|
||||
|
||||
@@ -2,7 +2,8 @@ local builtin = require('telescope.builtin')
|
||||
vim.keymap.set("n", "<leader>pf", builtin.find_files, {})
|
||||
vim.keymap.set("n", "<C-p>", builtin.git_files, {})
|
||||
vim.keymap.set("n", "<leader>ps", function()
|
||||
local status, result = pcall(function() vim.fn.input("Grep > ") end)
|
||||
local status, result = pcall(function() return vim.fn.input("Grep > ") end)
|
||||
--
|
||||
-- prevent keyboard interrupt error
|
||||
if not status then
|
||||
return
|
||||
|
||||
@@ -29,6 +29,8 @@ return require('packer').startup(function(use)
|
||||
requires = { { 'nvim-lua/plenary.nvim' } }
|
||||
}
|
||||
|
||||
use('onsails/lspkind.nvim')
|
||||
|
||||
use('mbbill/undotree')
|
||||
use('tpope/vim-fugitive')
|
||||
|
||||
|
||||
@@ -34,3 +34,5 @@ vim.g.mapleader = ' '
|
||||
vim.g.netrw_browse_split = 0
|
||||
vim.g.netrw_banner = 0
|
||||
vim.g.netrw_winsize = 25
|
||||
|
||||
vim.opt.showmode = false
|
||||
|
||||
@@ -99,6 +99,11 @@ _G.packer_plugins = {
|
||||
path = "/home/j409/.local/share/nvim/site/pack/packer/start/lsp-zero.nvim",
|
||||
url = "https://github.com/VonHeikemen/lsp-zero.nvim"
|
||||
},
|
||||
["lspkind.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/j409/.local/share/nvim/site/pack/packer/start/lspkind.nvim",
|
||||
url = "https://github.com/onsails/lspkind.nvim"
|
||||
},
|
||||
["lualine.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/j409/.local/share/nvim/site/pack/packer/start/lualine.nvim",
|
||||
|
||||
Reference in New Issue
Block a user