Commit 5a815432 authored by Tim van Deurzen's avatar Tim van Deurzen

Extended neovim config customized the UI a bit more.

parent c348c627
......@@ -41,6 +41,6 @@ vim.api.nvim_set_keymap("i", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true})
vim.api.nvim_set_keymap("s", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true})
local opts = {noremap = true, silent = true, expr = true}
vim.api.nvim_set_keymap("i", "<CR>", [[compe#confirm('<cr>')]], opts)
vim.api.nvim_set_keymap("i", "<CR>", [[compe#confirm({'keys': "\<Plug>delimitMateCR", 'mode': ''})]], opts)
vim.api.nvim_set_keymap("i", "<c-c>", [[compe#complete()]], opts)
vim.api.nvim_set_keymap("i", "<c-e>", [[compe#close('<c-e>')]], opts)
......@@ -5,16 +5,58 @@ capabilities.textDocument.completion.completionItem.snippetSupport = true
lsp_config.gopls.setup{
capabilities = capabilities,
settings = {
gopls = {
analyses = {
unusedparams = true,
},
staticcheck = true,
},
},
}
lsp_config.rust_analyzer.setup{
capabilities = capabilities,
}
lsp_config.sumneko_lua.setup{
cmd = {'/usr/bin/lua-language-server'},
capabilities = capabilities,
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = 'LuaJIT',
-- Setup your lua path
path = vim.split(package.path, ';'),
},
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = {'vim'},
},
workspace = {
-- Make the server aware of Neovim runtime files
library = {
[vim.fn.expand('$VIMRUNTIME/lua')] = true,
[vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true,
},
},
-- Do not send telemetry data containing a randomized but unique identifier
telemetry = {
enable = false,
},
},
},
}
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics, {
underline = true,
virtual_text = false,
virtual_text = {
prefix = " » ",
spacing = 8,
severity_limit = "Error",
},
signs = true,
update_in_insert = true,
}
......
......@@ -40,6 +40,15 @@ return require('packer').startup(function()
'AckslD/nvim-whichkey-setup.lua',
requires = {'liuchengxu/vim-which-key'}
}
use {
'akinsho/nvim-bufferline.lua',
requires = 'kyazdani42/nvim-web-devicons',
config = function()
require('bufferline').setup{}
end
}
-- Utilities
use 'editorconfig/editorconfig-vim'
......@@ -156,9 +165,7 @@ return require('packer').startup(function()
},
}
vim.api.nvim_command [[
autocmd CursorHold,CursorHoldI * :lua require('lspsaga.diagnostic').show_line_diagnostics()
]]
vim.api.nvim_command [[autocmd CursorHold,CursorHoldI * :lua require('lspsaga.signaturehelp').signature_help()]]
end
}
use {
......
......@@ -51,3 +51,6 @@ ts_configs.setup {
}
}
}
vim.cmd [[set foldmethod=expr]]
vim.cmd [[set foldexpr=nvim_treesitter#foldexpr()]]
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment