From 9e2318b233cce1ac1f1757c6eef2bb4f520d1579 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Tue, 6 Feb 2024 15:25:18 +0300 Subject: [PATCH] Nvim : Reformat config. --- .config/nvim/init.lua | 23 ++--- .config/nvim/lua/config/Etc.lua | 25 ++--- .config/nvim/lua/config/Search.lua | 6 +- .config/nvim/lua/config/Tab.lua | 12 +-- .config/nvim/lua/key/Autocomplete.lua | 9 +- .config/nvim/lua/key/Comment.lua | 7 +- .config/nvim/lua/key/Common.lua | 25 +++-- .config/nvim/lua/key/Filetree.lua | 5 +- .config/nvim/lua/key/Fold.lua | 9 +- .config/nvim/lua/key/Gitsigns.lua | 5 +- .config/nvim/lua/key/Leader.lua | 3 +- .config/nvim/lua/key/Lsp.lua | 2 +- .config/nvim/lua/key/Navigation.lua | 56 +++++------ .config/nvim/lua/key/Rekey.lua | 26 +++-- .config/nvim/lua/key/Sort.lua | 4 + .config/nvim/lua/key/Telescope.lua | 14 +-- .config/nvim/lua/key/Terminal.lua | 9 +- .config/nvim/lua/key/Todo.lua | 5 +- .config/nvim/lua/key/Trouble.lua | 5 +- .config/nvim/lua/key/Update.lua | 7 +- .config/nvim/lua/key/Whichkey.lua | 1 + .config/nvim/lua/plugin/Align.lua | 11 +-- .config/nvim/lua/plugin/Autoclose.lua | 12 +-- .config/nvim/lua/plugin/Closebuffers.lua | 12 +-- .config/nvim/lua/plugin/Filetree.lua | 11 +-- .config/nvim/lua/plugin/Fold.lua | 3 +- .config/nvim/lua/plugin/Gitsigns.lua | 54 +++++------ .config/nvim/lua/plugin/Gruvbox.lua | 2 +- .config/nvim/lua/plugin/Indent.lua | 14 +-- .config/nvim/lua/plugin/Init.lua | 52 +++++----- .config/nvim/lua/plugin/Lualine.lua | 78 +++++++-------- .config/nvim/lua/plugin/Telescope.lua | 39 ++------ .config/nvim/lua/plugin/Todo.lua | 115 ++++++++++------------- .config/nvim/lua/plugin/Tokyonight.lua | 54 ++++------- .config/nvim/lua/plugin/Treesitter.lua | 40 ++++---- .config/nvim/lua/plugin/Trouble.lua | 2 +- .config/nvim/lua/plugin/lsp/Init.lua | 8 +- .config/nvim/lua/plugin/lsp/Kotlin.lua | 2 +- .config/nvim/lua/plugin/lsp/Python.lua | 2 +- .config/nvim/lua/plugin/lsp/Rust.lua | 5 +- .config/nvim/lua/plugin/lsp/Tex.lua | 34 ++++--- 41 files changed, 398 insertions(+), 410 deletions(-) create mode 100644 .config/nvim/lua/key/Sort.lua diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 983c494..9e8e67c 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -3,21 +3,22 @@ require("key/Leader") require("plugin/Init") require("config/Autoread") +require("config/Etc") require("config/Search") require("config/Tab") -require("config/Etc") -require("key/Filetree") -require("key/Lsp") -require("key/Whichkey") -require("key/Navigation") -require("key/Comment") -require("key/Gitsigns") -require("key/Trouble") -require("key/Terminal") require("key/Autocomplete") -require("key/Telescope") +require("key/Comment") require("key/Common") -require("key/Todo") +require("key/Filetree") require("key/Fold") +require("key/Gitsigns") +require("key/Lsp") +require("key/Navigation") +require("key/Sort") +require("key/Telescope") +require("key/Terminal") +require("key/Todo") +require("key/Trouble") require("key/Update") +require("key/Whichkey") diff --git a/.config/nvim/lua/config/Etc.lua b/.config/nvim/lua/config/Etc.lua index f9ec33b..068f87d 100644 --- a/.config/nvim/lua/config/Etc.lua +++ b/.config/nvim/lua/config/Etc.lua @@ -1,21 +1,24 @@ --- TODO: add comments and separate files. -vim.opt.number = true -vim.opt.wildmode = 'longest,list' --- vim.opt.completeopt = 'menuone,noselect' +-- TODO: Add comments and separate files. +vim.opt.clipboard = "unnamedplus" +-- vim.opt.completeopt = "menuone,noselect" vim.opt.cursorline = true -vim.opt.ttyfast = true -vim.opt.splitright = true -vim.opt.splitbelow = true -vim.opt.clipboard = 'unnamedplus' vim.opt.fixeol = false +vim.opt.number = true +vim.opt.splitbelow = true +vim.opt.splitright = true vim.opt.termguicolors = true +vim.opt.ttyfast = true +vim.opt.wildmode = "longest,list" +-- Disable continuing comments on newline. vim.cmd("autocmd BufEnter * set fo-=c fo-=r fo-=o") -vim.cmd("set mouse=") -- disable mouse. --- disable signs for diagnostics. +-- Disable mouse. +vim.cmd("set mouse=") + +-- Disable signs for diagnostics. vim.diagnostic.config({ signs = false }) --- Display for invisible characters. +-- Display invisible characters. -- vim.cmd("set list listchars=tab:>\\ ,trail:-,eol:,lead:.") vim.cmd("set list listchars=tab:>\\ ,trail:-,lead:.") diff --git a/.config/nvim/lua/config/Search.lua b/.config/nvim/lua/config/Search.lua index 64e9146..08e709e 100644 --- a/.config/nvim/lua/config/Search.lua +++ b/.config/nvim/lua/config/Search.lua @@ -1,5 +1,5 @@ -vim.opt.ignorecase = true -vim.opt.smartcase = true -vim.opt.showmatch = true vim.opt.hlsearch = true +vim.opt.ignorecase = true vim.opt.incsearch = true +vim.opt.showmatch = true +vim.opt.smartcase = true diff --git a/.config/nvim/lua/config/Tab.lua b/.config/nvim/lua/config/Tab.lua index 230a8cb..ef4af91 100644 --- a/.config/nvim/lua/config/Tab.lua +++ b/.config/nvim/lua/config/Tab.lua @@ -1,9 +1,9 @@ -vim.opt.shiftwidth = 2 -vim.opt.tabstop = 2 -vim.opt.softtabstop = 2 --- vim.opt.smartindent = true -vim.opt.expandtab = false vim.opt.autoindent = true +vim.opt.expandtab = false +vim.opt.shiftwidth = 2 +-- vim.opt.smartindent = true +vim.opt.softtabstop = 2 +vim.opt.tabstop = 2 --- fix for markdown. +-- Disable Markdown forced formatting. vim.g.markdown_recommended_style = 0 diff --git a/.config/nvim/lua/key/Autocomplete.lua b/.config/nvim/lua/key/Autocomplete.lua index 809ea51..dca6c7b 100644 --- a/.config/nvim/lua/key/Autocomplete.lua +++ b/.config/nvim/lua/key/Autocomplete.lua @@ -1,4 +1,7 @@ -require('key/Rekey') +require("key/Rekey") -rekey_input('', '') -- autocomplete. -rekey_normal('', 'lua vim.lsp.buf.code_action()') -- LSP autocomplete. +-- Autocomplete. +rekey_input("", "") + +-- LSP autocomplete. +rekey_normal("", "lua vim.lsp.buf.code_action()") diff --git a/.config/nvim/lua/key/Comment.lua b/.config/nvim/lua/key/Comment.lua index 3488181..3991e1d 100644 --- a/.config/nvim/lua/key/Comment.lua +++ b/.config/nvim/lua/key/Comment.lua @@ -1,2 +1,5 @@ -vim.keymap.set("n", "/", require("SingleComment").SingleComment, { expr = true }) -- toggle comment for selected line. -vim.keymap.set("v", "/", require("SingleComment").Comment, {}) -- toggle comment for selected lines. +-- Toggle comment for the selected line. +vim.keymap.set("n", "/", require("SingleComment").SingleComment, { expr = true }) + +-- Toggle comments for multiple lines. +vim.keymap.set("v", "/", require("SingleComment").Comment, {}) diff --git a/.config/nvim/lua/key/Common.lua b/.config/nvim/lua/key/Common.lua index fd61bc0..0bc08c5 100644 --- a/.config/nvim/lua/key/Common.lua +++ b/.config/nvim/lua/key/Common.lua @@ -1,4 +1,4 @@ -require('key/Rekey') +require("key/Rekey") -- Write all we can and exit. Created this to drop non-writable stuff when piping to nvim. function bye() @@ -6,12 +6,19 @@ function bye() vim.cmd[[qa!]] end -rekey_normal('.', '@:') -- Repeat command. -rekey_visual('.', '@:') -- Repeat command. -rekey_normal('zz', 'wa') -- Save all files. -rekey_normal('z', 'lua bye()') -- Save & quit all. -rekey_normal('v', 'v') -- Visual select (duplicate). --- rekey_normal('y', '"+y') -- Copy to system clipboard. +-- Repeat previous command. +rekey_normal(".", "@:") +rekey_visual(".", "@:") -rekey_normal(';', ':') -- remap ; to :. -rekey_visual(';', ':') -- remap ; to :. +-- Save everything. +rekey_normal("zz", "wa") + +-- Save all we can and leave. +rekey_normal("z", "lua bye()") + +-- Compatibility alias for visual selection. +rekey_normal("v", "v") + +-- Remap ; to :. +rekey_normal(";", ":") +rekey_visual(";", ":") diff --git a/.config/nvim/lua/key/Filetree.lua b/.config/nvim/lua/key/Filetree.lua index d077273..281fd7f 100644 --- a/.config/nvim/lua/key/Filetree.lua +++ b/.config/nvim/lua/key/Filetree.lua @@ -1,3 +1,4 @@ -require('key/Rekey') +require("key/Rekey") -rekey_normal('1', 'NvimTreeToggle') -- toggle file tree. +-- Toggle file tree. +rekey_normal("1", "NvimTreeToggle") diff --git a/.config/nvim/lua/key/Fold.lua b/.config/nvim/lua/key/Fold.lua index 413592a..d34e3a7 100644 --- a/.config/nvim/lua/key/Fold.lua +++ b/.config/nvim/lua/key/Fold.lua @@ -1,4 +1,7 @@ -require('key/Rekey') +require("key/Rekey") -remap_normal('o', 'za') -- toggle fold. -remap_normal('O', 'zM') -- fold everything. +-- Toggle fold under cursor. +remap_normal("o", "za") + +-- Fold everything. +remap_normal("O", "zM") diff --git a/.config/nvim/lua/key/Gitsigns.lua b/.config/nvim/lua/key/Gitsigns.lua index 527a57e..735c054 100644 --- a/.config/nvim/lua/key/Gitsigns.lua +++ b/.config/nvim/lua/key/Gitsigns.lua @@ -1,3 +1,4 @@ -require('key/Rekey') +require("key/Rekey") -rekey_normal('g', 'Gitsigns toggle_current_line_blameGitsigns toggle_word_diffGitsigns toggle_linehl') -- toggle git inspection mode. +-- Toggle Git inspection mode. +rekey_normal("g", "Gitsigns toggle_current_line_blameGitsigns toggle_word_diffGitsigns toggle_linehl") diff --git a/.config/nvim/lua/key/Leader.lua b/.config/nvim/lua/key/Leader.lua index c76c055..c47be11 100644 --- a/.config/nvim/lua/key/Leader.lua +++ b/.config/nvim/lua/key/Leader.lua @@ -4,5 +4,6 @@ leader = " " vim.g.mapleader = leader vim.g.maplocalleader = leader --- vim.api.nvim_set_keymap('', '', '', { noremap = true, silent = true }) + +-- Disable key press timeout. vim.cmd("set notimeout nottimeout") diff --git a/.config/nvim/lua/key/Lsp.lua b/.config/nvim/lua/key/Lsp.lua index ca38705..da57c15 100644 --- a/.config/nvim/lua/key/Lsp.lua +++ b/.config/nvim/lua/key/Lsp.lua @@ -1 +1 @@ -require('key/Rekey') +require("key/Rekey") diff --git a/.config/nvim/lua/key/Navigation.lua b/.config/nvim/lua/key/Navigation.lua index 6228192..c92c32c 100644 --- a/.config/nvim/lua/key/Navigation.lua +++ b/.config/nvim/lua/key/Navigation.lua @@ -1,37 +1,31 @@ -require('key/Rekey') +require("key/Rekey") --- switch windows. -rekey_normal('w', 'k') -rekey_normal('a', 'h') -rekey_normal('s', 'j') -rekey_normal('d', 'l') +-- Switch windows. +rekey_normal("a", "h") +rekey_normal("d", "l") +rekey_normal("s", "j") +rekey_normal("w", "k") --- switch buffers. --- rekey_normal('', 'bnext') -rekey_normal('e', 'BufferLineCycleNext') -rekey_normal('q', 'BufferLineCyclePrev') -rekey_normal('E', 'BufferLineMoveNext') -rekey_normal('Q', 'BufferLineMovePrev') +-- Switch buffers. +rekey_normal("E", "BufferLineMoveNext") +rekey_normal("Q", "BufferLineMovePrev") +rekey_normal("e", "BufferLineCycleNext") +rekey_normal("q", "BufferLineCyclePrev") --- close buffer. --- rekey_normal('x', 'bd!') -rekey_normal('x', 'bpspbnbd') +-- Close buffer. +rekey_normal("x", "bpspbnbd") --- splits. -rekey_normal('\\', 'vsplit') -rekey_normal('-', 'split') -rekey_normal('=', '=') -- equalize split sizes. -rekey_normal('c', 'q') -- Close split. -rekey_normal('W', '2-') -rekey_normal('S', '2+') -rekey_normal('A', '4<') -rekey_normal('D', '4>') +-- Close all hidden buffers. +rekey_normal("X", "BDelete hidden") --- close all hidden buffers. -rekey_normal('X', 'BDelete hidden') +-- Splits. +rekey_normal("\\", "vsplit") +rekey_normal("-", "split") +rekey_normal("=", "=") -- Equalize split sizes. +rekey_normal("c", "q") -- Close split. --- navigate hjkl in insert mode. -rekey_input('', '') -rekey_input('', '') -rekey_input('', '') -rekey_input('', '') +-- Resize splits. +rekey_normal("A", "4<") +rekey_normal("D", "4>") +rekey_normal("S", "2+") +rekey_normal("W", "2-") diff --git a/.config/nvim/lua/key/Rekey.lua b/.config/nvim/lua/key/Rekey.lua index 286042f..314e975 100644 --- a/.config/nvim/lua/key/Rekey.lua +++ b/.config/nvim/lua/key/Rekey.lua @@ -1,39 +1,49 @@ +-- Base rekey function. local function rekey(t, key, command) vim.api.nvim_set_keymap(t, key, command, { noremap = true }) end +-- Base remap function. local function remap(t, key, command) vim.api.nvim_set_keymap(t, key, command, { noremap = false }) end +-- Rekey in normal mode. function rekey_normal(key, command) - rekey('n', key, command) + rekey("n", key, command) end +-- Rekey in input mode. function rekey_input(key, command) - rekey('i', key, command) + rekey("i", key, command) end +-- Rekey in visual mode. function rekey_visual(key, command) - rekey('v', key, command) + rekey("v", key, command) end +-- Rekey in terminal mode. function rekey_terminal(key, command) - rekey('t', key, command) + rekey("t", key, command) end +-- Remap in normal mode. function remap_normal(key, command) - remap('n', key, command) + remap("n", key, command) end +-- Remap in input mode. function remap_input(key, command) - remap('i', key, command) + remap("i", key, command) end +-- Remap in visual mode. function remap_visual(key, command) - remap('v', key, command) + remap("v", key, command) end +-- Remap in terminal mode. function remap_terminal(key, command) - remap('t', key, command) + remap("t", key, command) end diff --git a/.config/nvim/lua/key/Sort.lua b/.config/nvim/lua/key/Sort.lua new file mode 100644 index 0000000..477b3fb --- /dev/null +++ b/.config/nvim/lua/key/Sort.lua @@ -0,0 +1,4 @@ +require("key/Rekey") + +-- Sort visual selection alphabetically. +rekey_visual("A", ":'<,'>sort") diff --git a/.config/nvim/lua/key/Telescope.lua b/.config/nvim/lua/key/Telescope.lua index 3bbb204..6c2c257 100644 --- a/.config/nvim/lua/key/Telescope.lua +++ b/.config/nvim/lua/key/Telescope.lua @@ -1,8 +1,8 @@ -require('key/Rekey') +require("key/Rekey") -rekey_normal('ff', 'lua require("telescope.builtin").find_files()') -rekey_normal('fg', 'lua require("telescope.builtin").live_grep()') -rekey_normal('fb', 'lua require("telescope.builtin").buffers()') -rekey_normal('fh', 'lua require("telescope.builtin").help_tags()') -rekey_normal('ft', 'Telescope treesitter') -rekey_normal('fa', 'Telescope') +rekey_normal("fa", "Telescope") +rekey_normal("fb", "lua require('telescope.builtin').buffers()") +rekey_normal("ff", "lua require('telescope.builtin').find_files()") +rekey_normal("fg", "lua require('telescope.builtin').live_grep()") +rekey_normal("fh", "lua require('telescope.builtin').help_tags()") +rekey_normal("ft", "Telescope treesitter") diff --git a/.config/nvim/lua/key/Terminal.lua b/.config/nvim/lua/key/Terminal.lua index cf50114..bd384e0 100644 --- a/.config/nvim/lua/key/Terminal.lua +++ b/.config/nvim/lua/key/Terminal.lua @@ -1,4 +1,7 @@ -require('key/Rekey') +require("key/Rekey") -rekey_normal('4', 'terminal') -rekey_terminal('', '') +-- Open terminal window. +rekey_normal("4", "terminal") + +-- Detach from terminal with Esc key. +rekey_terminal("", "") diff --git a/.config/nvim/lua/key/Todo.lua b/.config/nvim/lua/key/Todo.lua index d852422..58a9b33 100644 --- a/.config/nvim/lua/key/Todo.lua +++ b/.config/nvim/lua/key/Todo.lua @@ -1,3 +1,4 @@ -require('key/Rekey') +require("key/Rekey") -rekey_normal('3', 'TroubleToggle todo') +-- Toggle To-do window. +rekey_normal("3", "TroubleToggle todo") diff --git a/.config/nvim/lua/key/Trouble.lua b/.config/nvim/lua/key/Trouble.lua index db7605b..f67cf42 100644 --- a/.config/nvim/lua/key/Trouble.lua +++ b/.config/nvim/lua/key/Trouble.lua @@ -1,3 +1,4 @@ -require('key/Rekey') +require("key/Rekey") -rekey_normal('2', 'TroubleToggle document_diagnostics') +-- Toggle diagnostics window. +rekey_normal("2", "TroubleToggle document_diagnostics") diff --git a/.config/nvim/lua/key/Update.lua b/.config/nvim/lua/key/Update.lua index 8657484..f2fcca6 100644 --- a/.config/nvim/lua/key/Update.lua +++ b/.config/nvim/lua/key/Update.lua @@ -1,4 +1,5 @@ -vim.api.nvim_create_user_command('Update', function (args) - vim.cmd('PackerUpdate') - vim.cmd('TSUpdate') +-- Update all command. +vim.api.nvim_create_user_command("Update", function (args) + vim.cmd("PackerUpdate") + vim.cmd("TSUpdate") end, { desc = "Update everything." }) diff --git a/.config/nvim/lua/key/Whichkey.lua b/.config/nvim/lua/key/Whichkey.lua index 257a49c..d4edb6d 100644 --- a/.config/nvim/lua/key/Whichkey.lua +++ b/.config/nvim/lua/key/Whichkey.lua @@ -1,3 +1,4 @@ require("key/Rekey") +-- Show keymap help. rekey_normal("?", "WhichKey") diff --git a/.config/nvim/lua/plugin/Align.lua b/.config/nvim/lua/plugin/Align.lua index 8bb6610..7db2b57 100644 --- a/.config/nvim/lua/plugin/Align.lua +++ b/.config/nvim/lua/plugin/Align.lua @@ -1,8 +1,7 @@ -require('mini.align').setup { - -- Module mappings. Use `''` (empty string) to disable one. - mappings = { - start = 'a', - start_with_preview = 'A', - }, +require("mini.align").setup { + mappings = { + start = "a", + -- start_with_preview = 'A', + }, } diff --git a/.config/nvim/lua/plugin/Autoclose.lua b/.config/nvim/lua/plugin/Autoclose.lua index 7ce50eb..e932054 100644 --- a/.config/nvim/lua/plugin/Autoclose.lua +++ b/.config/nvim/lua/plugin/Autoclose.lua @@ -1,11 +1,11 @@ require("autoclose").setup({ keys = { - ["\""] = { escape = true, close = true, pair = "\"\"", disabled_filetypes = {} }, - ["'"] = { escape = false, close = false, pair = "''", disabled_filetypes = {} }, - ["{"] = { escape = true, close = true, pair = "{}", disabled_filetypes = {} }, - ["("] = { escape = true, close = true, pair = "()", disabled_filetypes = {} }, - ["<"] = { escape = true, close = true, pair = "<>", disabled_filetypes = {} }, - ["`"] = { escape = true, close = true, pair = "``", disabled_filetypes = {} }, + ["'"] = { escape = false, close = false, pair = "''", disabled_filetypes = {} }, + ["("] = { escape = true, close = true, pair = "()", disabled_filetypes = {} }, + ["<"] = { escape = true, close = true, pair = "<>", disabled_filetypes = {} }, + ["\""] = { escape = true, close = true, pair = "\"\"", disabled_filetypes = {} }, + ["`"] = { escape = true, close = true, pair = "``", disabled_filetypes = {} }, + ["{"] = { escape = true, close = true, pair = "{}", disabled_filetypes = {} }, }, -- options = { -- disabled_filetypes = { "text", "markdown" }, diff --git a/.config/nvim/lua/plugin/Closebuffers.lua b/.config/nvim/lua/plugin/Closebuffers.lua index 1451515..a1f2906 100644 --- a/.config/nvim/lua/plugin/Closebuffers.lua +++ b/.config/nvim/lua/plugin/Closebuffers.lua @@ -1,7 +1,7 @@ -require('close_buffers').setup({ - filetype_ignore = {}, -- Filetype to ignore when running deletions - file_glob_ignore = {}, -- File name glob pattern to ignore when running deletions (e.g. '*.md') - file_regex_ignore = {}, -- File name regex pattern to ignore when running deletions (e.g. '.*[.]md') - preserve_window_layout = { 'this', 'nameless' }, -- Types of deletion that should preserve the window layout - next_buffer_cmd = nil, -- Custom function to retrieve the next buffer when preserving window layout +require("close_buffers").setup({ + file_glob_ignore = {}, + file_regex_ignore = {}, + filetype_ignore = {}, + next_buffer_cmd = nil, + preserve_window_layout = { "this", "nameless" }, }) diff --git a/.config/nvim/lua/plugin/Filetree.lua b/.config/nvim/lua/plugin/Filetree.lua index 07e7bf6..1bdf76d 100644 --- a/.config/nvim/lua/plugin/Filetree.lua +++ b/.config/nvim/lua/plugin/Filetree.lua @@ -1,14 +1,11 @@ --- disable netrw at the very start of your init.lua +-- Disable netrw at the very start of your init.lua. vim.g.loaded_netrw = 1 vim.g.loaded_netrwPlugin = 1 --- set termguicolors to enable highlight groups +-- Set termguicolors to enable highlight groups. vim.opt.termguicolors = true --- empty setup using defaults --- require("nvim-tree").setup() - --- OR setup with some options +-- Setup nvim-tree. require("nvim-tree").setup({ sort_by = "case_sensitive", view = { @@ -18,7 +15,7 @@ require("nvim-tree").setup({ group_empty = true, }, filters = { - dotfiles = false, + dotfiles = false, git_ignored = false }, }) diff --git a/.config/nvim/lua/plugin/Fold.lua b/.config/nvim/lua/plugin/Fold.lua index e9c6a34..b088a28 100644 --- a/.config/nvim/lua/plugin/Fold.lua +++ b/.config/nvim/lua/plugin/Fold.lua @@ -1,4 +1,3 @@ -vim.opt.foldmethod = "expr" vim.opt.foldexpr = "nvim_treesitter#foldexpr()" vim.opt.foldlevel = 99 --- vim.api.nvim_create_autocmd({ "BufEnter" }, { pattern = { "*" }, command = "normal zx zR", }) -- telescope fix. +vim.opt.foldmethod = "expr" diff --git a/.config/nvim/lua/plugin/Gitsigns.lua b/.config/nvim/lua/plugin/Gitsigns.lua index 8f085a9..af3ff40 100644 --- a/.config/nvim/lua/plugin/Gitsigns.lua +++ b/.config/nvim/lua/plugin/Gitsigns.lua @@ -1,43 +1,43 @@ -require('gitsigns').setup { +require("gitsigns").setup { signs = { - add = { text = '│' }, - change = { text = '│' }, - delete = { text = '_' }, - topdelete = { text = '‾' }, - changedelete = { text = '~' }, - untracked = { text = '┆' }, + add = { text = "│" }, + change = { text = "│" }, + changedelete = { text = "~" }, + delete = { text = "_" }, + topdelete = { text = "‾" }, + untracked = { text = "┆" }, }, - signcolumn = false, -- Toggle with `:Gitsigns toggle_signs` - numhl = true, -- Toggle with `:Gitsigns toggle_numhl` - linehl = false, -- Toggle with `:Gitsigns toggle_linehl` - word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` + linehl = false, + numhl = true, + signcolumn = false, + word_diff = false, watch_gitdir = { follow_files = true }, attach_to_untracked = true, - current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame` + current_line_blame = false, current_line_blame_opts = { - virt_text = true, - virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' - delay = 1000, + delay = 1000, ignore_whitespace = false, + virt_text = true, + virt_text_pos = "eol", }, - current_line_blame_formatter = ', - ', - sign_priority = 6, - update_debounce = 100, - status_formatter = nil, -- Use default - max_file_length = 40000, -- Disable if file is longer than this (in lines) + current_line_blame_formatter = ", - ", + max_file_length = 40000, + sign_priority = 6, + status_formatter = nil, + update_debounce = 100, preview_config = { - -- Options passed to nvim_open_win - border = 'single', - style = 'minimal', - relative = 'cursor', - row = 0, - col = 1 + border = "single", + col = 1 + relative = "cursor", + row = 0, + style = "minimal", }, yadm = { enable = false }, } -vim.cmd('highlight gitsignscurrentlineblame guibg=#00000000 guifg=#aaaaaa') +-- Set custom color. +vim.cmd("highlight gitsignscurrentlineblame guibg=#00000000 guifg=#aaaaaa") diff --git a/.config/nvim/lua/plugin/Gruvbox.lua b/.config/nvim/lua/plugin/Gruvbox.lua index 89523ab..50c976d 100644 --- a/.config/nvim/lua/plugin/Gruvbox.lua +++ b/.config/nvim/lua/plugin/Gruvbox.lua @@ -1 +1 @@ -vim.cmd('colorscheme gruvbox-material') +vim.cmd("colorscheme gruvbox-material") diff --git a/.config/nvim/lua/plugin/Indent.lua b/.config/nvim/lua/plugin/Indent.lua index 0f8f523..279f4f7 100644 --- a/.config/nvim/lua/plugin/Indent.lua +++ b/.config/nvim/lua/plugin/Indent.lua @@ -1,12 +1,6 @@ -require('indent-o-matic').setup { - -- The values indicated here are the defaults - - -- Number of lines without indentation before giving up (use -1 for infinite) - max_lines = 1024, - - -- Space indentations that should be detected +-- Auto-detect indentation type. +require("indent-o-matic").setup { + max_lines = 1024, + skip_multiline = true, standard_widths = { 2, 4, 8 }, - - -- Skip multi-line comments and strings (more accurate detection but less performant) - skip_multiline = true, } diff --git a/.config/nvim/lua/plugin/Init.lua b/.config/nvim/lua/plugin/Init.lua index dfe9710..bac49bd 100644 --- a/.config/nvim/lua/plugin/Init.lua +++ b/.config/nvim/lua/plugin/Init.lua @@ -21,44 +21,33 @@ local available = function(commands) end return require("packer").startup(function(use) - --[[ - host requirements - - gcc-c++ - ]]-- - - use "https://git.voronind.com/mirror/packer.nvim.git" - use "https://git.voronind.com/mirror/nvim-web-devicons.git" - use "https://git.voronind.com/mirror/nvim-tree.lua.git" - use "https://git.voronind.com/mirror/nvim-lspconfig.git" - use "https://git.voronind.com/mirror/which-key.nvim.git" - use "https://git.voronind.com/mirror/bufferline.nvim.git" use "https://git.voronind.com/mirror/SingleComment.nvim.git" - use "https://git.voronind.com/mirror/lualine.nvim.git" use "https://git.voronind.com/mirror/autoclose.nvim.git" - use "https://git.voronind.com/mirror/mason.nvim.git" - use "https://git.voronind.com/mirror/mason-lspconfig.nvim.git" - use "https://git.voronind.com/mirror/gitsigns.nvim.git" - use "https://git.voronind.com/mirror/trouble.nvim.git" - use "https://git.voronind.com/mirror/tokyonight.nvim.git" + use "https://git.voronind.com/mirror/bufferline.nvim.git" use "https://git.voronind.com/mirror/close-buffers.nvim.git" - use "https://git.voronind.com/mirror/plenary.nvim.git" - use "https://git.voronind.com/mirror/telescope.nvim.git" - use "https://git.voronind.com/mirror/nvim-treesitter.git" - use "https://git.voronind.com/mirror/todo-comments.nvim.git" + use "https://git.voronind.com/mirror/gitsigns.nvim.git" use "https://git.voronind.com/mirror/gruvbox-material.git" use "https://git.voronind.com/mirror/indent-o-matic.git" + use "https://git.voronind.com/mirror/lualine.nvim.git" + use "https://git.voronind.com/mirror/mason-lspconfig.nvim.git" + use "https://git.voronind.com/mirror/mason.nvim.git" use "https://git.voronind.com/mirror/mini.align.git" + use "https://git.voronind.com/mirror/nvim-lspconfig.git" + use "https://git.voronind.com/mirror/nvim-tree.lua.git" + use "https://git.voronind.com/mirror/nvim-treesitter.git" + use "https://git.voronind.com/mirror/nvim-web-devicons.git" + use "https://git.voronind.com/mirror/packer.nvim.git" + use "https://git.voronind.com/mirror/plenary.nvim.git" + use "https://git.voronind.com/mirror/telescope.nvim.git" + use "https://git.voronind.com/mirror/todo-comments.nvim.git" + use "https://git.voronind.com/mirror/tokyonight.nvim.git" + use "https://git.voronind.com/mirror/trouble.nvim.git" + use "https://git.voronind.com/mirror/which-key.nvim.git" - -- Automatically set up your configuration after cloning packer.nvim - -- Put this at the end after all plugins - if packer_bootstrap then - require("packer").sync() - end - - -- plugin toggles. + -- Plugin toggles. local treesitter = true - -- plugin setup. + -- Plugin setup. Order is important. require("plugin/Mason") require("plugin/lsp/Init") require("plugin/Filetree") @@ -81,4 +70,9 @@ return require("packer").startup(function(use) require("plugin/Fold") end end + + -- Auto-install. + if packer_bootstrap then + require("packer").sync() + end end) diff --git a/.config/nvim/lua/plugin/Lualine.lua b/.config/nvim/lua/plugin/Lualine.lua index 8ac4840..4f24b04 100644 --- a/.config/nvim/lua/plugin/Lualine.lua +++ b/.config/nvim/lua/plugin/Lualine.lua @@ -1,40 +1,40 @@ -require('lualine').setup { - options = { - icons_enabled = true, - -- theme = 'ayu_mirage', - component_separators = { left = '', right = ''}, - section_separators = { left = '', right = ''}, - disabled_filetypes = { - statusline = {}, - winbar = {}, - }, - ignore_focus = {}, - always_divide_middle = true, - globalstatus = false, - refresh = { - statusline = 1000, - tabline = 1000, - winbar = 1000, - } - }, - sections = { - lualine_a = {'mode'}, - lualine_b = {'branch', 'diff', 'diagnostics'}, - lualine_c = {'filename'}, - lualine_x = {'encoding', 'fileformat', 'filetype'}, - lualine_y = {'progress'}, - lualine_z = {'location'} - }, - inactive_sections = { - lualine_a = {}, - lualine_b = {}, - lualine_c = {'filename'}, - lualine_x = {'location'}, - lualine_y = {}, - lualine_z = {} - }, - tabline = {}, - winbar = {}, - inactive_winbar = {}, - extensions = {} +require("lualine").setup { + options = { + -- theme = "ayu_mirage", + icons_enabled = true, + component_separators = { left = "", right = ""}, + section_separators = { left = "", right = ""}, + disabled_filetypes = { + statusline = {}, + winbar = {}, + }, + always_divide_middle = true, + globalstatus = false, + ignore_focus = {}, + refresh = { + statusline = 1000, + tabline = 1000, + winbar = 1000, + } + }, + sections = { + lualine_a = {"mode"}, + lualine_b = {"branch", "diff", "diagnostics"}, + lualine_c = {"filename"}, + lualine_x = {"encoding", "fileformat", "filetype"}, + lualine_y = {"progress"}, + lualine_z = {"location"} + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = {"filename"}, + lualine_x = {"location"}, + lualine_y = {}, + lualine_z = {} + }, + extensions = {} + inactive_winbar = {}, + tabline = {}, + winbar = {}, } diff --git a/.config/nvim/lua/plugin/Telescope.lua b/.config/nvim/lua/plugin/Telescope.lua index 9808531..25d731b 100644 --- a/.config/nvim/lua/plugin/Telescope.lua +++ b/.config/nvim/lua/plugin/Telescope.lua @@ -1,30 +1,11 @@ -require('telescope').setup{ - defaults = { - -- Default configuration for telescope goes here: - -- config_key = value, - mappings = { - i = { - -- map actions.which_key to (default: ) - -- actions.which_key shows the mappings for your picker, - -- e.g. git_{create, delete, ...}_branch for the git_branches picker - [""] = "which_key" - } - } - }, - pickers = { - -- Default configuration for builtin pickers goes here: - -- picker_name = { - -- picker_config_key = value, - -- ... - -- } - -- Now the picker_config_key will be applied every time you call this - -- builtin picker - }, - extensions = { - -- Your extension configuration goes here: - -- extension_name = { - -- extension_config_key = value, - -- } - -- please take a look at the readme of the extension you want to configure - } +require("telescope").setup{ + defaults = { + mappings = { + i = { + [""] = "which_key" + } + } + }, + extensions = { } + pickers = { }, } diff --git a/.config/nvim/lua/plugin/Todo.lua b/.config/nvim/lua/plugin/Todo.lua index b7d838e..4d56b34 100644 --- a/.config/nvim/lua/plugin/Todo.lua +++ b/.config/nvim/lua/plugin/Todo.lua @@ -1,64 +1,53 @@ -require('todo-comments').setup { - signs = false, -- show icons in the signs column - sign_priority = 8, -- sign priority - -- keywords recognized as todo comments - keywords = { - FIX = { - icon = " ", -- icon used for the sign, and in search results - color = "error", -- can be a hex color, or a named color (see below) - alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords - -- signs = false, -- configure signs for some keywords individually - }, - TODO = { icon = " ", color = "info" }, - HACK = { icon = " ", color = "warning" }, - WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } }, - PERF = { icon = " ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } }, - NOTE = { icon = " ", color = "hint", alt = { "INFO" } }, - TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } }, - }, - gui_style = { - fg = "NONE", -- The gui style to use for the fg highlight group. - bg = "BOLD", -- The gui style to use for the bg highlight group. - }, - merge_keywords = true, -- when true, custom keywords will be merged with the defaults - -- highlighting of the line containing the todo comment - -- * before: highlights before the keyword (typically comment characters) - -- * keyword: highlights of the keyword - -- * after: highlights after the keyword (todo text) - highlight = { - multiline = true, -- enable multine todo comments - multiline_pattern = "^.", -- lua pattern to match the next multiline from the start of the matched keyword - multiline_context = 10, -- extra lines that will be re-evaluated when changing a line - before = "", -- "fg" or "bg" or empty - keyword = "wide", -- "fg", "bg", "wide", "wide_bg", "wide_fg" or empty. (wide and wide_bg is the same as bg, but will also highlight surrounding characters, wide_fg acts accordingly but with fg) - after = "fg", -- "fg" or "bg" or empty - pattern = [[.*<(KEYWORDS)\s*:]], -- pattern or table of patterns, used for highlighting (vim regex) - comments_only = true, -- uses treesitter to match keywords in comments only - max_line_len = 400, -- ignore lines longer than this - exclude = {}, -- list of file types to exclude highlighting - }, - -- list of named colors where we try to extract the guifg from the - -- list of highlight groups or use the hex color if hl not found as a fallback - colors = { - error = { "DiagnosticError", "ErrorMsg", "#DC2626" }, - warning = { "DiagnosticWarn", "WarningMsg", "#FBBF24" }, - info = { "DiagnosticInfo", "#2563EB" }, - hint = { "DiagnosticHint", "#10B981" }, - default = { "Identifier", "#7C3AED" }, - test = { "Identifier", "#FF00FF" } - }, - search = { - command = "rg", - args = { - "--color=never", - "--no-heading", - "--with-filename", - "--line-number", - "--column", - }, - -- regex that will be used to match keywords. - -- don't replace the (KEYWORDS) placeholder - pattern = [[\b(KEYWORDS):]], -- ripgrep regex - -- pattern = [[\b(KEYWORDS)\b]], -- match without the extra colon. You'll likely get false positives - }, +require("todo-comments").setup { + sign_priority = 8, + signs = false, + keywords = { + FIX = { + alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, + color = "error", + icon = " ", + }, + HACK = { icon = " ", color = "warning" }, + NOTE = { icon = " ", color = "hint", alt = { "INFO" } }, + PERF = { icon = " ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } }, + TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } }, + TODO = { icon = " ", color = "info" }, + WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } }, + }, + gui_style = { + bg = "BOLD", + fg = "NONE", + }, + merge_keywords = true, + highlight = { + after = "fg", + before = "", + comments_only = true, + exclude = {}, + keyword = "wide", + max_line_len = 400, + multiline = true, + multiline_context = 10, + multiline_pattern = "^.", + pattern = [[.*<(KEYWORDS)\s*:]], + }, + colors = { + default = { "Identifier", "#7C3AED" }, + error = { "DiagnosticError", "ErrorMsg", "#DC2626" }, + hint = { "DiagnosticHint", "#10B981" }, + info = { "DiagnosticInfo", "#2563EB" }, + test = { "Identifier", "#FF00FF" } + warning = { "DiagnosticWarn", "WarningMsg", "#FBBF24" }, + }, + search = { + command = "rg", + args = { + "--color=never", + "--no-heading", + "--with-filename", + "--line-number", + "--column", + }, + pattern = [[\b(KEYWORDS):]], + }, } diff --git a/.config/nvim/lua/plugin/Tokyonight.lua b/.config/nvim/lua/plugin/Tokyonight.lua index 2266662..667ee34 100644 --- a/.config/nvim/lua/plugin/Tokyonight.lua +++ b/.config/nvim/lua/plugin/Tokyonight.lua @@ -1,37 +1,23 @@ require("tokyonight").setup({ - -- your configuration comes here - -- or leave it empty to use the default settings - style = "night", -- The theme comes in three styles, `storm`, `moon`, a darker variant `night` and `day` - light_style = "night", -- The theme is used when the background is set to light - transparent = false, -- Enable this to disable setting the background color - terminal_colors = true, -- Configure the colors used when opening a `:terminal` in [Neovim](https://github.com/neovim/neovim) - styles = { - -- Style to be applied to different syntax groups - -- Value is any valid attr-list value for `:help nvim_set_hl` - comments = { italic = true }, - keywords = { italic = true }, - functions = {}, - variables = {}, - -- Background styles. Can be "dark", "transparent" or "normal" - sidebars = "dark", -- style for sidebars, see below - floats = "dark", -- style for floating windows - }, - sidebars = { "qf", "help" }, -- Set a darker background on sidebar-like windows. For example: `["qf", "vista_kind", "terminal", "packer"]` - day_brightness = 0.3, -- Adjusts the brightness of the colors of the **Day** style. Number between 0 and 1, from dull to vibrant colors - hide_inactive_statusline = false, -- Enabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard **StatusLine** and **LuaLine**. - dim_inactive = false, -- dims inactive windows - lualine_bold = false, -- When `true`, section headers in the lualine theme will be bold - - --- You can override specific color groups to use other groups or a hex color - --- function will be called with a ColorScheme table - ---@param colors ColorScheme - on_colors = function(colors) end, - - --- You can override specific highlights to use other groups or a hex color - --- function will be called with a Highlights and ColorScheme table - ---@param highlights Highlights - ---@param colors ColorScheme - on_highlights = function(highlights, colors) end, + light_style = "night", + style = "night", + terminal_colors = true, + transparent = false, + styles = { + comments = { italic = true }, + floats = "dark", + functions = {}, + keywords = { italic = true }, + sidebars = "dark", + variables = {}, + }, + day_brightness = 0.3, + dim_inactive = false, + hide_inactive_statusline = false, + lualine_bold = false, + on_colors = function(colors) end, + on_highlights = function(highlights, colors) end, + sidebars = { "qf", "help" }, }) -vim.cmd[[colorscheme tokyonight]] +-- vim.cmd[[colorscheme tokyonight]] diff --git a/.config/nvim/lua/plugin/Treesitter.lua b/.config/nvim/lua/plugin/Treesitter.lua index 4bc5cf9..5b6853c 100644 --- a/.config/nvim/lua/plugin/Treesitter.lua +++ b/.config/nvim/lua/plugin/Treesitter.lua @@ -1,23 +1,19 @@ -require('nvim-treesitter.configs').setup { - ensure_installed = "all", - sync_install = false, - auto_install = false, - -- ignore_install = { "javascript" }, - -- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")! - highlight = { - enable = true, - use_languagetree = true, - -- disable = { "c" }, - additional_vim_regex_highlighting = false, - }, - indent = { - enable = true, - -- disable = {"python"} - }, - autotag = { - enable = true - }, - rainbow = { - enable = true - }, +require("nvim-treesitter.configs").setup { + auto_install = false, + ensure_installed = "all", + sync_install = false, + highlight = { + additional_vim_regex_highlighting = false, + enable = true, + use_languagetree = true, + }, + indent = { + enable = true, + }, + autotag = { + enable = true + }, + rainbow = { + enable = true + }, } diff --git a/.config/nvim/lua/plugin/Trouble.lua b/.config/nvim/lua/plugin/Trouble.lua index 20c9bb7..38ef1e9 100644 --- a/.config/nvim/lua/plugin/Trouble.lua +++ b/.config/nvim/lua/plugin/Trouble.lua @@ -1 +1 @@ -require('trouble').setup() +require("trouble").setup() diff --git a/.config/nvim/lua/plugin/lsp/Init.lua b/.config/nvim/lua/plugin/lsp/Init.lua index 6029d69..31435f3 100644 --- a/.config/nvim/lua/plugin/lsp/Init.lua +++ b/.config/nvim/lua/plugin/lsp/Init.lua @@ -1,4 +1,4 @@ -require('plugin/lsp/Rust') --- require('plugin/lsp/Kotlin') --- require('plugin/lsp/Python') -require('plugin/lsp/Tex') +-- require("plugin/lsp/Kotlin") +-- require("plugin/lsp/Python") +require("plugin/lsp/Rust") +require("plugin/lsp/Tex") diff --git a/.config/nvim/lua/plugin/lsp/Kotlin.lua b/.config/nvim/lua/plugin/lsp/Kotlin.lua index 06891c4..e960df6 100644 --- a/.config/nvim/lua/plugin/lsp/Kotlin.lua +++ b/.config/nvim/lua/plugin/lsp/Kotlin.lua @@ -1,3 +1,3 @@ -local lspconfig = require('lspconfig') +local lspconfig = require("lspconfig") lspconfig.kotlin_language_server.setup {} diff --git a/.config/nvim/lua/plugin/lsp/Python.lua b/.config/nvim/lua/plugin/lsp/Python.lua index 07fefb3..5642869 100644 --- a/.config/nvim/lua/plugin/lsp/Python.lua +++ b/.config/nvim/lua/plugin/lsp/Python.lua @@ -1,3 +1,3 @@ -local lspconfig = require('lspconfig') +local lspconfig = require("lspconfig") lspconfig.pyright.setup {} diff --git a/.config/nvim/lua/plugin/lsp/Rust.lua b/.config/nvim/lua/plugin/lsp/Rust.lua index 1d7ef72..2ca5362 100644 --- a/.config/nvim/lua/plugin/lsp/Rust.lua +++ b/.config/nvim/lua/plugin/lsp/Rust.lua @@ -4,7 +4,10 @@ lspconfig.rust_analyzer.setup { settings = { ["rust-analyzer"] = { rustfmt = { - extraArgs = { "--config", "tab_spaces=2", "brace_style=AlwaysNextLine", "control_brace_style=AlwaysNextLine" } + extraArgs = { + "--config", + "hard_tabs=true", + } } }, }, diff --git a/.config/nvim/lua/plugin/lsp/Tex.lua b/.config/nvim/lua/plugin/lsp/Tex.lua index cca25f7..617a778 100644 --- a/.config/nvim/lua/plugin/lsp/Tex.lua +++ b/.config/nvim/lua/plugin/lsp/Tex.lua @@ -1,8 +1,19 @@ local lspconfig = require('lspconfig') local config = { - filetypes = { 'text', 'bib', 'gitcommit', 'markdown', 'org', 'plaintex', 'rst', 'rnoweb', 'tex', 'pandoc' }, + filetypes = { + "bib", + "gitcommit", + "markdown", + "org", + "pandoc", + "plaintex", + "rnoweb", + "rst", + "tex", + "text", + }, settings = { - ['ltex'] = { + ["ltex"] = { language = "auto" } } @@ -10,43 +21,44 @@ local config = { lspconfig.ltex.setup(config) -vim.api.nvim_create_user_command('SCOn', function (args) +-- Use TeX LSP for spellcheck. +vim.api.nvim_create_user_command("SCOn", function (args) lspconfig.ltex.setup(config) end, { desc = "Enable spellcheck." }) -vim.api.nvim_create_user_command('SCOff', function (args) +vim.api.nvim_create_user_command("SCOff", function (args) lspconfig.ltex.setup { filetypes = {} } end, { desc = "Disable spellcheck." }) -vim.api.nvim_create_user_command('SCLangRU', function (args) +vim.api.nvim_create_user_command("SCLangRU", function (args) config.settings['ltex'].language = "ru-RU" lspconfig.ltex.setup(config) end, { desc = "Set spellcheck to Russian." }) -vim.api.nvim_create_user_command('SCLangEN', function (args) +vim.api.nvim_create_user_command("SCLangEN", function (args) config.settings['ltex'].language = "en-US" lspconfig.ltex.setup(config) end, { desc = "Set spellcheck to English." }) -vim.api.nvim_create_user_command('SCLangAuto', function (args) +vim.api.nvim_create_user_command("SCLangAuto", function (args) config.settings['ltex'].language = "auto" lspconfig.ltex.setup(config) end, { desc = "Set spellcheck to Auto." }) -vim.api.nvim_create_user_command('SCForce', function (args) +vim.api.nvim_create_user_command("SCForce", function (args) vim.cmd("setfiletype text") vim.cmd("SCOn") end, { desc = "Set buffer type to text." }) -vim.api.nvim_create_user_command('SCReset', function (args) +vim.api.nvim_create_user_command("SCReset", function (args) vim.cmd("filetype detect") vim.cmd("SCLangAuto") end, { desc = "Set buffer type to auto." }) -vim.api.nvim_create_user_command('SCInfo', function (args) +vim.api.nvim_create_user_command("SCInfo", function (args) vim.cmd("LspInfo") end, { desc = "Show info about spellcheck." }) -vim.api.nvim_create_user_command('SCInstall', function (args) +vim.api.nvim_create_user_command("SCInstall", function (args) vim.cmd("MasonInstall ltex-ls") end, { desc = "Install spellcheck (requires Mason)." })