From 7733ab5531454fed0e2fbb86ad2bb6680163b424 Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Mon, 30 Aug 2021 20:53:28 +0200 Subject: add harpoon --- plugin/lsp.vim | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'plugin/lsp.vim') diff --git a/plugin/lsp.vim b/plugin/lsp.vim index c411983..850a63b 100644 --- a/plugin/lsp.vim +++ b/plugin/lsp.vim @@ -42,6 +42,7 @@ 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() @@ -65,7 +66,20 @@ local function setup_servers() require'lspinstall'.setup() local servers = require'lspinstall'.installed_servers() for _, server in pairs(servers) do - require'lspconfig'[server].setup{ on_attach=on_attach} + if server == 'lua' then + require'lspconfig'.lua.setup { + on_attach=on_attach, + settings = { + Lua = { + diagnostics = { + globals = { 'vim' } + } + } + }, + } + else + require'lspconfig'[server].setup{ on_attach=on_attach } + end end end -- cgit v1.2.3