rename command
This commit is contained in:
parent
3ad738b6dd
commit
170e867faf
@ -4,6 +4,7 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
keybindings = {
|
keybindings = {
|
||||||
D = "delete";
|
D = "delete";
|
||||||
|
R = "rename";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -40,6 +40,7 @@ nmap("<leader>e", vim.diagnostic.open_float)
|
|||||||
|
|
||||||
-- Format on CursorHold
|
-- Format on CursorHold
|
||||||
|
|
||||||
|
local filetypes = { "*.ts", "*.tsx", "*.prisma", "*.js", "*.jsx", "*.html", "*.css", "*.json", "*.yaml", "*.lua" }
|
||||||
|
|
||||||
local async = require("plenary.async")
|
local async = require("plenary.async")
|
||||||
|
|
||||||
@ -50,7 +51,7 @@ end
|
|||||||
local async_format = async.void(format_file)
|
local async_format = async.void(format_file)
|
||||||
vim.api.nvim_create_autocmd("CursorHold", {
|
vim.api.nvim_create_autocmd("CursorHold", {
|
||||||
callback = async_format,
|
callback = async_format,
|
||||||
pattern = { "*.*" }
|
pattern = filetypes
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@ -87,11 +88,13 @@ local on_attach = function(client, bufnr)
|
|||||||
callback = function()
|
callback = function()
|
||||||
vim.lsp.buf.document_highlight()
|
vim.lsp.buf.document_highlight()
|
||||||
end,
|
end,
|
||||||
|
pattern = filetypes
|
||||||
})
|
})
|
||||||
vim.api.nvim_create_autocmd("CursorMoved", {
|
vim.api.nvim_create_autocmd("CursorMoved", {
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.lsp.buf.clear_references()
|
vim.lsp.buf.clear_references()
|
||||||
end,
|
end,
|
||||||
|
pattern = filetypes
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
|
Loading…
Reference in New Issue
Block a user