mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-12-22 18:27:34 +00:00
Add incremental rename
This commit is contained in:
parent
ae4cb15f72
commit
978d20d4e9
@ -215,6 +215,15 @@ use("folke/lua-dev.nvim")
|
|||||||
-- Better display of lsp diagnostics
|
-- Better display of lsp diagnostics
|
||||||
use("folke/trouble.nvim")
|
use("folke/trouble.nvim")
|
||||||
|
|
||||||
|
-- Incremental lsp rename view
|
||||||
|
use({
|
||||||
|
"smjonas/inc-rename.nvim",
|
||||||
|
config = function()
|
||||||
|
require("inc_rename").setup()
|
||||||
|
end,
|
||||||
|
disable = vim.fn.has("nvim-0.7.0") ~= 1,
|
||||||
|
})
|
||||||
|
|
||||||
-- Generic linter/formatters in diagnostics API
|
-- Generic linter/formatters in diagnostics API
|
||||||
use({
|
use({
|
||||||
"jose-elias-alvarez/null-ls.nvim",
|
"jose-elias-alvarez/null-ls.nvim",
|
||||||
|
@ -111,6 +111,11 @@ local function get_default_attach(override_capabilities)
|
|||||||
vim.cmd([[autocmd CursorHold * lua vim.diagnostic.open_float(nil, {focus=false, scope="cursor"})]])
|
vim.cmd([[autocmd CursorHold * lua vim.diagnostic.open_float(nil, {focus=false, scope="cursor"})]])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Use IncRename if available
|
||||||
|
if utils.try_require("inc_rename") ~= nil then
|
||||||
|
lsp_keymap("rn", "<cmd>IncRename()<CR>")
|
||||||
|
end
|
||||||
|
|
||||||
-- Set some keybinds conditional on server capabilities
|
-- Set some keybinds conditional on server capabilities
|
||||||
if client.resolved_capabilities.document_formatting then
|
if client.resolved_capabilities.document_formatting then
|
||||||
buf_set_keymap("n", "<leader>lf", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
|
buf_set_keymap("n", "<leader>lf", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
|
||||||
|
Loading…
Reference in New Issue
Block a user