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
zoxide init --cmd cd fish | source
atuin init fish | source
mise activate fish | source
end

View file

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

View file

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

View file

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