From a16bdfe930d89e1a7fb354b78d16e8742118f76d Mon Sep 17 00:00:00 2001 From: Rasmus Date: Sat, 8 Apr 2023 00:27:03 +0300 Subject: checkers --- config/.config/nvim/after/plugin/lsp.lua | 70 ++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 config/.config/nvim/after/plugin/lsp.lua (limited to 'config/.config/nvim/after/plugin/lsp.lua') 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({ + [''] = cmp.mapping.select_prev_item(cmp_select), + [''] = cmp.mapping.select_next_item(cmp_select), + [''] = cmp.mapping.confirm( {select = true} ), + [''] = 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, +}) + -- cgit v1.2.3