[nvim] update lsp format mapping
This commit is contained in:
@@ -26,13 +26,13 @@ telescope.setup({
|
||||
map("n", "<C-f>", "<cmd> Telescope find_files hidden=true<CR>", default_opts) -- Show files
|
||||
map("n", "<C-s>", "<cmd> Telescope live_grep<CR>", default_opts) -- Grep through current directory
|
||||
map("n", "<C-k>", "<cmd> Telescope keymaps<CR>", default_opts) -- Show all keys
|
||||
map("n", "<C-n>", "<cmd> Noice telescope<CR>", default_opts) -- Show all notifications
|
||||
map("n", "<C-n>", "<cmd> Noice<CR>", default_opts) -- Show all notifications
|
||||
|
||||
-- Telescope + LSP
|
||||
map("n", "<leader>la", "<cmd> lua vim.lsp.buf.code_action()<CR>", default_opts) -- Apply LSP code action
|
||||
map("n", "<leader>ld", "<cmd> Telescope lsp_definitions<CR>", default_opts) -- Show all LSP definitions (or jump if only 1)
|
||||
map("n", "<leader>le", "<cmd> Telescope diagnostics<CR>", default_opts) -- Show errors and warnings
|
||||
map("n", "<leader>lf", "<cmd> lua vim.lsp.buf.formatting()<CR>", default_opts) -- Format buffer with LSP
|
||||
map("n", "<leader>lf", "<cmd> lua vim.lsp.buf.format {async = true }<CR>", default_opts) -- Format buffer with LSP
|
||||
map("n", "<leader>lh", "<cmd> lua vim.lsp.buf.hover()<CR>", default_opts) -- Show info of symbol (double tap to enter)
|
||||
map("n", "<leader>ln", "<cmd> lua vim.lsp.buf.rename()<CR>", default_opts) -- Rename LSP symbol
|
||||
map("n", "<leader>lr", "<cmd> Telescope lsp_references<CR>", default_opts) -- Show all LSP references
|
||||
|
||||
@@ -152,13 +152,11 @@ return require('packer').startup(function(use)
|
||||
-- cooler cmd line and notifications
|
||||
use({
|
||||
"folke/noice.nvim",
|
||||
event = "VimEnter",
|
||||
config = function()
|
||||
require("noice").setup()
|
||||
end,
|
||||
requires = {
|
||||
"MunifTanjim/nui.nvim", -- frontend for cmdline
|
||||
},
|
||||
event = "VimEnter",
|
||||
config = function() require("plugins.noice-conf") end,
|
||||
})
|
||||
|
||||
-- Automatically set up your configuration after cloning packer.nvim
|
||||
|
||||
1
files/nvim/.config/nvim/lua/plugins/noice-conf.lua
Normal file
1
files/nvim/.config/nvim/lua/plugins/noice-conf.lua
Normal file
@@ -0,0 +1 @@
|
||||
require("noice").setup({})
|
||||
Reference in New Issue
Block a user