diff options
| author | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2021-11-25 00:05:34 +0100 |
|---|---|---|
| committer | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2021-11-25 00:05:59 +0100 |
| commit | 412f51cd7ad4ce610ecaf13210b52709fb3e0232 (patch) | |
| tree | bf6475830cc0df42b671bf7ce9a1b33fe70f0e37 /plugin/lsp.vim | |
| parent | 31efe743072b868d4bb86ed709b85253db0b1f60 (diff) | |
| download | nvim-conf-412f51cd7ad4ce610ecaf13210b52709fb3e0232.tar.gz nvim-conf-412f51cd7ad4ce610ecaf13210b52709fb3e0232.zip | |
Move config to lua. Add laravel snippets
Diffstat (limited to 'plugin/lsp.vim')
| -rw-r--r-- | plugin/lsp.vim | 43 |
1 files changed, 0 insertions, 43 deletions
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 <leader>vd :lua vim.lsp.buf.definition()<CR> -nnoremap <leader>vsh :lua vim.lsp.buf.signature_help()<CR> -nnoremap <leader>vh :lua vim.lsp.buf.hover()<CR> - -" to test -nnoremap <leader>vi :lua vim.lsp.buf.implementation()<CR> -nnoremap <leader>vf :lua vim.lsp.buf.formatting()<CR> -nnoremap <leader>vrn :lua vim.lsp.buf.rename()<CR> -nnoremap <leader>vca :lua vim.lsp.buf.code_action()<CR> -nnoremap <leader>vsd :lua vim.lsp.util.show_line_diagnostics(); vim.lsp.util.show_line_diagnostics()<CR> -nnoremap <leader>vn :lua vim.lsp.diagnostic.goto_next()<CR> - -nnoremap <leader>vo :LspRestart<CR> - - -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()<cr>', {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) |