mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-11-17 20:16:27 +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
|
||||
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
|
||||
use({
|
||||
"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"})]])
|
||||
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
|
||||
if client.resolved_capabilities.document_formatting then
|
||||
buf_set_keymap("n", "<leader>lf", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
|
||||
|
Loading…
Reference in New Issue
Block a user