" Must have extensions! lua <", "lua vim.lsp.buf.definition()", default_opts) vim.api.nvim_set_keymap("n", "gD", "lua vim.lsp.buf.declaration()", default_opts) vim.api.nvim_set_keymap("n", "gr", "lua vim.lsp.buf.references()", default_opts) vim.api.nvim_set_keymap("n", "rn", "lua vim.lsp.buf.rename()", default_opts) vim.api.nvim_set_keymap("n", "", "lua vim.lsp.buf.signature_help()", default_opts) vim.api.nvim_set_keymap("n", "K", "lua vim.lsp.buf.hover()", default_opts) vim.api.nvim_set_keymap("n", "", "lua vim.lsp.buf.code_action()", default_opts) vim.api.nvim_set_keymap("n", "ac", "lua vim.lsp.buf.code_action()", default_opts) vim.api.nvim_set_keymap("n", "a", "lua vim.lsp.buf.code_action_range()", default_opts) lspconfig.bashls.setup {on_attach = on_attach} lspconfig.clangd.setup {on_attach = on_attach} lspconfig.dartls.setup {on_attach = on_attach} lspconfig.jsonls.setup {on_attach = on_attach} lspconfig.pyright.setup {on_attach = on_attach} lspconfig.rust_analyzer.setup {on_attach = on_attach} lspconfig.vimls.setup {on_attach = on_attach} require'compe'.setup { enabled = true; autocomplete = true; debug = false; min_length = 1; preselect = 'enable'; throttle_time = 80; source_timeout = 200; incomplete_delay = 400; max_abbr_width = 100; max_kind_width = 100; max_menu_width = 100; documentation = true; source = { path = true; buffer = true; calc = true; vsnip = true; nvim_lsp = true; nvim_lua = true; spell = true; tags = true; snippets_nvim = true; treesitter = true; }; } require("nvim-ale-diagnostic") vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( vim.lsp.diagnostic.on_publish_diagnostics, { underline = false, virtual_text = false, signs = true, update_in_insert = false, } ) EOF inoremap compe#complete() inoremap compe#confirm('') inoremap compe#close('') inoremap compe#scroll({ 'delta': +4 }) inoremap compe#scroll({ 'delta': -4 }) " Set completeopt to have a better completion experience set completeopt=menuone,noselect