feat: adding documentation

This commit is contained in:
Carlos
2025-02-09 15:30:19 -05:00
parent 081350a9ec
commit bb8da95cc1
4 changed files with 34 additions and 13 deletions

View File

@@ -2,6 +2,8 @@ vim.cmd("let g:netrw_liststyle = 3")
local opt = vim.opt
vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
opt.relativenumber = true
opt.number = true

View File

@@ -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 = {

View File

@@ -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,