mini update nvim config

This commit is contained in:
Alexander Navarro 2025-12-18 09:20:46 -03:00
parent 20f68e1dee
commit 6fa42a7c2d
4 changed files with 78 additions and 73 deletions

View file

@ -2,7 +2,5 @@ if status is-interactive
# Commands to run in interactive sessions can go here # Commands to run in interactive sessions can go here
zoxide init --cmd cd fish | source zoxide init --cmd cd fish | source
atuin init fish | source atuin init fish | source
mise activate fish | source
end end

View file

@ -10,54 +10,54 @@ vim.o.diffopt = "vertical,closeoff,filler"
local opt = vim.opt local opt = vim.opt
vim.schedule(function() vim.schedule(function()
vim.opt.clipboard = 'unnamedplus' vim.opt.clipboard = "unnamedplus"
end) end)
-- opt.shortmess:append({ W = true, I = true, c = true }) -- INFO: this control the format of some messages -- opt.shortmess:append({ W = true, I = true, c = true }) -- INFO: this control the format of some messages
-- vim.o.exrc = true -- vim.o.exrc = true
-- vim.opt.list = true -- Sets how neovim will display certain whitespace characters in the editor. -- vim.opt.list = true -- Sets how neovim will display certain whitespace characters in the editor.
-- vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' } -- vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
opt.autowrite = true -- Enable auto write opt.autowrite = true -- Enable auto write
opt.breakindent = true -- Every wrapped line will continue visually indented opt.breakindent = true -- Every wrapped line will continue visually indented
opt.completeopt = "menu,menuone,noselect" opt.completeopt = "menu,menuone,noselect"
opt.conceallevel = 2 -- Hide * markup for bold and italic opt.conceallevel = 2 -- Hide * markup for bold and italic
opt.confirm = true -- Confirm to save changes before exiting modified buffer opt.confirm = true -- Confirm to save changes before exiting modified buffer
opt.cursorline = true -- Enable highlighting of the current line opt.cursorline = true -- Enable highlighting of the current line
opt.expandtab = true -- Use spaces instead of tabs opt.expandtab = true -- Use spaces instead of tabs
opt.formatoptions = "jcroqlnt" -- tcqj opt.formatoptions = "jcroqlnt" -- tcqj
opt.grepformat = "%f:%l:%c:%m" opt.grepformat = "%f:%l:%c:%m"
opt.grepprg = "rg --vimgrep" opt.grepprg = "rg --vimgrep"
opt.ignorecase = true -- Ignore case opt.ignorecase = true -- Ignore case
opt.inccommand = 'split' -- Preview substitutions live, as you type! opt.inccommand = "split" -- Preview substitutions live, as you type!
opt.mouse = "a" -- Enable mouse mode opt.mouse = "a" -- Enable mouse mode
opt.nrformats = 'blank,bin,hex' opt.nrformats = "blank,bin,hex"
opt.number = true -- Print line number opt.number = true -- Print line number
opt.pumblend = 10 -- Popup blend opt.pumblend = 10 -- Popup blend
opt.pumheight = 10 -- Maximum number of entries in a popup opt.pumheight = 10 -- Maximum number of entries in a popup
-- opt.relativenumber = true -- Relative line numbers -- opt.relativenumber = true -- Relative line numbers
opt.scrolloff = 15 -- Lines of context opt.scrolloff = 15 -- Lines of context
opt.sidescrolloff = 25 -- Columns of context opt.sidescrolloff = 25 -- Columns of context
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" } opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" }
opt.shiftround = true -- Round indent opt.shiftround = true -- Round indent
opt.shiftwidth = 2 -- Size of an indent opt.shiftwidth = 2 -- Size of an indent
opt.showmode = false -- Don't show mode since we have a statusline opt.showmode = false -- Don't show mode since we have a statusline
opt.sidescrolloff = 8 -- Columns of context opt.sidescrolloff = 8 -- Columns of context
opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
opt.smartcase = true -- Don't ignore case with capitals opt.smartcase = true -- Don't ignore case with capitals
opt.smartindent = true -- Insert indents automatically opt.smartindent = true -- Insert indents automatically
opt.spelllang = { "en" } opt.spelllang = { "en" }
opt.splitbelow = true -- Put new windows below current opt.splitbelow = true -- Put new windows below current
opt.splitright = true -- Put new windows right of current opt.splitright = true -- Put new windows right of current
opt.tabstop = 2 -- Number of spaces tabs count for opt.tabstop = 2 -- Number of spaces tabs count for
opt.termguicolors = true -- True color support opt.termguicolors = true -- True color support
opt.undofile = true opt.undofile = true
opt.undolevels = 10000 opt.undolevels = 10000
opt.updatetime = 200 -- Save swap file and trigger CursorHold opt.updatetime = 200 -- Save swap file and trigger CursorHold
opt.wildmode = "longest,list:full" -- Command-line completion mode opt.wildmode = "longest,list:full" -- Command-line completion mode
opt.winminwidth = 5 -- Minimum window width opt.winminwidth = 5 -- Minimum window width
opt.wrap = false -- Disable line wrap opt.wrap = false -- Disable line wrap
vim.o.completeopt = 'noselect,menu,menuone,noinsert,popup' vim.o.completeopt = "noselect,menu,menuone,noinsert,popup"
vim.o.winborder = 'rounded' vim.o.winborder = "rounded"
vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions" vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
@ -130,18 +130,18 @@ vim.filetype.add({
mdx = "mdx", mdx = "mdx",
log = "log", log = "log",
conf = "conf", conf = "conf",
env = "dotenv", -- env = "dotenv",
}, },
-- Detect and apply filetypes based on the entire filename -- Detect and apply filetypes based on the entire filename
filename = { filename = {
[".env"] = "dotenv", -- [".env"] = "dotenv",
["env"] = "dotenv", ["env"] = "dotenv",
["tsconfig.json"] = "jsonc", ["tsconfig.json"] = "jsonc",
}, },
-- Detect and apply filetypes based on certain patterns of the filenames -- Detect and apply filetypes based on certain patterns of the filenames
pattern = { pattern = {
-- INFO: Match filenames like - ".env.example", ".env.local" and so on -- INFO: Match filenames like - ".env.example", ".env.local" and so on
["%.env%.[%w_.-]+"] = "dotenv", -- ["%.env%.[%w_.-]+"] = "dotenv",
["compose.*%.ya?ml"] = "yaml.docker-compose", ["compose.*%.ya?ml"] = "yaml.docker-compose",
["docker-compose.*%.ya?ml"] = "yaml.docker-compose", ["docker-compose.*%.ya?ml"] = "yaml.docker-compose",
[".*%.blade%.php"] = "blade", [".*%.blade%.php"] = "blade",
@ -157,11 +157,16 @@ vim.filetype.add({
vim.lsp.config("rust-analyzer", { vim.lsp.config("rust-analyzer", {
tools = { tools = {
code_actions = { code_actions = {
ui_select_fallback = true ui_select_fallback = true,
} },
} },
}) })
vim.g.markdown_fenced_languages = {
"ts=typescript",
}
vim.lsp.enable("denols")
vim.lsp.inlay_hint.enable(true) vim.lsp.inlay_hint.enable(true)

View file

@ -1,24 +1,25 @@
return { return {
{ {
'mrcjkb/rustaceanvim', "mrcjkb/rustaceanvim",
version = '^6', -- Recommended version = "^6", -- Recommended
lazy = false, -- This plugin is already lazy lazy = false, -- This plugin is already lazy
}, },
{ {
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins -- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
-- used for completion, annotations and signatures of Neovim apis -- used for completion, annotations and signatures of Neovim apis
'folke/lazydev.nvim', "folke/lazydev.nvim",
ft = 'lua', ft = "lua",
opts = { opts = {
library = { library = {
-- Load luvit types when the `vim.uv` word is found -- Load luvit types when the `vim.uv` word is found
{ path = "${3rd}/luv/library", words = { "vim%.uv" } } { path = "${3rd}/luv/library", words = { "vim%.uv" } },
}, },
}, },
}, },
{ {
"pmizio/typescript-tools.nvim", "pmizio/typescript-tools.nvim",
dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" }, enabled = false,
opts = {}, dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" },
} opts = {},
},
} }

View file

@ -1,14 +1,15 @@
return { return {
{ {
"m4xshen/hardtime.nvim", "m4xshen/hardtime.nvim",
lazy = false, lazy = false,
dependencies = { "MunifTanjim/nui.nvim" }, dependencies = { "MunifTanjim/nui.nvim" },
keys = { keys = {
{ "<leader>uH", "<CMD>Hardtime toggle<CR>", desc = "Toggle hardtime" } { "<leader>uH", "<CMD>Hardtime toggle<CR>", desc = "Toggle hardtime" },
}, },
opts = { opts = {
max_count = 10, max_count = 10,
disable_mouse = false, disable_mouse = false,
}, restriction_mode = "hint",
}, },
},
} }