Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
aa7a192b0c
3 changed files with 21 additions and 1 deletions
|
|
@ -858,7 +858,7 @@ key_bindings:
|
|||
hints:
|
||||
alphabet: "jfkdls;ahgurieowpq"
|
||||
enabled:
|
||||
- regex: "[a-f0-9]{40}"
|
||||
- regex: "[a-f0-9]{7,}"
|
||||
action: Copy
|
||||
binding:
|
||||
key: H
|
||||
|
|
|
|||
|
|
@ -9,6 +9,22 @@ end
|
|||
nvim_lsp.rust_analyzer.setup({ on_attach=on_attach })
|
||||
nvim_lsp.gopls.setup({ on_attach=on_attach })
|
||||
nvim_lsp.pyright.setup({ on_attach=on_attach })
|
||||
nvim_lsp.clangd.setup({ on_attach=on_attach })
|
||||
|
||||
nvim_lsp.efm.setup {
|
||||
init_options = {documentFormatting = true},
|
||||
settings = {
|
||||
rootMarkers = {".git/"},
|
||||
languages = {
|
||||
lua = {
|
||||
{ formatCommand = "lua-format -i", formatStdin = true }
|
||||
},
|
||||
python = {
|
||||
{ formatCommand = 'black --quiet -', formatStdin = true }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-- Enable diagnostics
|
||||
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
|
||||
|
|
|
|||
4
.vimrc
4
.vimrc
|
|
@ -305,6 +305,10 @@ set updatetime=500
|
|||
" Show diagnostic popup on cursor hold
|
||||
autocmd CursorHold * lua vim.lsp.diagnostic.show_line_diagnostics({show_header = false, focusable = false})
|
||||
|
||||
" Autoformat on save
|
||||
autocmd BufWritePre *.lua lua vim.lsp.buf.formatting_sync(nil, 1000)
|
||||
autocmd BufWritePre *.py lua vim.lsp.buf.formatting_sync(nil, 1000)
|
||||
|
||||
" Goto previous/next diagnostic warning/error
|
||||
nnoremap <silent> g[ <cmd>lua vim.lsp.diagnostic.goto_prev()<CR>
|
||||
nnoremap <silent> g] <cmd>lua vim.lsp.diagnostic.goto_next()<CR>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue