nvim: Format
This commit is contained in:
parent
744c08f0f5
commit
7b810f94a5
3 changed files with 13 additions and 11 deletions
|
@ -70,10 +70,6 @@ map('n', '<localleader>ln', '<cmd>lua vim.lsp.buf.rename()<cr>',
|
|||
{ buffer = bufnr, desc = 'Rename element' })
|
||||
map('n', '<localleader>lr', '<cmd>lua vim.lsp.buf.references()<cr>',
|
||||
{ buffer = bufnr, desc = 'References' })
|
||||
if client and client.server_capabilities.document_formatting then
|
||||
map('n', '<localleader>lf', "<cmd>lua vim.lsp.buf.formatting()<CR>",
|
||||
{ buffer = bufnr, desc = 'Format document' })
|
||||
end
|
||||
|
||||
map('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>',
|
||||
{ buffer = bufnr, desc = 'Hover definition' })
|
||||
|
|
|
@ -7,9 +7,17 @@ vim.fn.sign_define("DiagnosticSignInfo", { text = "", texthl = "DiagnosticSig
|
|||
vim.fn.sign_define("DiagnosticSignHint", { text = "", texthl = "DiagnosticSignHint" })
|
||||
|
||||
lsp.ensure_installed({
|
||||
'arduino_language_server', 'bashls', 'beancount', 'clangd', 'dockerls',
|
||||
'docker_compose_language_service', 'lua_ls', 'pyright', 'ruff_lsp', 'taplo',
|
||||
'yamlls'
|
||||
'arduino_language_server',
|
||||
'bashls',
|
||||
'beancount',
|
||||
'clangd',
|
||||
'dockerls',
|
||||
'docker_compose_language_service',
|
||||
'lua_ls',
|
||||
'pyright',
|
||||
'ruff_lsp',
|
||||
'taplo',
|
||||
'yamlls',
|
||||
})
|
||||
lsp.preset({ name = "recommended", set_lsp_keymaps = false })
|
||||
lsp.on_attach(function(client, bufnr)
|
||||
|
|
|
@ -12,7 +12,5 @@ local lazygit = Terminal:new({
|
|||
float_opts = { border = "curved" }
|
||||
})
|
||||
function _Lazygit_toggle() lazygit:toggle() end
|
||||
vim.cmd([[command! Lazygit :lua _Lazygit_toggle()<cr>]])
|
||||
|
||||
-- vim.api.nvim_set_keymap("n", "<leader>g", "<cmd>lua _lazygit_toggle()<CR>",
|
||||
-- {noremap = true, silent = true})
|
||||
vim.cmd([[command! Lazygit :lua _Lazygit_toggle()<cr>]])
|
||||
|
|
Loading…
Reference in a new issue