From 6fa42a7c2da0367e1d07f9f2a62c19b48adf0314 Mon Sep 17 00:00:00 2001 From: aleidk Date: Thu, 18 Dec 2025 09:20:46 -0300 Subject: [PATCH] mini update nvim config --- configs/fish/config.fish | 2 - configs/nvim/lua/aleidk/options.lua | 79 ++++++++++--------- .../lua/aleidk/plugins/language-support.lua | 45 +++++------ configs/nvim/lua/aleidk/plugins/training.lua | 25 +++--- 4 files changed, 78 insertions(+), 73 deletions(-) diff --git a/configs/fish/config.fish b/configs/fish/config.fish index cbde320..9f5e5f6 100644 --- a/configs/fish/config.fish +++ b/configs/fish/config.fish @@ -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 diff --git a/configs/nvim/lua/aleidk/options.lua b/configs/nvim/lua/aleidk/options.lua index 3e2a011..cf76fb6 100644 --- a/configs/nvim/lua/aleidk/options.lua +++ b/configs/nvim/lua/aleidk/options.lua @@ -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) diff --git a/configs/nvim/lua/aleidk/plugins/language-support.lua b/configs/nvim/lua/aleidk/plugins/language-support.lua index c47309b..bee76db 100644 --- a/configs/nvim/lua/aleidk/plugins/language-support.lua +++ b/configs/nvim/lua/aleidk/plugins/language-support.lua @@ -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 = {}, + }, } diff --git a/configs/nvim/lua/aleidk/plugins/training.lua b/configs/nvim/lua/aleidk/plugins/training.lua index 6eb3bfc..47012a6 100644 --- a/configs/nvim/lua/aleidk/plugins/training.lua +++ b/configs/nvim/lua/aleidk/plugins/training.lua @@ -1,14 +1,15 @@ return { - { - "m4xshen/hardtime.nvim", - lazy = false, - dependencies = { "MunifTanjim/nui.nvim" }, - keys = { - { "uH", "Hardtime toggle", desc = "Toggle hardtime" } - }, - opts = { - max_count = 10, - disable_mouse = false, - }, - }, + { + "m4xshen/hardtime.nvim", + lazy = false, + dependencies = { "MunifTanjim/nui.nvim" }, + keys = { + { "uH", "Hardtime toggle", desc = "Toggle hardtime" }, + }, + opts = { + max_count = 10, + disable_mouse = false, + restriction_mode = "hint", + }, + }, }