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
|
||||
|
||||
Reference in New Issue
Block a user