diff options
| author | Ariel D'Alessandro <ariel.dalessandro@auto1.com> | 2022-02-09 17:53:48 +0100 |
|---|---|---|
| committer | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2022-02-10 07:31:32 +0100 |
| commit | 77f5dd9693576af7fde80bdc99700f21eff01d6b (patch) | |
| tree | ebb4a64a4137c27b5771af8a95944b9dee92c8f5 /lua/alpha/lsp.lua | |
| parent | cd15d17a96390879c90e95ad90e0f75629e3eed7 (diff) | |
| download | nvim-conf-77f5dd9693576af7fde80bdc99700f21eff01d6b.tar.gz nvim-conf-77f5dd9693576af7fde80bdc99700f21eff01d6b.zip | |
WIP moving to all lua and new structure
Diffstat (limited to 'lua/alpha/lsp.lua')
| -rw-r--r-- | lua/alpha/lsp.lua | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/lua/alpha/lsp.lua b/lua/alpha/lsp.lua deleted file mode 100644 index 40a56d6..0000000 --- a/lua/alpha/lsp.lua +++ /dev/null @@ -1,43 +0,0 @@ -local function on_attach() - -- keymaps for lsp - vim.api.nvim_set_keymap('n', 'K', ':lua vim.lsp.buf.hover()<cr>', {noremap = true}) - vim.api.nvim_set_keymap('n', '<leader>vd', ':lua vim.lsp.buf.definition()<cr>', {noremap = true}) - - - vim.api.nvim_set_keymap('n', '<leader>vo', ':LspRestart<cr>', {noremap = true}) - - -- diagnostics to move between info and errors - vim.api.nvim_set_keymap('n', '<leader>vn', ':lua vim.lsp.diagnostic.goto_next()<cr>', {noremap = true}) - vim.api.nvim_set_keymap('n', '<leader>vp', ':lua vim.lsp.diagnostic.goto_prev()<cr>', {noremap = true}) - - - vim.api.nvim_set_keymap('n', '<leader>vca', ':lua vim.lsp.buf.code_action()<cr>', {noremap = true}) - vim.api.nvim_set_keymap('n', '<leader>vf', ':lua vim.lsp.buf.formatting()<cr>', {noremap = true}) - - vim.api.nvim_set_keymap('n', '<leader>vi', ':lua vim.lsp.buf.implementation()<cr>', {noremap = true}) - vim.api.nvim_set_keymap('n', '<leader>vrn', ':lua vim.lsp.buf.rename()<cr>', {noremap = true}) - - require "lsp_signature".on_attach() - - vim.cmd [[au Filetype php setl omnifunc=v:lua.vim.lsp.omnifunc]] - vim.cmd [[autocmd FileType go setlocal omnifunc=v:lua.vim.lsp.omnifunc]] - - vim.g.completion_matching_strategy_list = { 'exact', 'substring', 'fuzzy' } - -end - -local lsp_installer = require("nvim-lsp-installer") - -lsp_installer.on_server_ready(function(server) - local opts = {} - - -- (optional) Customize the options passed to the server - if server.name == "emmet_ls" then - opts.filetypes = {"html", "css", "blade"} - end - - opts.on_attach = on_attach - -- This setup() function is exactly the same as lspconfig's setup function (:help lspconfig-quickstart) - server:setup(opts) - vim.cmd [[ do User LspAttachBuffers ]] -end) |