feat: adding documentation
This commit is contained in:
@@ -51,7 +51,7 @@ return {
|
||||
keymap.set("n", "<leader>D", "<cmd>Telescope diagnostics bufnr=0<CR>", opts) -- show diagnostics for file
|
||||
|
||||
opts.desc = "Show line diagnostics"
|
||||
keymap.set("n", "<leader>d", vim.diagnostic.open_float, opts) -- show diagnostics for line
|
||||
keymap.set("n", "<leader>dd", vim.diagnostic.open_float, opts) -- show diagnostics for line
|
||||
|
||||
opts.desc = "Go to previous diagnostic"
|
||||
keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) -- jump to previous diagnostic in buffer
|
||||
@@ -79,6 +79,25 @@ return {
|
||||
end
|
||||
|
||||
mason_lspconfig.setup_handlers({
|
||||
["tsserver"] = function()
|
||||
lspconfig["tsserver"].setup({
|
||||
capabilities = capabilities,
|
||||
root_dir = lspconfig.util.root_pattern("package.json"),
|
||||
settings = {
|
||||
typescript = {
|
||||
inlayHints = {
|
||||
includeInlayParameterNameHints = "all",
|
||||
includeInlayParameterNameHintsWhenArgumentMatchesName = true,
|
||||
includeInlayFunctionParameterTypeHints = true,
|
||||
includeInlayVariableTypeHints = false,
|
||||
includeInlayPropertyDeclarationTypeHints = true,
|
||||
includeInlayFunctionLikeReturnTypeHints = true,
|
||||
includeInlayEnumMemberValueHints = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
["eslint"] = function()
|
||||
lspconfig["eslint"].setup({
|
||||
experimental = {
|
||||
|
||||
@@ -9,8 +9,8 @@ return {
|
||||
-- set keymaps
|
||||
local keymap = vim.keymap -- for conciseness
|
||||
|
||||
keymap.set("n", "s", substitute.operator, { desc = "Substitute with motion" })
|
||||
keymap.set("n", "ss", substitute.line, { desc = "Substitute line" })
|
||||
keymap.set("n", "<leader>ss", "S", { desc = "Substitute line" })
|
||||
keymap.set("n", "<leader>s", "s", { desc = "Substitute with motion" })
|
||||
keymap.set("n", "S", substitute.eol, { desc = "Substitute to end of line" })
|
||||
keymap.set("x", "s", substitute.visual, { desc = "Substitute in visual mode" })
|
||||
end,
|
||||
|
||||
Reference in New Issue
Block a user