From 77f5dd9693576af7fde80bdc99700f21eff01d6b Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Wed, 9 Feb 2022 17:53:48 +0100 Subject: WIP moving to all lua and new structure --- lua/alpha/lsp.lua | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 lua/alpha/lsp.lua (limited to 'lua/alpha/lsp.lua') 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()', {noremap = true}) - vim.api.nvim_set_keymap('n', 'vd', ':lua vim.lsp.buf.definition()', {noremap = true}) - - - vim.api.nvim_set_keymap('n', 'vo', ':LspRestart', {noremap = true}) - - -- diagnostics to move between info and errors - vim.api.nvim_set_keymap('n', 'vn', ':lua vim.lsp.diagnostic.goto_next()', {noremap = true}) - vim.api.nvim_set_keymap('n', 'vp', ':lua vim.lsp.diagnostic.goto_prev()', {noremap = true}) - - - vim.api.nvim_set_keymap('n', 'vca', ':lua vim.lsp.buf.code_action()', {noremap = true}) - vim.api.nvim_set_keymap('n', 'vf', ':lua vim.lsp.buf.formatting()', {noremap = true}) - - vim.api.nvim_set_keymap('n', 'vi', ':lua vim.lsp.buf.implementation()', {noremap = true}) - vim.api.nvim_set_keymap('n', 'vrn', ':lua vim.lsp.buf.rename()', {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) -- cgit v1.2.3