From bc046ff484c03397222cd6f1bc8b68db3de65e32 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Tue, 14 Jun 2022 14:54:53 -0500 Subject: [PATCH] LSP --- common/neovim/init.lua | 46 ++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/common/neovim/init.lua b/common/neovim/init.lua index 9ee8a7b..0cbb3e5 100644 --- a/common/neovim/init.lua +++ b/common/neovim/init.lua @@ -166,6 +166,7 @@ packer.startup(function() 'hrsh7th/cmp-path', -- add filesystem information to complete enging 'hrsh7th/cmp-cmdline', -- add completion for vim commands 'onsails/lspkind-nvim', + 'simrat39/symbols-outline.nvim', 'saadparwaiz1/cmp_luasnip', -- TODO: automate this installation process of :COQdeps:COQnow -- {'ms-jpq/coq_nvim', branch = 'coq'}, @@ -272,7 +273,7 @@ vim.api.nvim_command 'colorscheme donokai' function SynGroup() local s = vim.fn.synID(vim.fn.line('.'), vim.fn.col('.'), 1) -- TODO: instead of printing, put it in a popup? virtual text? - print(vim.fn.synIDattr(s, 'name') .. ' -> ' .. vim.fn.synIDattr(vim.fn.synIDtrans(s), 'name')) + print(s .. ': ' .. vim.fn.synIDattr(s, 'name') .. ' -> ' .. vim.fn.synIDattr(vim.fn.synIDtrans(s), 'name')) end vim.api.nvim_create_autocmd("TextYankPost", { @@ -324,12 +325,22 @@ local keymap = { ['k'] = { ':bnext', m.s }, ['j'] = { ':bprevious', m.s }, + + ['s'] = "SessionToggleecho 'Persisting Session: ' .. g:persisting .. ' (' .. getcwd() .. ')'", + ['S'] = "SessionSaveecho 'Saved Session: ' .. getcwd()", + ['l'] = "SessionLoadecho 'Loaded Session: ' .. getcwd()", + ['L'] = "SessionLoadLastecho 'Loaded Last Session: ' .. getcwd()", + ['d'] = "SessionDeleteecho 'Deleted Session for cwd: ' .. getcwd()", + + ['t'] = 'Telescope help_tags', + + ['m'] = 'lua SynGroup()', + [''] = ':qa', [''] = 'Telescope git_files', [''] = 'Telescope live_grep', [''] = 'Telescope buffers', - ['t'] = 'Telescope help_tags', [''] = ':TmuxNavigateLeft', [''] = ':TmuxNavigateDown', @@ -338,13 +349,6 @@ local keymap = { [' n'] = "'Nn'[v:searchforward]", [' N'] = "'nN'[v:searchforward]", - [''] = ':lua SynGroup()', - - ['s'] = "SessionToggleecho 'Persisting Session: ' .. g:persisting .. ' (' .. getcwd() .. ')'", - ['S'] = "SessionSaveecho 'Saved Session: ' .. getcwd()", - ['l'] = "SessionLoadecho 'Loaded Session: ' .. getcwd()", - ['L'] = "SessionLoadLastecho 'Loaded Last Session: ' .. getcwd()", - ['d'] = "SessionDeleteecho 'Deleted Session for cwd: ' .. getcwd()", }, -- terminal bindings @@ -514,7 +518,14 @@ chmod +x $els_path/elixir-ls/language_server.sh ]] -- local lsp_configs = { - gopls = {}, + ansiblels = {}, + bashls = {}, + clangd = {}, + denols = { + root_dir = lsp.util.root_pattern("deno.json"), + }, + diagnosticls = {}, + dockerls = {}, elixirls = { cmd = { vim.fn.expand '~/.local/share/nvim/lsp_servers/elixir/elixir-ls/language_server.sh' }, settings = { @@ -524,6 +535,13 @@ local lsp_configs = { } } }, + gopls = {}, + nimls = {}, + openscad_ls = {}, + pylsp = {}, + rnix = {}, + rust_analyzer = {}, + sqlls = {}, sumneko_lua = { settings = { Lua = { @@ -533,13 +551,11 @@ local lsp_configs = { } } }, + terraform_lsp = {}, + tflint = {}, vimls = {}, - rust_analyzer = {}, -- tsserver = {}, - pylsp = {}, - denols = { - root_dir = lsp.util.root_pattern("deno.json"), - }, + yamlls = {}, } local capabilities = require 'cmp_nvim_lsp'.update_capabilities(vim.lsp.protocol.make_client_capabilities())