mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-11-25 00:38:23 -05:00
neovim: minor improvement in lspconfig
This commit is contained in:
parent
5ab3184378
commit
2dbf4079a5
@ -27,7 +27,7 @@ local on_attach = function(client, bufnr)
|
||||
if client.resolved_capabilities.document_formatting then
|
||||
buf_set_keymap('n', '<leader>lo', '<Cmd>lua vim.lsp.buf.formatting()<CR>', opts)
|
||||
elseif client.resolved_capabilities.document_range_formatting then
|
||||
buf_set_keymap('n', '<leader>lo', '<Cmd>lua vim.lsp.buf.range_formatting()<CR>', opts)
|
||||
buf_set_keymap('n', '<leader>lo', '<Cmd>lua vim.lsp.buf.range_formatting({},{0,0},{vim.fn.line("$"),0})<CR>', opts)
|
||||
end
|
||||
end
|
||||
|
||||
@ -63,6 +63,7 @@ table.insert(runtime_path, 'lua/?/init.lua')
|
||||
|
||||
lspconf.sumneko_lua.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
cmd = {
|
||||
vim.fn.stdpath('data') .. '/lsp/lua-language-server/bin/Linux/lua-language-server',
|
||||
'-E',
|
||||
@ -107,6 +108,7 @@ local servers = {
|
||||
'pyright',
|
||||
'tsserver',
|
||||
'html',
|
||||
'jsonls',
|
||||
'cmake',
|
||||
'rust_analyzer'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user