From 412f51cd7ad4ce610ecaf13210b52709fb3e0232 Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Thu, 25 Nov 2021 00:05:34 +0100 Subject: Move config to lua. Add laravel snippets --- plugin/lsp.vim | 43 ------------------------------------------- 1 file changed, 43 deletions(-) (limited to 'plugin/lsp.vim') diff --git a/plugin/lsp.vim b/plugin/lsp.vim index 82d9a8f..e69de29 100644 --- a/plugin/lsp.vim +++ b/plugin/lsp.vim @@ -1,43 +0,0 @@ -nnoremap vd :lua vim.lsp.buf.definition() -nnoremap vsh :lua vim.lsp.buf.signature_help() -nnoremap vh :lua vim.lsp.buf.hover() - -" to test -nnoremap vi :lua vim.lsp.buf.implementation() -nnoremap vf :lua vim.lsp.buf.formatting() -nnoremap vrn :lua vim.lsp.buf.rename() -nnoremap vca :lua vim.lsp.buf.code_action() -nnoremap vsd :lua vim.lsp.util.show_line_diagnostics(); vim.lsp.util.show_line_diagnostics() -nnoremap vn :lua vim.lsp.diagnostic.goto_next() - -nnoremap vo :LspRestart - - -au Filetype php setl omnifunc=v:lua.vim.lsp.omnifunc -autocmd FileType go setlocal omnifunc=v:lua.vim.lsp.omnifunc - -let g:completion_matching_strategy_list = ['exact', 'substring', 'fuzzy'] - -lua << EOF - -local function on_attach() - vim.api.nvim_set_keymap('n', 'K', ':lua vim.lsp.buf.hover()', {noremap = true}) - - require "lsp_signature".on_attach() -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