diff options
author | Rasmus <rasmus.luha@gmail.com> | 2023-04-08 00:27:03 +0300 |
---|---|---|
committer | Rasmus <rasmus.luha@gmail.com> | 2023-04-08 00:27:03 +0300 |
commit | a16bdfe930d89e1a7fb354b78d16e8742118f76d (patch) | |
tree | f32aabd929a485ac24ea2b3fb1c9c9d041f27478 /config/.config/nvim/after/plugin/lsp.lua |
checkers
Diffstat (limited to 'config/.config/nvim/after/plugin/lsp.lua')
-rw-r--r-- | config/.config/nvim/after/plugin/lsp.lua | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/config/.config/nvim/after/plugin/lsp.lua b/config/.config/nvim/after/plugin/lsp.lua new file mode 100644 index 0000000..58546de --- /dev/null +++ b/config/.config/nvim/after/plugin/lsp.lua @@ -0,0 +1,70 @@ + local lsp = require('lsp-zero').preset({ + name = 'minimal', + set_lsp_keymaps = true, + manage_nvim_cmp = true, + suggest_lsp_servers = false, +}) + +-- (Optional) Configure lua language server for neovim +lsp.nvim_workspace() + +lsp.ensure_installed = ({ + "quick_lint_js", + "html-lsp", + "css-lsp"; + "lua_ls", + "clangd", + "python-lsp-server", +}) + + + +---------------------- +-- Completion stuff -- +---------------------- + +lsp.setup_nvim_cmp({ + preselect = 'none', + completion = { + autocomplete = false, + completeopt = 'menu,menuone,noinsert,noselect', + }, +}) + + + +local cmp = require('cmp') +local cmp_select = {behavior = cmp.SelectBehavior.Select} +local cmp_mappings = lsp.defaults.cmp_mappings({ + ['<C-p>'] = cmp.mapping.select_prev_item(cmp_select), + ['<C-n>'] = cmp.mapping.select_next_item(cmp_select), + ['<C-y>'] = cmp.mapping.confirm( {select = true} ), + ['<C-Space>'] = cmp.mapping.complete(), +}) + + + + + +lsp.set_preferences({ + sign_icons = { } +}) + +lsp.setup() + + + + +------------------------ +-- Disable Diagnostics - +------------------------ + +vim.diagnostic.config({ + virtual_text = false, + signs = false, + update_in_insert = false, + underline = false, + severity_sort = false, + float = false, +}) + |