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,7 +10,7 @@ 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
@ -28,9 +28,9 @@ 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
@ -56,8 +56,8 @@ 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",
enabled = false,
dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" }, dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" },
opts = {}, opts = {},
} },
} }

View file

@ -4,11 +4,12 @@ return {
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",
}, },
}, },
} }