diff --git a/.config/nvim/after/ftplugin/c.lua b/.config/nvim/after/ftplugin/c.lua index 62df926..854d78f 100644 --- a/.config/nvim/after/ftplugin/c.lua +++ b/.config/nvim/after/ftplugin/c.lua @@ -1,7 +1,8 @@ -vim.api.nvim_create_autocmd({ 'VimLeave' }, - { - callback = function() os.execute('cclear') end - }) +vim.api.nvim_create_autocmd({ "VimLeave" }, { + callback = function() + os.execute("cclear") + end, +}) vim.o.shiftwidth = 2 vim.o.softtabstop = 2 diff --git a/.config/nvim/after/ftplugin/csv.lua b/.config/nvim/after/ftplugin/csv.lua index 8ada645..7efed8b 100644 --- a/.config/nvim/after/ftplugin/csv.lua +++ b/.config/nvim/after/ftplugin/csv.lua @@ -1,8 +1,7 @@ -vim.api.nvim_create_autocmd({ 'VimEnter' }, - { - callback = function() - require("csvview").enable() - end - }) +vim.api.nvim_create_autocmd({ "VimEnter" }, { + callback = function() + require("csvview").enable() + end, +}) vim.o.textwidth = 0 diff --git a/.config/nvim/after/ftplugin/markdown.lua b/.config/nvim/after/ftplugin/markdown.lua index 491c552..888d867 100644 --- a/.config/nvim/after/ftplugin/markdown.lua +++ b/.config/nvim/after/ftplugin/markdown.lua @@ -1,41 +1,40 @@ -vim.api.nvim_create_autocmd({ 'VimEnter' }, - { - callback = function() - require("tidy").opts.enabled_on_save = false - end - }) +vim.api.nvim_create_autocmd({ "VimEnter" }, { + callback = function() + require("tidy").opts.enabled_on_save = false + end, +}) -vim.api.nvim_create_autocmd({ 'BufEnter' }, - { - callback = function() - vim.o.foldenable = false - end - }) +vim.api.nvim_create_autocmd({ "BufEnter" }, { + callback = function() + vim.o.foldenable = false + end, +}) -vim.api.nvim_create_autocmd({ 'BufLeave' }, - { - callback = function() - if vim.o.ma then - require("tidy").run() - end +vim.api.nvim_create_autocmd({ "BufLeave" }, { + callback = function() + if vim.o.ma then + require("tidy").run() end - } -) + end, +}) - -vim.api.nvim_create_autocmd({ 'VimLeave' }, - { - callback = function() - os.execute('mdclear ' .. vim.fn.expand('%')) - end - }) +vim.api.nvim_create_autocmd({ "VimLeave" }, { + callback = function() + os.execute("mdclear " .. vim.fn.expand("%")) + end, +}) vim.o.shiftwidth = 2 vim.o.softtabstop = 2 vim.o.textwidth = 100 -- frabjous/knap -vim.keymap.set('n', 'p', require("knap").toggle_autopreviewing, { noremap = true }) +vim.keymap.set( + "n", + "p", + require("knap").toggle_autopreviewing, + { noremap = true, desc = "Knap: toggle autopreview" } +) -- benlubas/molten-nvim require("quarto").activate() diff --git a/.config/nvim/after/ftplugin/tex.lua b/.config/nvim/after/ftplugin/tex.lua index 0d77094..f022461 100644 --- a/.config/nvim/after/ftplugin/tex.lua +++ b/.config/nvim/after/ftplugin/tex.lua @@ -1,32 +1,46 @@ -vim.api.nvim_create_autocmd({ 'VimEnter' }, - { - callback = function() - require("tidy").opts.enabled_on_save = false - require("knap").toggle_autopreviewing() - end - }) +vim.api.nvim_create_autocmd({ "VimEnter" }, { + callback = function() + require("tidy").opts.enabled_on_save = false + require("knap").toggle_autopreviewing() + end, +}) -vim.api.nvim_create_autocmd({ 'BufLeave' }, - { - callback = function() - if vim.o.ma then - require("tidy").run() - end +vim.api.nvim_create_autocmd({ "BufLeave" }, { + callback = function() + if vim.o.ma then + require("tidy").run() end - } -) + end, +}) -vim.api.nvim_create_autocmd({ 'VimLeave' }, - { - callback = function() - os.execute('texclear ' .. vim.fn.expand('%')) - end - }) +vim.api.nvim_create_autocmd({ "VimLeave" }, { + callback = function() + os.execute("texclear " .. vim.fn.expand("%")) + end, +}) vim.o.shiftwidth = 2 vim.o.softtabstop = 2 vim.o.textwidth = 80 +local wk = require("which-key") + -- frabjous/knap -vim.keymap.set('n', 'p', require("knap").toggle_autopreviewing, { noremap = true }) -vim.keymap.set({ 'n', 'v', 'i' },'', function() require("knap").forward_jump() end) +wk.add({ + { + mode = "n", + "p", + require("knap").toggle_autopreviewing, + desc = "Knap: toggle autopreview", + buffer = true, + }, + { + mode = { "n", "v", "i" }, + "", + function() + require("knap").forward_jump() + end, + desc = "Knap: jump to cursor", + buffer = true, + }, +}) diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index c57ff18..bb30699 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -4,6 +4,7 @@ "blink.download": { "branch": "main", "commit": "86361b98f3c8317904a08e3bd12cf3cdcbe3e925" }, "blink.pairs": { "branch": "main", "commit": "d8bf802cca951f0a3b72ddeed21bc5a1d5353f65" }, "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, + "cmp-dictionary": { "branch": "main", "commit": "fecc3ef2435c2be35818f8fcac4a6c5655f3a8f0" }, "cmp-nvim-lsp": { "branch": "main", "commit": "bd5a7d6db125d4654b50eeae9f5217f24bb22fd3" }, "cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" }, "cmp-under-comparator": { "branch": "master", "commit": "6857f10272c3cfe930cece2afa2406e1385bfef8" }, @@ -16,7 +17,7 @@ "edgy.nvim": { "branch": "main", "commit": "8bfd2808994a988c975694122f68624b8a219f5f" }, "fterm.nvim": { "branch": "master", "commit": "d1320892cc2ebab472935242d9d992a2c9570180" }, "fzy-lua-native": { "branch": "master", "commit": "9d720745d5c2fb563c0d86c17d77612a3519c506" }, - "git-blame.nvim": { "branch": "master", "commit": "9874ec1ec8bc53beb33b7cd82c092b85271a578b" }, + "git-blame.nvim": { "branch": "main", "commit": "9874ec1ec8bc53beb33b7cd82c092b85271a578b" }, "gitsigns.nvim": { "branch": "main", "commit": "1ee5c1fd068c81f9dd06483e639c2aa4587dc197" }, "goto-preview": { "branch": "main", "commit": "cf561d10b4b104db20375c48b86cf36af9f96e00" }, "image.nvim": { "branch": "master", "commit": "446a8a5cc7a3eae3185ee0c697732c32a5547a0b" }, @@ -29,7 +30,7 @@ "lsp_signature.nvim": { "branch": "master", "commit": "b58cca003d1d3311213d6db0352f58d8e57bfff0" }, "lspkind-nvim": { "branch": "master", "commit": "3ddd1b4edefa425fda5a9f95a4f25578727c0bb3" }, "lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" }, - "luasnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" }, + "luasnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "6bdb14f230de0904229ec367b410fb817e59b072" }, "mason-null-ls.nvim": { "branch": "main", "commit": "de19726de7260c68d94691afb057fa73d3cc53e7" }, "mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" }, @@ -42,6 +43,7 @@ "nvim-colorizer.lua": { "branch": "master", "commit": "6ed09146ee637006367b5e225be6208a1ea02579" }, "nvim-docs-view": { "branch": "master", "commit": "5676cc094d426edd39134b1eefca2cab441cca8a" }, "nvim-hlslens": { "branch": "main", "commit": "6d42444785ea0d41555d033485910c5e78916f3b" }, + "nvim-lilypond-suite": { "branch": "main", "commit": "a1a313fd6028a196cc9aaa8c8501838fe8cc8e2a" }, "nvim-lspconfig": { "branch": "master", "commit": "cc2f5f2fa28d240574808e78847978ed6ef20d2a" }, "nvim-navic": { "branch": "master", "commit": "f887d794a0f4594882814d7780980a949200a238" }, "nvim-scrollbar": { "branch": "main", "commit": "5b103ef0fd2e8b9b4be3878ed38d224522192c6c" }, @@ -62,11 +64,12 @@ "projections.nvim": { "branch": "pre_release", "commit": "889914169fa1f5c00fb8659653b5a8330fb223e6" }, "promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" }, "quarto-nvim": { "branch": "main", "commit": "0e9491509b38efbd83d3f41dbfacc7fc4bd40191" }, + "renamer.nvim": { "branch": "master", "commit": "1614d466df53899f11dd5395eaac3c09a275c384" }, "rustaceanvim": { "branch": "master", "commit": "12504405821c05874d2d1f6b5ec919f9808e2c99" }, "spelunker.vim": { "branch": "master", "commit": "a0bc530f62798bbe053905555a4aa9ed713485eb" }, "sqlite.lua": { "branch": "master", "commit": "50092d60feb242602d7578398c6eb53b4a8ffe7b" }, "tabular": { "branch": "master", "commit": "12437cd1b53488e24936ec4b091c9324cafee311" }, - "tccs.nvim": { "branch": "master", "commit": "b729bc7702d67db41898c5d65847a766384fc734" }, + "tccs.nvim": { "branch": "master", "commit": "e50c1504286b5ee2700961a600f26c9b338bd042" }, "telescope-words.nvim": { "branch": "main", "commit": "295d51fe1e525fee18c0c164ad0ae5fb23273aa0" }, "telescope.nvim": { "branch": "master", "commit": "776b509f80dd49d8205b9b0d94485568236d1192" }, "tidy.nvim": { "branch": "main", "commit": "c8cd0e6e0108da25c3e10c3f33d8c03b3d8806f1" }, @@ -77,7 +80,6 @@ "vim-hug-neovim-rpc": { "branch": "master", "commit": "93ae38792bc197c3bdffa2716ae493c67a5e7957" }, "vim-illuminate": { "branch": "master", "commit": "0d1e93684da00ab7c057410fecfc24f434698898" }, "vim-markdown": { "branch": "master", "commit": "8f6cb3a6ca4e3b6bcda0730145a0b700f3481b51" }, - "vim-renamer": { "branch": "master", "commit": "9c6346eb4556cf2d8ca55de6969247ab14fe2383" }, "viper.nvim": { "branch": "master", "commit": "4f406ae891113fc1bfda308052c835a185188670" }, "which-key.nvim": { "branch": "main", "commit": "b4177e3eaf15fe5eb8357ebac2286d488be1ed00" }, "wilder.nvim": { "branch": "master", "commit": "679f348dc90d80ff9ba0e7c470c40a4d038dcecf" }, diff --git a/.config/nvim/lua/autocmd.lua b/.config/nvim/lua/autocmd.lua index ea6d1cc..f9b4611 100644 --- a/.config/nvim/lua/autocmd.lua +++ b/.config/nvim/lua/autocmd.lua @@ -1,7 +1,7 @@ -- highlighting yanked regions vim.api.nvim_create_autocmd("TextYankPost", { callback = function() - vim.highlight.on_yank({higroup="YankHighlight"}) + vim.highlight.on_yank({ higroup = "YankHighlight" }) end, }) @@ -28,39 +28,39 @@ vim.api.nvim_create_autocmd({ "VimEnter" }, { -- benlubas/molten-nvim local imb = function(e) - vim.schedule(function() - local kernels = vim.fn.MoltenAvailableKernels() - local try_kernel_name = function() - local metadata = vim.json.decode(io.open(e.file, "r"):read("a"))["metadata"] - return metadata.kernelspec.name - end - local ok, kernel_name = pcall(try_kernel_name) - if not ok or not vim.tbl_contains(kernels, kernel_name) then - kernel_name = nil - local venv = os.getenv("VIRTUAL_ENV") or os.getenv("CONDA_PREFIX") - if venv ~= nil then - kernel_name = string.match(venv, "/.+/(.+)") - end - end - if kernel_name ~= nil and vim.tbl_contains(kernels, kernel_name) then - vim.cmd(("MoltenInit %s"):format(kernel_name)) - end - vim.cmd("MoltenImportOutput") - end) + vim.schedule(function() + local kernels = vim.fn.MoltenAvailableKernels() + local try_kernel_name = function() + local metadata = vim.json.decode(io.open(e.file, "r"):read("a"))["metadata"] + return metadata.kernelspec.name + end + local ok, kernel_name = pcall(try_kernel_name) + if not ok or not vim.tbl_contains(kernels, kernel_name) then + kernel_name = nil + local venv = os.getenv("VIRTUAL_ENV") or os.getenv("CONDA_PREFIX") + if venv ~= nil then + kernel_name = string.match(venv, "/.+/(.+)") + end + end + if kernel_name ~= nil and vim.tbl_contains(kernels, kernel_name) then + vim.cmd(("MoltenInit %s"):format(kernel_name)) + end + vim.cmd("MoltenImportOutput") + end) end vim.api.nvim_create_autocmd("BufAdd", { - pattern = { "*.ipynb" }, - callback = imb, + pattern = { "*.ipynb" }, + callback = imb, }) vim.api.nvim_create_autocmd("BufEnter", { - pattern = { "*.ipynb" }, - callback = function(e) - if vim.api.nvim_get_vvar("vim_did_enter") ~= 1 then - imb(e) - end - end, + pattern = { "*.ipynb" }, + callback = function(e) + if vim.api.nvim_get_vvar("vim_did_enter") ~= 1 then + imb(e) + end + end, }) local default_notebook = [[ @@ -108,14 +108,14 @@ local function new_notebook(filename) end end -vim.api.nvim_create_user_command('NewNotebook', function(opts) +vim.api.nvim_create_user_command("NewNotebook", function(opts) new_notebook(opts.args) end, { nargs = 1, - complete = 'file' + complete = "file", }) -- stevearc/oil.nvim -vim.api.nvim_create_user_command('Renamer', function(opts) +vim.api.nvim_create_user_command("Renamer", function(opts) vim.cmd("Oil " .. opts.args) end, { nargs = "*" }) diff --git a/.config/nvim/lua/dictionaries.lua b/.config/nvim/lua/dictionaries.lua index c40013c..86b015b 100644 --- a/.config/nvim/lua/dictionaries.lua +++ b/.config/nvim/lua/dictionaries.lua @@ -2,8 +2,8 @@ local dictionary_base = "/home/user/.config/nvim/lua/dictionaries/" local Dictionary_files = { - ["de-DE"] = {"dictionary_de-de.txt", "dictionary_names.txt"}, - ["en-US"] = {"dictionary_en-us.txt", "dictionary_names.txt"}, + ["de-DE"] = { "dictionary_de-de.txt", "dictionary_names.txt" }, + ["en-US"] = { "dictionary_en-us.txt", "dictionary_names.txt" }, } function GetDictFiles(lang) @@ -35,8 +35,8 @@ function ReadFiles(lang) return dict end -for k,v in pairs(Dictionary_files) do - for a,b in pairs(v) do +for k, v in pairs(Dictionary_files) do + for a, b in pairs(v) do Dictionary_files[k][a] = dictionary_base .. b end end diff --git a/.config/nvim/lua/keymap.lua b/.config/nvim/lua/keymap.lua index 03e45fd..0f9bb34 100644 --- a/.config/nvim/lua/keymap.lua +++ b/.config/nvim/lua/keymap.lua @@ -1,119 +1,400 @@ -- setup keymap function -local wk = require("which-key") -local telescope = require("telescope") local lazygit = require("FTerm"):new({ cmd = "lazygit" }) +local telescope = require("telescope") +local wk = require("which-key") wk.add({ -- setup keymap groups - {mode = "n", "g", desc = "LSP: goto"}, - {mode = "n", "gp", desc = "LSP: preview"}, - {mode = "c", "w", desc = "Write"}, - {mode = "c", "w!", desc = "Write: overwrite"}, - {mode = "n", "a", desc = "AI"}, - {mode = "n", "g", desc = "Git"}, - {mode = "n", "f", desc = "Telescope: find"}, - {mode = "n", "gd", desc = "Git: diff"}, - {mode = "n", "s", desc = "Substitute"}, - {mode = "n", "t", desc = "Terminal"}, - {mode = "n", "r", desc = "Quarto"}, - {mode = "n", "", desc = "Navigation"}, + { mode = "n", "g", desc = "LSP: goto" }, + { mode = "n", "gp", desc = "LSP: preview" }, + { mode = "c", "w", desc = "Write" }, + { mode = "c", "w!", desc = "Write: overwrite" }, + { mode = "n", "a", desc = "AI" }, + { mode = "n", "g", desc = "Git" }, + { mode = "n", "f", desc = "Telescope: find" }, + { mode = "n", "gd", desc = "Git: diff" }, + { mode = "n", "s", desc = "Substitute" }, + { mode = "n", "t", desc = "Terminal" }, + { mode = "n", "r", desc = "Quarto" }, + { mode = "n", "", desc = "Navigation" }, -- unmap unwanted commands - {mode = "n", "Zt", "", noremap = true}, - {mode = "n", "ZT", "", noremap = true}, - {mode = "n", "", "", noremap = true}, - {mode = "n", "", "", noremap = true}, - {mode = "n", "", "", noremap = true}, - {mode = "n", "", "", noremap = true}, - {mode = "n", "", "", noremap = true}, - {mode = "n", "", "", noremap = true}, - {mode = "n", "", "", noremap = true}, - {mode = "n", "", "", noremap = true}, - {mode = "n", "", "", noremap = true}, - {mode = "n", "", "", noremap = true}, - {mode = "n", "", "", noremap = true}, - {mode = "n", "", "", noremap = true}, - {mode = "n", "", "", noremap = true}, + { mode = "n", "Zt", "", noremap = true }, + { mode = "n", "ZT", "", noremap = true }, + { mode = "n", "", "", noremap = true }, + { mode = "n", "", "", noremap = true }, + { mode = "n", "", "", noremap = true }, + { mode = "n", "", "", noremap = true }, + { mode = "n", "", "", noremap = true }, + { mode = "n", "", "", noremap = true }, + { mode = "n", "", "", noremap = true }, + { mode = "n", "", "", noremap = true }, + { mode = "n", "", "", noremap = true }, + { mode = "n", "", "", noremap = true }, + { mode = "n", "", "", noremap = true }, + { mode = "n", "", "", noremap = true }, + { mode = "n", "", "", noremap = true }, -- shortcuts for quitting - {mode = "n", "ZA", ":xa", desc = "Exit: write and quit all buffers", noremap = true}, - {mode = "n", "ZQ", ":conf q", desc = "Exit: quit current buffer", noremap = true}, - {mode = "n", "ZZ", ":x", desc = "Exit: write and quit current buffer", noremap = true}, + { mode = "n", "ZA", ":xa", desc = "Exit: write and quit all buffers", noremap = true }, + { mode = "n", "ZQ", ":conf q", desc = "Exit: quit current buffer", noremap = true }, + { mode = "n", "ZZ", ":x", desc = "Exit: write and quit current buffer", noremap = true }, -- shortcut for split navigation - {mode = "n", "", "h", desc = "Navigation: go to left window", noremap = true}, - {mode = "n", "", "j", desc = "Navigation: go to lower window", noremap = true}, - {mode = "n", "", "k", desc = "Navigation: go to upper window", noremap = true}, - {mode = "n", "", "l", desc = "Navigation: go to right window", noremap = true}, + { mode = "n", "", "h", desc = "Navigation: go to left window", noremap = true }, + { mode = "n", "", "j", desc = "Navigation: go to lower window", noremap = true }, + { mode = "n", "", "k", desc = "Navigation: go to upper window", noremap = true }, + { mode = "n", "", "l", desc = "Navigation: go to right window", noremap = true }, -- remap for dealing with word wrap - {mode = "n", "j", "gj", desc = "Navigation: go down in wrapped lines", silent = true}, - {mode = "n", "k", "gk", desc = "Navigation: go up in wrapped lines", silent = true}, + { mode = "n", "j", "gj", desc = "Navigation: go down in wrapped lines", silent = true }, + { mode = "n", "k", "gk", desc = "Navigation: go up in wrapped lines", silent = true }, -- compiler for languages - {mode = "n", "c", ":w! | !compiler %", desc = "Compile: current file", noremap = true}, - {mode = "n", "w!!", 'execute "silent! write !sudo tee % >/dev/null" edit!', desc = "Write: overwrite file over with sudo", noremap = true}, + { + mode = "n", + "c", + ":w! | !compiler %", + desc = "Compile: current file", + noremap = true, + }, + { + mode = "n", + "w!!", + 'execute "silent! write !sudo tee % >/dev/null" edit!', + desc = "Write: overwrite file over with sudo", + noremap = true, + }, -- tpope/vim-abolish - {mode = "n", "sa", ":%S//g", desc = "Substitute: free form", noremap = true}, - {mode = "n", "ss", ":%S/\\<\\>//g", desc = "Substitute: word under cursor", noremap = true}, + { + mode = "n", + "sa", + ":%S//g", + desc = "Substitute: free form", + noremap = true, + }, + { + mode = "n", + "ss", + ":%S/\\<\\>//g", + desc = "Substitute: word under cursor", + noremap = true, + }, -- simrat39/symbols-outline.nvim - {mode = "n", "", ":Outline", desc = "CTags: toggle"}, + { mode = "n", "", ":Outline", desc = "CTags: toggle" }, -- nvim-tree/nvim-tree.lua - {mode = "n", "", ":NvimTreeToggle toggle", desc = "File tree: toggle"}, + { mode = "n", "", ":NvimTreeToggle toggle", desc = "File tree: toggle" }, -- mbbill/undotree - {mode = "n", "", ":UndotreeToggle", desc = "Undo tree: toggle"}, + { mode = "n", "", ":UndotreeToggle", desc = "Undo tree: toggle" }, -- amrbashir/nvim-docs-view - {mode = "n", "go", ":DocsViewToggle", desc = "LSP: toggle documentation window", noremap = true}, + { + mode = "n", + "go", + ":DocsViewToggle", + desc = "LSP: toggle documentation window", + noremap = true, + }, -- numtostr/fterm.nvim - {mode = "n", "tt", require("FTerm").toggle, desc = "Terminal: open", noremap = true}, - {mode = "n", "gt", function() lazygit:toggle() end, desc = "Git: open lazygit", noremap = true}, - {mode = "n", "tg", function() lazygit:toggle() end, desc = "Terminal: open lazygit", noremap = true}, + { mode = "n", "tt", require("FTerm").toggle, desc = "Terminal: open", noremap = true }, + { + mode = "n", + "gt", + function() + lazygit:toggle() + end, + desc = "Git: open lazygit", + noremap = true, + }, + { + mode = "n", + "tg", + function() + lazygit:toggle() + end, + desc = "Terminal: open lazygit", + noremap = true, + }, -- sindrets/diffview.nvim - {mode = "n", "gdo", ":DiffviewOpen", desc = "Git: open diff"}, - {mode = "n", "gdc", ":DiffviewClose", desc = "Git: close diff"}, + { mode = "n", "gdo", ":DiffviewOpen", desc = "Git: open diff" }, + { mode = "n", "gdc", ":DiffviewClose", desc = "Git: close diff" }, -- folke/trouble.nvim - {mode = "n", "", ":Trouble diagnostics toggle", desc = "LSP: toggle error list"}, + { mode = "n", "", ":Trouble diagnostics toggle", desc = "LSP: toggle error list" }, -- hrsh7th/nvim-cmp - {mode = "n", "gd", function() vim.lsp.buf.definition() end, desc = "LSP: goto definition", noremap = true}, - {mode = "n", "gD", function() vim.lsp.buf.declaration() end, desc = "LSP: goto declaration", noremap = true}, - {mode = "n", "gT", function() vim.lsp.buf.type_definition() end, desc = "LSP: goto type definition", noremap = true}, - {mode = "n", "gi", function() vim.lsp.buf.implementation() end, desc = "LSP: list implementation", noremap = true}, - {mode = "n", "gr", function() vim.lsp.buf.references() end, desc = "LSP: list references", noremap = true}, - {mode = "n", "K", vim.lsp.buf.hover(), desc = "LSP: show documentation", noremap = true}, - {mode = "n", "", function() require("conform").format({ async = true, lsp_fallback = true }) end, desc = "LSP: format", noremap = true}, + { + mode = "n", + "gd", + function() + vim.lsp.buf.definition() + end, + desc = "LSP: goto definition", + noremap = true, + }, + { + mode = "n", + "gD", + function() + vim.lsp.buf.declaration() + end, + desc = "LSP: goto declaration", + noremap = true, + }, + { + mode = "n", + "gT", + function() + vim.lsp.buf.type_definition() + end, + desc = "LSP: goto type definition", + noremap = true, + }, + { + mode = "n", + "gi", + function() + vim.lsp.buf.implementation() + end, + desc = "LSP: list implementation", + noremap = true, + }, + { + mode = "n", + "gr", + function() + vim.lsp.buf.references() + end, + desc = "LSP: list references", + noremap = true, + }, + { mode = "n", "K", vim.lsp.buf.hover(), desc = "LSP: show documentation", noremap = true }, + { + mode = "n", + "", + function() + require("conform").format({ async = true, lsp_fallback = true }) + end, + desc = "LSP: format", + noremap = true, + }, -- rmagatti/goto-preview - {mode = "n", "gpd", function() require("goto-preview").goto_preview_definition() end, desc = "LSP: preview definition", noremap = true}, - {mode = "n", "gpy", function() require("goto-preview").goto_preview_type_definition() end, desc = "LSP: preview type definition", noremap = true}, - {mode = "n", "gpi", function() require("goto-preview").goto_preview_implementation() end, desc = "LSP: list preview implementation", noremap = true}, - {mode = "n", "gpD", function() require("goto-preview").goto_preview_declaration() end, desc = "LSP: preview declaration", noremap = true}, - {mode = "n", "gpr", function() require("goto-preview").goto_preview_references() end, desc = "LSP: list preview references", noremap = true}, - {mode = "n", "gpc", function() require("goto-preview").close_all_win() end, desc = "LSP: close all preview windows", noremap = true}, + { + mode = "n", + "gpd", + function() + require("goto-preview").goto_preview_definition() + end, + desc = "LSP: preview definition", + noremap = true, + }, + { + mode = "n", + "gpy", + function() + require("goto-preview").goto_preview_type_definition() + end, + desc = "LSP: preview type definition", + noremap = true, + }, + { + mode = "n", + "gpi", + function() + require("goto-preview").goto_preview_implementation() + end, + desc = "LSP: list preview implementation", + noremap = true, + }, + { + mode = "n", + "gpD", + function() + require("goto-preview").goto_preview_declaration() + end, + desc = "LSP: preview declaration", + noremap = true, + }, + { + mode = "n", + "gpr", + function() + require("goto-preview").goto_preview_references() + end, + desc = "LSP: list preview references", + noremap = true, + }, + { + mode = "n", + "gpc", + function() + require("goto-preview").close_all_win() + end, + desc = "LSP: close all preview windows", + noremap = true, + }, -- filipdutescu/renamer.nvim - {mode = "n", "", function() require("renamer").rename() end, desc = "LSP: rename", noremap = true}, + { + mode = "n", + "", + function() + require("renamer").rename() + end, + desc = "LSP: rename", + noremap = true, + }, -- nvim-telescope/telescope.nvim - {mode = "n", "ff", ":Telescope find_files", desc = "Telescope: find files", noremap = true}, - {mode = "n", "ff", ":Telescope find_files", desc = "Telescope: find files", noremap = true}, + { + mode = "n", + "ff", + ":Telescope find_files", + desc = "Telescope: find files", + noremap = true, + }, + { + mode = "n", + "ff", + ":Telescope find_files", + desc = "Telescope: find files", + noremap = true, + }, -- archie-judd/telescope-words.nvim - {mode = "n", "wd", telescope.extensions.telescope_words.search_dictionary, desc = "Telescope: search dictionary", noremap = true}, - {mode = "n", "wt", telescope.extensions.telescope_words.search_thesaurus, desc = "Telescope: search thesaurus", noremap = true}, + { + mode = "n", + "wd", + telescope.extensions.telescope_words.search_dictionary, + desc = "Telescope: search dictionary", + noremap = true, + }, + { + mode = "n", + "wt", + telescope.extensions.telescope_words.search_thesaurus, + desc = "Telescope: search thesaurus", + noremap = true, + }, -- gnikdroy/projections.nvim - {mode = "n", "fp", function() vim.cmd("Telescope projections") end, desc = "Telescope: find projects", noremap = true}, + { + mode = "n", + "fp", + function() + vim.cmd("Telescope projections") + end, + desc = "Telescope: find projects", + noremap = true, + }, -- kamykn/spelunker.vim - {mode = "n", "t", ":call spelunker#toggle()", desc = "Spelunker: toggle spell check", noremap = true}, - {mode = "n", "s", "z=", desc = "Spell: display suggestions"}, + { + mode = "n", + "t", + ":call spelunker#toggle()", + desc = "Spelunker: toggle spell check", + noremap = true, + }, + { mode = "n", "s", "z=", desc = "Spell: display suggestions" }, -- kevinhwang91/nvim-ufo - {mode = "n", "K", function() local winid = require("ufo").peekFoldedLinesUnderCursor() if not winid then vim.lsp.buf.hover() end end, desc = "LSP: peek folded section", noremap = true}, + { + mode = "n", + "K", + function() + local winid = require("ufo").peekFoldedLinesUnderCursor() + if not winid then + vim.lsp.buf.hover() + end + end, + desc = "LSP: peek folded section", + noremap = true, + }, -- kevinhwang91/nvim-hlslens - {mode = "n", "n", [[execute('normal! ' . v:count1 . 'n')lua require('hlslens').start()]], desc = "Search: search forward", noremap = true, silent = true}, - {mode = "n", "N", [[execute('normal! ' . v:count1 . 'N')lua require('hlslens').start()]], desc = "Search: search backwards", noremap = true, silent = true}, + { + mode = "n", + "n", + [[execute('normal! ' . v:count1 . 'n')lua require('hlslens').start()]], + desc = "Search: search forward", + noremap = true, + silent = true, + }, + { + mode = "n", + "N", + [[execute('normal! ' . v:count1 . 'N')lua require('hlslens').start()]], + desc = "Search: search backwards", + noremap = true, + silent = true, + }, -- sindrets/winshift.nvim - {mode = "n", "m", ":WinShift", desc = "Navigation: enter window shift mode", noremap = true}, + { + mode = "n", + "m", + ":WinShift", + desc = "Navigation: enter window shift mode", + noremap = true, + }, -- ggandor/leap.nvim - {mode = "n", "f", "(leap-forward)", desc = "Navigation: enter leap mode for forward movement", noremap = true}, - {mode = "n", "F", "(leap-backward)", desc = "Navigation: enter leap mode for backwards movement", noremap = true}, - {mode = "n", "gf", "(leap-from-window)", desc = "Navigation: enter leap mode for other windows", noremap = true}, + { + mode = "n", + "f", + "(leap-forward)", + desc = "Navigation: enter leap mode for forward movement", + noremap = true, + }, + { + mode = "n", + "F", + "(leap-backward)", + desc = "Navigation: enter leap mode for backwards movement", + noremap = true, + }, + { + mode = "n", + "gf", + "(leap-from-window)", + desc = "Navigation: enter leap mode for other windows", + noremap = true, + }, -- quarto-dev/quarto-nvim - {mode = "n", "rc", require("quarto.runner").run_cell, desc = "Quarto: Run cell", noremap = true, silent = true}, - {mode = "n", "ra", require("quarto.runner").run_above, desc = "Quarto: Run cell and above", noremap = true, silent = true}, - {mode = "n", "rA", require("quarto.runner").run_all, desc = "Quarto: Run all cells", noremap = true, silent = true}, - {mode = "n", "rl", require("quarto.runner").run_line, desc = "Quarto: Run line", noremap = true, silent = true}, - {mode = "n", "rr", require("quarto.runner").run_range, desc = "Quarto: Run visual range", noremap = true, silent = true}, - {mode = "n", "rL", function() require("quarto.runner").run_all(true) end, desc = "Quarto: Run all cells of all languages", noremap = true, silent = true}, + { + mode = "n", + "rc", + require("quarto.runner").run_cell, + desc = "Quarto: Run cell", + noremap = true, + silent = true, + }, + { + mode = "n", + "ra", + require("quarto.runner").run_above, + desc = "Quarto: Run cell and above", + noremap = true, + silent = true, + }, + { + mode = "n", + "rA", + require("quarto.runner").run_all, + desc = "Quarto: Run all cells", + noremap = true, + silent = true, + }, + { + mode = "n", + "rl", + require("quarto.runner").run_line, + desc = "Quarto: Run line", + noremap = true, + silent = true, + }, + { + mode = "n", + "rr", + require("quarto.runner").run_range, + desc = "Quarto: Run visual range", + noremap = true, + silent = true, + }, + { + mode = "n", + "rL", + function() + require("quarto.runner").run_all(true) + end, + desc = "Quarto: Run all cells of all languages", + noremap = true, + silent = true, + }, -- huynle/ogpt-nvim - {mode = "n", "ai", ":OGPT", desc = "OGTP: Open AI View", noremap = true}, + { mode = "n", "ai", ":OGPT", desc = "OGTP: Open AI View", noremap = true }, }) diff --git a/.config/nvim/lua/loadplugins.lua b/.config/nvim/lua/loadplugins.lua index 7738aa7..195473a 100644 --- a/.config/nvim/lua/loadplugins.lua +++ b/.config/nvim/lua/loadplugins.lua @@ -12,14 +12,15 @@ if not vim.loop.fs_stat(lazypath) then end vim.opt.rtp:prepend(lazypath) -return require("lazy").setup({ +return require("lazy").setup( + { -- import plugins from the plugins directory - { import = 'plugins' }, + { import = "plugins" }, }, -- lazy.nvim configuration { ui = { - icons = Lazy_signs - } + icons = Lazy_signs, + }, } ) diff --git a/.config/nvim/lua/plugins/barbecue.lua b/.config/nvim/lua/plugins/barbecue.lua index c7af698..ad8a9ce 100644 --- a/.config/nvim/lua/plugins/barbecue.lua +++ b/.config/nvim/lua/plugins/barbecue.lua @@ -1,5 +1,5 @@ return { - { + -- vs code like topbar "utilyre/barbecue.nvim", name = "barbecue", version = "*", @@ -10,7 +10,6 @@ return { opts = { theme = { normal = { bg = "#272727" }, - } + }, }, - } } diff --git a/.config/nvim/lua/plugins/blink-pairs.lua b/.config/nvim/lua/plugins/blink-pairs.lua index 45893a7..802dcf1 100644 --- a/.config/nvim/lua/plugins/blink-pairs.lua +++ b/.config/nvim/lua/plugins/blink-pairs.lua @@ -1,10 +1,9 @@ return { + -- rainbow auto-pairs "saghen/blink.pairs", version = "*", -- (recommended) only required with prebuilt binaries - -- download prebuilt binaries from github releases dependencies = "saghen/blink.download", - --- @module 'blink.pairs' --- @type blink.pairs.Config opts = { diff --git a/.config/nvim/lua/plugins/comment.lua b/.config/nvim/lua/plugins/comment.lua index 6faf6d9..c9ceaa4 100644 --- a/.config/nvim/lua/plugins/comment.lua +++ b/.config/nvim/lua/plugins/comment.lua @@ -1,7 +1,5 @@ return { -- commenting improvements - { - 'numtostr/comment.nvim', - opts = {} - } + "numtostr/comment.nvim", + opts = {}, } diff --git a/.config/nvim/lua/plugins/conform.lua b/.config/nvim/lua/plugins/conform.lua index e26f28b..9696260 100644 --- a/.config/nvim/lua/plugins/conform.lua +++ b/.config/nvim/lua/plugins/conform.lua @@ -1,20 +1,18 @@ return { -- improved refactoring - { - "stevearc/conform.nvim", - config = function() - require("conform").setup({ - formatters_by_ft = { - lua = { "stylua" }, - markdown = { "mdformat" }, - python = { "isort", "yapf" }, - sh = { "shfmt" }, - bash = { "shfmt" }, - zsh = { "shfmt" }, - tex = { "latexindent" }, - yaml = { "yamlfmt" }, - }, - }) - end, - }, + "stevearc/conform.nvim", + config = function() + require("conform").setup({ + formatters_by_ft = { + lua = { "stylua" }, + markdown = { "mdformat" }, + python = { "isort", "yapf" }, + sh = { "shfmt" }, + bash = { "shfmt" }, + zsh = { "shfmt" }, + tex = { "latexindent" }, + yaml = { "yamlfmt" }, + }, + }) + end, } diff --git a/.config/nvim/lua/plugins/csvview.lua b/.config/nvim/lua/plugins/csvview.lua index 8aa21d4..8dd6008 100644 --- a/.config/nvim/lua/plugins/csvview.lua +++ b/.config/nvim/lua/plugins/csvview.lua @@ -1,17 +1,16 @@ return { - { - "hat0uma/csvview.nvim", - opts = { - parser = { comments = { "#", "//" } }, - keymaps = { - textobject_field_inner = { "if", mode = { "o", "x" } }, - textobject_field_outer = { "af", mode = { "o", "x" } }, - jump_next_field_end = { "", mode = { "n", "v" } }, - jump_prev_field_end = { "", mode = { "n", "v" } }, - jump_next_row = { "", mode = { "n", "v" } }, - jump_prev_row = { "", mode = { "n", "v" } }, - }, + -- improved csv handling + "hat0uma/csvview.nvim", + opts = { + parser = { comments = { "#", "//" } }, + keymaps = { + textobject_field_inner = { "if", mode = { "o", "x" } }, + textobject_field_outer = { "af", mode = { "o", "x" } }, + jump_next_field_end = { "", mode = { "n", "v" } }, + jump_prev_field_end = { "", mode = { "n", "v" } }, + jump_next_row = { "", mode = { "n", "v" } }, + jump_prev_row = { "", mode = { "n", "v" } }, }, - cmd = { "CsvViewEnable", "CsvViewDisable", "CsvViewToggle" }, - } + }, + cmd = { "CsvViewEnable", "CsvViewDisable", "CsvViewToggle" }, } diff --git a/.config/nvim/lua/plugins/diffview.lua b/.config/nvim/lua/plugins/diffview.lua index 2b13f56..75f187a 100644 --- a/.config/nvim/lua/plugins/diffview.lua +++ b/.config/nvim/lua/plugins/diffview.lua @@ -1,7 +1,5 @@ return { -- side by side git diffs for merge conflicts - { - 'sindrets/diffview.nvim', - opts = {} - } + "sindrets/diffview.nvim", + opts = {}, } diff --git a/.config/nvim/lua/plugins/fterm.lua b/.config/nvim/lua/plugins/fterm.lua index bd52167..0566a38 100644 --- a/.config/nvim/lua/plugins/fterm.lua +++ b/.config/nvim/lua/plugins/fterm.lua @@ -1,7 +1,5 @@ return { -- floating terminal to toggle - { - 'numtostr/fterm.nvim', - opts = {} - } + "numtostr/fterm.nvim", + opts = {}, } diff --git a/.config/nvim/lua/plugins/gitsigns.lua b/.config/nvim/lua/plugins/gitsigns.lua index cf0bffd..e4d714e 100644 --- a/.config/nvim/lua/plugins/gitsigns.lua +++ b/.config/nvim/lua/plugins/gitsigns.lua @@ -1,7 +1,5 @@ return { -- display git status per line - { - 'lewis6991/gitsigns.nvim', - opts = {} - } + "lewis6991/gitsigns.nvim", + opts = {}, } diff --git a/.config/nvim/lua/plugins/goto-preview.lua b/.config/nvim/lua/plugins/goto-preview.lua index aefa8f3..1d3351b 100644 --- a/.config/nvim/lua/plugins/goto-preview.lua +++ b/.config/nvim/lua/plugins/goto-preview.lua @@ -1,6 +1,7 @@ return { + -- preview definitions using floating windows "rmagatti/goto-preview", - dependencies = 'rmagatti/logger.nvim', + dependencies = "rmagatti/logger.nvim", config = function() require("goto-preview").setup({}) end, diff --git a/.config/nvim/lua/plugins/indent-blankline.lua b/.config/nvim/lua/plugins/indent-blankline.lua index 1615b64..b956521 100644 --- a/.config/nvim/lua/plugins/indent-blankline.lua +++ b/.config/nvim/lua/plugins/indent-blankline.lua @@ -1,9 +1,7 @@ return { -- show indentation lines - { - 'lukas-reineke/indent-blankline.nvim', - event = "BufReadPre", - main = "ibl", - opts = {} - } + "lukas-reineke/indent-blankline.nvim", + event = "BufReadPre", + main = "ibl", + opts = {}, } diff --git a/.config/nvim/lua/plugins/knap.lua b/.config/nvim/lua/plugins/knap.lua index b323498..1489942 100644 --- a/.config/nvim/lua/plugins/knap.lua +++ b/.config/nvim/lua/plugins/knap.lua @@ -1,9 +1,8 @@ return { { - 'frabjous/knap', - ft = { 'tex' }, + "frabjous/knap", + ft = { "tex" }, config = function() - local function detect_engine() local first_line = vim.api.nvim_buf_get_lines(0, 0, 1, false)[1] or "" if first_line:match("^%%%s*xelatex") then @@ -17,11 +16,9 @@ return { local engine = detect_engine() if engine == "xelatex" then - vim.g.knap_settings.textopdf = - "xelatex -synctex=1 -interaction=batchmode %docroot%" + vim.g.knap_settings.textopdf = "xelatex -synctex=1 -interaction=batchmode %docroot%" else - vim.g.knap_settings.textopdf = - "pdflatex -synctex=1 -interaction=batchmode %docroot%" + vim.g.knap_settings.textopdf = "pdflatex -synctex=1 -interaction=batchmode %docroot%" end end @@ -29,27 +26,25 @@ return { delay = 100, texoutputext = "pdf", textopdf = "xelatex -synctex=1 -interaction=batchmode %docroot%", - textopdfviewerlaunch = - "zathura --synctex-editor-command 'nvim --headless -es --cmd \"lua require('\"'\"'knaphelper'\"'\"').relayjump('\"'\"'%servername%'\"'\"','\"'\"'%{input}'\"'\"',%{line},0)\"' ./%outputfile%", + textopdfviewerlaunch = "zathura --synctex-editor-command 'nvim --headless -es --cmd \"lua require('\"'\"'knaphelper'\"'\"').relayjump('\"'\"'%servername%'\"'\"','\"'\"'%{input}'\"'\"',%{line},0)\"' ./%outputfile%", textopdfviewerrefresh = "reload", - textopdfforwardjump = - "zathura --synctex-forward=%line%:%column%:%srcfile% %outputfile%", + textopdfforwardjump = "zathura --synctex-forward=%line%:%column%:%srcfile% %outputfile%", } vim.api.nvim_create_autocmd("User", { pattern = "KnapShowView", - callback = set_engine + callback = set_engine, }) vim.api.nvim_create_autocmd("User", { pattern = "KnapCompile", - callback = set_engine + callback = set_engine, }) vim.api.nvim_create_autocmd("BufWritePost", { pattern = "*.tex", - callback = set_engine + callback = set_engine, }) - end - } + end, + }, } diff --git a/.config/nvim/lua/plugins/leap.lua b/.config/nvim/lua/plugins/leap.lua index 3708e64..5054672 100644 --- a/.config/nvim/lua/plugins/leap.lua +++ b/.config/nvim/lua/plugins/leap.lua @@ -1,15 +1,13 @@ return { -- improved movement - { - "ggandor/leap.nvim", - config = function() - require("leap").opts.highlight_unlabeled_phase_one_targets = true - require("leap").opts.equivalence_classes = { " \t\r\n", "([{", ")]}", "'\"`" } - require("leap").opts.special_keys.prev_target = "" - require("leap").opts.special_keys.prev_group = "" - require("leap.user").set_repeat_keys("", "") - require("leap").opts.safe_labels = "sfnut/SFNLHMUGTZ?" - require("leap").opts.labels = "sfnjklhodweimbuyvrgtaqpcxz/SFNJKLHODWEIMBUYVRGTAQPCXZ?" - end, - }, + "ggandor/leap.nvim", + config = function() + require("leap").opts.highlight_unlabeled_phase_one_targets = true + require("leap").opts.equivalence_classes = { " \t\r\n", "([{", ")]}", "'\"`" } + require("leap").opts.special_keys.prev_target = "" + require("leap").opts.special_keys.prev_group = "" + require("leap.user").set_repeat_keys("", "") + require("leap").opts.safe_labels = "sfnut/SFNLHMUGTZ?" + require("leap").opts.labels = "sfnjklhodweimbuyvrgtaqpcxz/SFNJKLHODWEIMBUYVRGTAQPCXZ?" + end, } diff --git a/.config/nvim/lua/plugins/lsp_signature.lua b/.config/nvim/lua/plugins/lsp_signature.lua index 3089532..0a75343 100644 --- a/.config/nvim/lua/plugins/lsp_signature.lua +++ b/.config/nvim/lua/plugins/lsp_signature.lua @@ -1,14 +1,12 @@ return { -- show function signature while typing - { - 'ray-x/lsp_signature.nvim', - opts = { - bind = true, - handler_opts = { - border = "none" - }, - hint_prefix = Hint_sign, - hint_scheme = "DiagnosticSignHint" - } - } + "ray-x/lsp_signature.nvim", + opts = { + bind = true, + handler_opts = { + border = "none", + }, + hint_prefix = Hint_sign, + hint_scheme = "DiagnosticSignHint", + }, } diff --git a/.config/nvim/lua/plugins/lualine.lua b/.config/nvim/lua/plugins/lualine.lua index 0d0f569..96c83e8 100644 --- a/.config/nvim/lua/plugins/lualine.lua +++ b/.config/nvim/lua/plugins/lualine.lua @@ -1,82 +1,80 @@ return { -- statusline - { - "nvim-lualine/lualine.nvim", - dependencies = { - { - "nvim-tree/nvim-web-devicons", - lazy = true, - }, - { - "f-person/git-blame.nvim", - config = function() - vim.g.gitblame_display_virtual_text = 0 - end, - }, - { "tiyn/tccs.nvim" }, - { - "tiyn/action-hints.nvim", - config = function() - require("action-hints").setup({ - template = { - -- definition = { text = "D", color = "#add8e6" }, - -- references = { text = "R%s", color = "#ff6666" }, - definition = { text = Definition_sign, color = "#add8e6" }, - references = { text = Reference_sign, color = "#ff6666" }, - }, - }) - end, - }, + "nvim-lualine/lualine.nvim", + dependencies = { + { + "nvim-tree/nvim-web-devicons", + lazy = true, }, - config = function() - require("lualine").setup({ - options = { - globalstatus = true, - symbols = { - error = Error_sign, - warn = Warn_sign, - hint = Hint_sign, - info = Info_sign, + { + "f-person/git-blame.nvim", + config = function() + vim.g.gitblame_display_virtual_text = 0 + end, + }, + { "tiyn/tccs.nvim" }, + { + "tiyn/action-hints.nvim", + config = function() + require("action-hints").setup({ + template = { + -- definition = { text = "D", color = "#add8e6" }, + -- references = { text = "R%s", color = "#ff6666" }, + definition = { text = Definition_sign, color = "#add8e6" }, + references = { text = Reference_sign, color = "#ff6666" }, }, - theme = "tccs", - component_separators = { left = "", right = "" }, - section_separators = { left = "", right = "" }, - }, - sections = { - lualine_b = { - { - require("gitblame").get_current_blame_text, - cond = require("gitblame").is_blame_text_available, - }, - }, - lualine_c = {}, - lualine_x = { - require("action-hints").statusline, - "encoding", - "fileformat", - { - "filetype", - icon_only = true, - }, - }, - lualine_y = { - { - "filename", - file_status = true, - newfile_status = true, - path = 1, - shorting_target = 50, - symbols = { - modified = Lualine_signs["modified"], - readonly = Lualine_signs["readonly"], - unnamed = Lualine_signs["unnamed"], - newfile = Lualine_signs["newfile"], - }, - }, - }, - lualine_z = { "progress", "location" }, - }, - }) - end, + }) + end, + }, }, + config = function() + require("lualine").setup({ + options = { + globalstatus = true, + symbols = { + error = Error_sign, + warn = Warn_sign, + hint = Hint_sign, + info = Info_sign, + }, + theme = "tccs", + component_separators = { left = "", right = "" }, + section_separators = { left = "", right = "" }, + }, + sections = { + lualine_b = { + { + require("gitblame").get_current_blame_text, + cond = require("gitblame").is_blame_text_available, + }, + }, + lualine_c = {}, + lualine_x = { + require("action-hints").statusline, + "encoding", + "fileformat", + { + "filetype", + icon_only = true, + }, + }, + lualine_y = { + { + "filename", + file_status = true, + newfile_status = true, + path = 1, + shorting_target = 50, + symbols = { + modified = Lualine_signs["modified"], + readonly = Lualine_signs["readonly"], + unnamed = Lualine_signs["unnamed"], + newfile = Lualine_signs["newfile"], + }, + }, + }, + lualine_z = { "progress", "location" }, + }, + }) + end, } diff --git a/.config/nvim/lua/plugins/mason.lua b/.config/nvim/lua/plugins/mason.lua index 2c7a280..74a2c90 100644 --- a/.config/nvim/lua/plugins/mason.lua +++ b/.config/nvim/lua/plugins/mason.lua @@ -1,52 +1,50 @@ return { -- lang server installations - { - "williamboman/mason.nvim", - dependencies = { - { - "nvimtools/none-ls.nvim", - config = function() - require("null-ls").setup({ - sources = { - -- assembler - require("null-ls").builtins.formatting.asmfmt, - -- lua - require("null-ls").builtins.formatting.stylua, - -- markdown - require("null-ls").builtins.formatting.mdformat, - -- python - require("null-ls").builtins.formatting.isort, - require("null-ls").builtins.formatting.yapf, - -- shell - require("null-ls").builtins.formatting.shfmt, - -- yaml - require("null-ls").builtins.formatting.yamlfmt, - }, - }) - end, - }, - { - "jay-babu/mason-null-ls.nvim", - opts = { - automatic_installation = true, - ensure_installed = { + "williamboman/mason.nvim", + dependencies = { + { + "nvimtools/none-ls.nvim", + config = function() + require("null-ls").setup({ + sources = { -- assembler - "asmfmt", + require("null-ls").builtins.formatting.asmfmt, -- lua - "stylua", + require("null-ls").builtins.formatting.stylua, -- markdown - "mdformat", + require("null-ls").builtins.formatting.mdformat, -- python - "isort", - "yapf", + require("null-ls").builtins.formatting.isort, + require("null-ls").builtins.formatting.yapf, -- shell - "shfmt", + require("null-ls").builtins.formatting.shfmt, -- yaml - "yamlfmt", + require("null-ls").builtins.formatting.yamlfmt, }, + }) + end, + }, + { + "jay-babu/mason-null-ls.nvim", + opts = { + automatic_installation = true, + ensure_installed = { + -- assembler + "asmfmt", + -- lua + "stylua", + -- markdown + "mdformat", + -- python + "isort", + "yapf", + -- shell + "shfmt", + -- yaml + "yamlfmt", }, }, }, - opts = { ui = { icons = Install_signs } }, }, + opts = { ui = { icons = Install_signs } }, } diff --git a/.config/nvim/lua/plugins/modes.lua b/.config/nvim/lua/plugins/modes.lua index 18ab86f..48a90de 100644 --- a/.config/nvim/lua/plugins/modes.lua +++ b/.config/nvim/lua/plugins/modes.lua @@ -1,8 +1,7 @@ return { - { - "mvllow/modes.nvim", - config = function() - require("modes").setup() - end, - }, + -- decorations for the current line mode + "mvllow/modes.nvim", + config = function() + require("modes").setup() + end, } diff --git a/.config/nvim/lua/plugins/molten.lua b/.config/nvim/lua/plugins/molten.lua index 1216aa5..c016d4d 100644 --- a/.config/nvim/lua/plugins/molten.lua +++ b/.config/nvim/lua/plugins/molten.lua @@ -1,61 +1,60 @@ return { - { - "benlubas/molten-nvim", - version = "^1.0.0", - dependencies = { - { - "3rd/image.nvim", - opts = { - backend = "ueberzug", - max_width = 100, - max_height = 12, - max_height_window_percentage = math.huge, - max_width_window_percentage = math.huge, - window_overlap_clear_enabled = true, - window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "" }, - }, + -- jupyter notebook support + "benlubas/molten-nvim", + version = "^1.0.0", + dependencies = { + { + "3rd/image.nvim", + opts = { + backend = "ueberzug", + max_width = 100, + max_height = 12, + max_height_window_percentage = math.huge, + max_width_window_percentage = math.huge, + window_overlap_clear_enabled = true, + window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "" }, }, - { - "quarto-dev/quarto-nvim", - dependencies = { - "jmbuhr/otter.nvim", - "nvim-treesitter/nvim-treesitter", - }, - opts = { - lspFeatures = { - languages = { "python" }, - chunks = "all", - diagnostics = { - enabled = true, - triggers = { "BufWritePost" }, - }, - completion = { - enabled = true, - }, - }, - codeRunner = { + }, + { + "quarto-dev/quarto-nvim", + dependencies = { + "jmbuhr/otter.nvim", + "nvim-treesitter/nvim-treesitter", + }, + opts = { + lspFeatures = { + languages = { "python" }, + chunks = "all", + diagnostics = { + enabled = true, + triggers = { "BufWritePost" }, + }, + completion = { enabled = true, - default_method = "molten", }, }, - }, - { - "GCBallesteros/jupytext.nvim", - opts = { - style = "markdown", - output_extension = "md", - force_ft = "markdown", + codeRunner = { + enabled = true, + default_method = "molten", }, }, }, - build = ":UpdateRemotePlugins", - init = function() - vim.g.molten_auto_open_output = false - vim.g.molten_wrap_output = true - vim.g.molten_virt_text_output = true - vim.g.molten_virt_lines_off_by_1 = true - vim.g.molten_image_provider = "image.nvim" - vim.g.molten_output_win_max_height = 20 - end, + { + "GCBallesteros/jupytext.nvim", + opts = { + style = "markdown", + output_extension = "md", + force_ft = "markdown", + }, + }, }, + build = ":UpdateRemotePlugins", + init = function() + vim.g.molten_auto_open_output = false + vim.g.molten_wrap_output = true + vim.g.molten_virt_text_output = true + vim.g.molten_virt_lines_off_by_1 = true + vim.g.molten_image_provider = "image.nvim" + vim.g.molten_output_win_max_height = 20 + end, } diff --git a/.config/nvim/lua/plugins/nvim-cmp.lua b/.config/nvim/lua/plugins/nvim-cmp.lua index e99c68e..e2368bf 100644 --- a/.config/nvim/lua/plugins/nvim-cmp.lua +++ b/.config/nvim/lua/plugins/nvim-cmp.lua @@ -1,88 +1,86 @@ return { -- autocompletion and its sources and snippets - { - 'hrsh7th/nvim-cmp', - dependencies = { - 'nvim-lua/plenary.nvim', - 'onsails/lspkind-nvim', - -- cmp sources - 'hrsh7th/cmp-buffer', - 'hrsh7th/cmp-path', - 'uga-rosa/cmp-dictionary', - 'lukas-reineke/cmp-under-comparator', - -- luasnip - { - 'l3mon4d3/luasnip', - config = function() - require("luasnip.loaders.from_snipmate").lazy_load() - end, - version = "v2.*", - build = "make install_jsregexp", - dependencies = { 'saadparwaiz1/cmp_luasnip' } - }, + "hrsh7th/nvim-cmp", + dependencies = { + "nvim-lua/plenary.nvim", + "onsails/lspkind-nvim", + -- cmp sources + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + "uga-rosa/cmp-dictionary", + "lukas-reineke/cmp-under-comparator", + -- luasnip + { + "l3mon4d3/luasnip", + config = function() + require("luasnip.loaders.from_snipmate").lazy_load() + end, + version = "v2.*", + build = "make install_jsregexp", + dependencies = { "saadparwaiz1/cmp_luasnip" }, }, - config = function() - local cmp = require("cmp") - cmp.setup { - sorting = { - comparators = { - cmp.config.compare.offset, - cmp.config.compare.exact, - cmp.config.compare.score, - require "cmp-under-comparator".under, - cmp.config.compare.kind, - cmp.config.compare.sort_text, - cmp.config.compare.length, - cmp.config.compare.order - }, + }, + config = function() + local cmp = require("cmp") + cmp.setup({ + sorting = { + comparators = { + cmp.config.compare.offset, + cmp.config.compare.exact, + cmp.config.compare.score, + require("cmp-under-comparator").under, + cmp.config.compare.kind, + cmp.config.compare.sort_text, + cmp.config.compare.length, + cmp.config.compare.order, }, - snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) + }, + snippet = { + expand = function(args) + require("luasnip").lsp_expand(args.body) + end, + }, + mapping = { + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif require("luasnip").jumpable(-1) then + require("luasnip").jump(-1) + else + fallback() end - }, - mapping = { - [''] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif require("luasnip").jumpable(-1) then - require("luasnip").jump(-1) - else - fallback() - end - end, { "i", "s" }), - [''] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif require("luasnip").expand_or_jumpable() then - require("luasnip").expand_or_jump() - else - fallback() - end - end, { "i", "s" }), - [''] = cmp.mapping.close(), - [''] = cmp.mapping.confirm { - behavior = cmp.ConfirmBehavior.Replace, - select = true - } - }, - sources = { - { name = 'nvim_lsp' }, - { name = 'luasnip' }, - { name = 'path' }, - { name = 'buffer' }, - { name = 'dictionary' } - }, - formatting = { - format = require("lspkind").cmp_format({ - mode = "symbol_text", - preset = "codicons", - maxwidth = 50, - menu = Menu_signs, - symbol_map = Lsp_signs - }) - } - } - end - } + end, { "i", "s" }), + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif require("luasnip").expand_or_jumpable() then + require("luasnip").expand_or_jump() + else + fallback() + end + end, { "i", "s" }), + [""] = cmp.mapping.close(), + [""] = cmp.mapping.confirm({ + behavior = cmp.ConfirmBehavior.Replace, + select = true, + }), + }, + sources = { + { name = "nvim_lsp" }, + { name = "luasnip" }, + { name = "path" }, + { name = "buffer" }, + { name = "dictionary" }, + }, + formatting = { + format = require("lspkind").cmp_format({ + mode = "symbol_text", + preset = "codicons", + maxwidth = 50, + menu = Menu_signs, + symbol_map = Lsp_signs, + }), + }, + }) + end, } diff --git a/.config/nvim/lua/plugins/nvim-colorizer.lua b/.config/nvim/lua/plugins/nvim-colorizer.lua index 3969d23..a6beb01 100644 --- a/.config/nvim/lua/plugins/nvim-colorizer.lua +++ b/.config/nvim/lua/plugins/nvim-colorizer.lua @@ -1,29 +1,27 @@ return { -- showing color of hex values, etc - { - 'ChristianChiarulli/nvim-colorizer.lua', - opts = { - filetypes = { - '*', - '!markdown' - }, - user_default_options = { - RGB = true, - RRGGBB = true, - RRGGBBAA = true, - AARRGGBB = true, - rgb_fn = true, - hsl_fn = true, - css_fn = true, - mode = "virtualtext", - virtualtext = " ", - }, - -- all the sub-options of filetypes apply to buftypes - buftypes = { - "*", - "!prompt", - "!popup" - }, - } - } + "ChristianChiarulli/nvim-colorizer.lua", + opts = { + filetypes = { + "*", + "!markdown", + }, + user_default_options = { + RGB = true, + RRGGBB = true, + RRGGBBAA = true, + AARRGGBB = true, + rgb_fn = true, + hsl_fn = true, + css_fn = true, + mode = "virtualtext", + virtualtext = " ", + }, + -- all the sub-options of filetypes apply to buftypes + buftypes = { + "*", + "!prompt", + "!popup", + }, + }, } diff --git a/.config/nvim/lua/plugins/nvim-docs-view.lua b/.config/nvim/lua/plugins/nvim-docs-view.lua index d992cfd..becf6b4 100644 --- a/.config/nvim/lua/plugins/nvim-docs-view.lua +++ b/.config/nvim/lua/plugins/nvim-docs-view.lua @@ -1,4 +1,5 @@ return { + -- hover documentation "tiyn/nvim-docs-view", lazy = true, cmd = "DocsViewToggle", diff --git a/.config/nvim/lua/plugins/nvim-hlslens.lua b/.config/nvim/lua/plugins/nvim-hlslens.lua index c3c897a..88575f5 100644 --- a/.config/nvim/lua/plugins/nvim-hlslens.lua +++ b/.config/nvim/lua/plugins/nvim-hlslens.lua @@ -1,8 +1,7 @@ return { - { - 'kevinhwang91/nvim-hlslens', - opts = { - calm_down = true, - } - } + -- improved virtual text + "kevinhwang91/nvim-hlslens", + opts = { + calm_down = true, + }, } diff --git a/.config/nvim/lua/plugins/nvim-lilypond-suite.lua b/.config/nvim/lua/plugins/nvim-lilypond-suite.lua index a3c6b74..b88a76c 100644 --- a/.config/nvim/lua/plugins/nvim-lilypond-suite.lua +++ b/.config/nvim/lua/plugins/nvim-lilypond-suite.lua @@ -1,4 +1,5 @@ return { + -- lillypond integration "martineausimon/nvim-lilypond-suite", dependencies = "uga-rosa/cmp-dictionary", config = function() diff --git a/.config/nvim/lua/plugins/nvim-lspconfig.lua b/.config/nvim/lua/plugins/nvim-lspconfig.lua index 92657a2..4c0211e 100644 --- a/.config/nvim/lua/plugins/nvim-lspconfig.lua +++ b/.config/nvim/lua/plugins/nvim-lspconfig.lua @@ -1,98 +1,99 @@ return { -- lang server management - { - "neovim/nvim-lspconfig", - dependencies = { - "williamboman/mason-lspconfig.nvim", - { - "mrcjkb/rustaceanvim", - version = "^6", - lazy = false, - }, - { - "hrsh7th/cmp-nvim-lsp", - config = function() - Capabilities = require("cmp_nvim_lsp").default_capabilities() - Capabilities.textDocument.foldingRange = { - dynamicRegistration = false, - lineFoldingOnly = true, - } - end, - }, + "neovim/nvim-lspconfig", + dependencies = { + "williamboman/mason-lspconfig.nvim", + { + "mrcjkb/rustaceanvim", + version = "^6", + lazy = false, }, - config = function() - require("mason-lspconfig").setup({ - automatic_setup = true, - ensure_installed = { - -- assembler - "asm_lsp", - -- c - "clangd", - -- docker - "dockerls", - -- go - "gopls", - -- html - "html", - -- json - "jsonls", - -- xml - "lemminx", - -- latex - "ltex", - "texlab", - -- lua - "lua_ls", - -- markdown - "marksman", - -- nim - "nimls", - -- python - "pyright", - -- r - "r_language_server", - -- shell - "bashls", - -- sql - "sqlls", - -- typescript / javascript - "ts_ls", - -- yaml - "yamlls", - }, - }) - local default_flags = { - debounce_text_changes = 150, - allow_incremental_sync = true, - progress = true, - } - local servers = { - ltex = { - settings = { - ltex = { - -- language = "de-DE", - enabled = { "latex", "markdown" }, - dictionary = Dictionaries, - }, + { + "hrsh7th/cmp-nvim-lsp", + config = function() + Capabilities = require("cmp_nvim_lsp").default_capabilities() + Capabilities.textDocument.foldingRange = { + dynamicRegistration = false, + lineFoldingOnly = true, + } + end, + }, + }, + config = function() + require("mason-lspconfig").setup({ + automatic_setup = true, + ensure_installed = { + -- assembler + "asm_lsp", + -- c + "clangd", + -- docker + "dockerls", + -- go + "gopls", + -- html + "html", + -- json + "jsonls", + -- xml + "lemminx", + -- latex + "ltex", + "texlab", + -- lua + "lua_ls", + -- markdown + "marksman", + -- nim + "nimls", + -- python + "pyright", + -- r + "r_language_server", + -- shell + "bashls", + -- sql + "sqlls", + -- typescript / javascript + "ts_ls", + -- yaml + "yamlls", + }, + }) + local default_flags = { + debounce_text_changes = 150, + allow_incremental_sync = true, + progress = true, + } + local servers = { + ltex = { + settings = { + ltex = { + -- language = "de-DE", + enabled = { "latex", "markdown" }, + dictionary = Dictionaries, }, }, - lua_ls = { - settings = { - lua = { - diagnostics = { globals = { "vim" } }, - telemetry = { enable = false }, - }, + }, + lua_ls = { + settings = { + lua = { + diagnostics = { globals = { "vim" } }, + telemetry = { enable = false }, }, }, - pyright = {} - } - for name, config in pairs(servers) do - vim.lsp.config(name, vim.tbl_extend("force", config, { + }, + pyright = {}, + } + for name, config in pairs(servers) do + vim.lsp.config( + name, + vim.tbl_extend("force", config, { on_attach = on_attach, capabilities = Capabilities, flags = default_flags, - })) - end - end, - }, + }) + ) + end + end, } diff --git a/.config/nvim/lua/plugins/nvim-scrollbar.lua b/.config/nvim/lua/plugins/nvim-scrollbar.lua index b633901..2647f37 100644 --- a/.config/nvim/lua/plugins/nvim-scrollbar.lua +++ b/.config/nvim/lua/plugins/nvim-scrollbar.lua @@ -1,59 +1,57 @@ return { -- scrollbar with git and diagnostics support for easier navigation - { - 'petertriho/nvim-scrollbar', - dependencies = { - 'kevinhwang91/nvim-hlslens', - 'lewis6991/gitsigns.nvim' - }, - config = function() - require("scrollbar").setup({ - marks = { - Cursor = { - highlight = "Normal" - }, - Search = { - highlight = "Special" - }, - Error = { - highlight = "DiagnosticSignError" - }, - Warn = { - highlight = "DiagnosticSignWarn" - }, - Info = { - highlight = "DiagnosticSignInfo" - }, - Hint = { - highlight = "DiagnosticSignHint" - }, - Misc = { - highlight = "Special" - }, - GitAdd = { - highlight = "GitGutterAdd" - }, - GitChange = { - highlight = "GitGutterChange" - }, - GitDelete = { - highlight = "GitGutterDelete" - } + "petertriho/nvim-scrollbar", + dependencies = { + "kevinhwang91/nvim-hlslens", + "lewis6991/gitsigns.nvim", + }, + config = function() + require("scrollbar").setup({ + marks = { + Cursor = { + highlight = "Normal", }, - excluded_filetypes = { - "cmp_docs", - "cmp_menu", - "noice", - "prompt", - "TelescopePrompt", - "NvimTree", - "Navbuddy", - "FTerm", - "", + Search = { + highlight = "Special", }, - }) - require("scrollbar.handlers.search").setup() - require("scrollbar.handlers.gitsigns").setup() - end - } + Error = { + highlight = "DiagnosticSignError", + }, + Warn = { + highlight = "DiagnosticSignWarn", + }, + Info = { + highlight = "DiagnosticSignInfo", + }, + Hint = { + highlight = "DiagnosticSignHint", + }, + Misc = { + highlight = "Special", + }, + GitAdd = { + highlight = "GitGutterAdd", + }, + GitChange = { + highlight = "GitGutterChange", + }, + GitDelete = { + highlight = "GitGutterDelete", + }, + }, + excluded_filetypes = { + "cmp_docs", + "cmp_menu", + "noice", + "prompt", + "TelescopePrompt", + "NvimTree", + "Navbuddy", + "FTerm", + "", + }, + }) + require("scrollbar.handlers.search").setup() + require("scrollbar.handlers.gitsigns").setup() + end, } diff --git a/.config/nvim/lua/plugins/nvim-surround.lua b/.config/nvim/lua/plugins/nvim-surround.lua index a900f9e..4a450ec 100644 --- a/.config/nvim/lua/plugins/nvim-surround.lua +++ b/.config/nvim/lua/plugins/nvim-surround.lua @@ -1,9 +1,7 @@ return { -- additional quote/parantheses funtions - { - 'kylechui/nvim-surround', - version = "*", - event = "VeryLazy", - opts = {} - } + "kylechui/nvim-surround", + version = "*", + event = "VeryLazy", + opts = {}, } diff --git a/.config/nvim/lua/plugins/nvim-tree.lua b/.config/nvim/lua/plugins/nvim-tree.lua index 1d7ea96..078a8be 100644 --- a/.config/nvim/lua/plugins/nvim-tree.lua +++ b/.config/nvim/lua/plugins/nvim-tree.lua @@ -1,30 +1,28 @@ return { -- fileexplorer on the side - { - "nvim-tree/nvim-tree.lua", - cmd = "NvimTreeToggle", - dependencies = { - { - "nvim-tree/nvim-web-devicons", - lazy = true + "nvim-tree/nvim-tree.lua", + cmd = "NvimTreeToggle", + dependencies = { + { + "nvim-tree/nvim-web-devicons", + lazy = true, + }, + }, + opts = { + sort_by = "case_sensitive", + view = { + width = 30, + }, + filters = { + dotfiles = true, + }, + renderer = { + group_empty = true, + icons = { + glyphs = { + git = Git_signs, + }, }, }, - opts = { - sort_by = "case_sensitive", - view = { - width = 30, - }, - filters = { - dotfiles = true, - }, - renderer = { - group_empty = true, - icons = { - glyphs = { - git = Git_signs - }, - }, - } - } - } + }, } diff --git a/.config/nvim/lua/plugins/nvim-treesitter.lua b/.config/nvim/lua/plugins/nvim-treesitter.lua index f870843..1e88e54 100644 --- a/.config/nvim/lua/plugins/nvim-treesitter.lua +++ b/.config/nvim/lua/plugins/nvim-treesitter.lua @@ -1,38 +1,36 @@ return { -- better language highlighting by improved parsing - { - 'nvim-treesitter/nvim-treesitter', - build = ':TSUpdate', - dependencies = { - -- automatically close html-tags - 'windwp/nvim-ts-autotag', - -- color brackets - -- 'p00f/nvim-ts-rainbow', - }, - config = function() - require("nvim-treesitter.configs").setup({ - ensure_installed = { - "bash", - "css", - "html", - "markdown", - "markdown_inline", - "latex", - "python", - "rust", - "lua", - "yaml", - }, - -- highlight = { enable = true }, - autotag = { enable = false }, - -- rainbow = { - -- enable = true, - -- extended_mode = true, - -- max_file_lines = nil, - -- -- colors = {}, - -- -- termcolors = {} - -- } - }) - end - } + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + dependencies = { + -- automatically close html-tags + "windwp/nvim-ts-autotag", + -- color brackets + -- 'p00f/nvim-ts-rainbow', + }, + config = function() + require("nvim-treesitter.configs").setup({ + ensure_installed = { + "bash", + "css", + "html", + "markdown", + "markdown_inline", + "latex", + "python", + "rust", + "lua", + "yaml", + }, + -- highlight = { enable = true }, + autotag = { enable = false }, + -- rainbow = { + -- enable = true, + -- extended_mode = true, + -- max_file_lines = nil, + -- -- colors = {}, + -- -- termcolors = {} + -- } + }) + end, } diff --git a/.config/nvim/lua/plugins/nvim-ufo.lua b/.config/nvim/lua/plugins/nvim-ufo.lua index 5cdb466..0ac57da 100644 --- a/.config/nvim/lua/plugins/nvim-ufo.lua +++ b/.config/nvim/lua/plugins/nvim-ufo.lua @@ -1,20 +1,20 @@ return { -- folding improvements - { - 'kevinhwang91/nvim-ufo', - dependencies = { 'kevinhwang91/promise-async' }, - config = function() - require('ufo').setup() - vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' }, - { - pattern = { '*' }, - callback = function() require("ufo").closeAllFolds() end - }) - vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' }, - { - pattern = { '*' }, - callback = function() require("ufo").openAllFolds() end - }) - end - } + "kevinhwang91/nvim-ufo", + dependencies = { "kevinhwang91/promise-async" }, + config = function() + require("ufo").setup() + vim.api.nvim_create_autocmd({ "BufEnter", "FileType" }, { + pattern = { "*" }, + callback = function() + require("ufo").closeAllFolds() + end, + }) + vim.api.nvim_create_autocmd({ "BufEnter", "FileType" }, { + pattern = { "*" }, + callback = function() + require("ufo").openAllFolds() + end, + }) + end, } diff --git a/.config/nvim/lua/plugins/ogpt.lua b/.config/nvim/lua/plugins/ogpt.lua index 31cb05a..b216ae5 100644 --- a/.config/nvim/lua/plugins/ogpt.lua +++ b/.config/nvim/lua/plugins/ogpt.lua @@ -1,6 +1,7 @@ return { -{ - "huynle/ogpt.nvim", + -- ollama llm integration + { + "huynle/ogpt.nvim", event = "VeryLazy", opts = { default_provider = "ollama", @@ -11,16 +12,16 @@ return { api_host = "http://localhost:11434", -- free resources: https://github.com/cheahjs/free-llm-api-resources api_key = "", model = "deepseek-r1:7b", - } - } + }, + }, }, dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim", - "nvim-telescope/telescope.nvim" - } -}, -{ + "nvim-telescope/telescope.nvim", + }, + }, + { "folke/edgy.nvim", event = "VeryLazy", init = function() @@ -135,5 +136,5 @@ return { }, }, }, - } + }, } diff --git a/.config/nvim/lua/plugins/oil.lua b/.config/nvim/lua/plugins/oil.lua index 8a76212..d107c0c 100644 --- a/.config/nvim/lua/plugins/oil.lua +++ b/.config/nvim/lua/plugins/oil.lua @@ -1,10 +1,8 @@ return { -- rename files in buffer - { - "stevearc/oil.nvim", - ---@module 'oil' - ---@type oil.setupopts - opts = {}, - dependencies = { "nvim-mini/mini.icons" }, - }, + "stevearc/oil.nvim", + ---@module 'oil' + ---@type oil.setupopts + opts = {}, + dependencies = { "nvim-mini/mini.icons" }, } diff --git a/.config/nvim/lua/plugins/outline.lua b/.config/nvim/lua/plugins/outline.lua index 985f98a..644ea6b 100644 --- a/.config/nvim/lua/plugins/outline.lua +++ b/.config/nvim/lua/plugins/outline.lua @@ -1,13 +1,12 @@ return { - { - "hedyhli/outline.nvim", - opts = { - outline_window = { - width = 25 - }, - symbols = { - icon_source = 'lspkind', - } - } - } + -- outline for code + "hedyhli/outline.nvim", + opts = { + outline_window = { + width = 25, + }, + symbols = { + icon_source = "lspkind", + }, + }, } diff --git a/.config/nvim/lua/plugins/papis.lua b/.config/nvim/lua/plugins/papis.lua index 75a0f46..2698b88 100644 --- a/.config/nvim/lua/plugins/papis.lua +++ b/.config/nvim/lua/plugins/papis.lua @@ -1,32 +1,16 @@ return { + -- support for papis bibliography manager "jghauser/papis.nvim", dependencies = { "kkharji/sqlite.lua", "MunifTanjim/nui.nvim", - -- If not already installed, you may also want one of: "hrsh7th/nvim-cmp", - -- { - -- "saghen/blink.cmp", - -- config = function() - -- require("blink.cmp").setup({ - -- sources = { - -- -- add 'papis' to the list of sources for the yaml filetype - -- per_filetype = { - -- yaml = { "papis" } - -- }, - -- } - -- }) - -- end, - -- }, - -- Choose one of the following two if not already installed: "nvim-telescope/telescope.nvim", - -- "folke/snacks.nvim", - }, config = function() require("papis").setup({ - -- Your configuration goes here - enable_keymaps = true, + -- Your configuration goes here + enable_keymaps = false, }) end, } diff --git a/.config/nvim/lua/plugins/projections.lua b/.config/nvim/lua/plugins/projections.lua index ee73c46..7ec70cc 100644 --- a/.config/nvim/lua/plugins/projections.lua +++ b/.config/nvim/lua/plugins/projections.lua @@ -1,4 +1,5 @@ return { + -- navigate between projects using telescope "gnikdroy/projections.nvim", dependencies = { "nvim-telescope/telescope.nvim" }, branch = "pre_release", diff --git a/.config/nvim/lua/plugins/renamer.lua b/.config/nvim/lua/plugins/renamer.lua index 70a0ec2..0430967 100644 --- a/.config/nvim/lua/plugins/renamer.lua +++ b/.config/nvim/lua/plugins/renamer.lua @@ -1,9 +1,7 @@ return { -- improved gui for renaming - { - "filipdutescu/renamer.nvim", - branch = "master", - dependencies = { "nvim-lua/plenary.nvim" }, - opts = {}, - }, + "filipdutescu/renamer.nvim", + branch = "master", + dependencies = { "nvim-lua/plenary.nvim" }, + opts = {}, } diff --git a/.config/nvim/lua/plugins/spelunker.lua b/.config/nvim/lua/plugins/spelunker.lua index 3e037fe..16c9282 100644 --- a/.config/nvim/lua/plugins/spelunker.lua +++ b/.config/nvim/lua/plugins/spelunker.lua @@ -1,12 +1,12 @@ return { -- improve spelling check for coding to feature camelcase, etc { - 'kamykn/spelunker.vim', - dependencies = { 'kamykn/popup-menu.nvim' }, + "kamykn/spelunker.vim", + dependencies = { "kamykn/popup-menu.nvim" }, config = function() -- vim.o.nospell = true vim.g.enable_spelunker_vim = 0 vim.g.spelunker_disable_acronym_checking = 1 - end - } + end, + }, } diff --git a/.config/nvim/lua/plugins/tccs.lua b/.config/nvim/lua/plugins/tccs.lua index 06b7373..0878635 100644 --- a/.config/nvim/lua/plugins/tccs.lua +++ b/.config/nvim/lua/plugins/tccs.lua @@ -1,13 +1,13 @@ return { -- colorscheme { - 'tiyn/tccs.nvim', + "tiyn/tccs.nvim", lazy = false, priority = 1000, config = function() - require('tccs').setup({ - require('tccs').load() + require("tccs").setup({ + require("tccs").load(), }) - end - } + end, + }, } diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua index dc31800..41dfce9 100644 --- a/.config/nvim/lua/plugins/telescope.lua +++ b/.config/nvim/lua/plugins/telescope.lua @@ -1,12 +1,12 @@ return { -- fuzzy finder { - 'nvim-telescope/telescope.nvim', - version = '0.1.2', + "nvim-telescope/telescope.nvim", + version = "0.1.2", dependencies = { - 'nvim-lua/plenary.nvim', - 'archie-judd/telescope-words.nvim' + "nvim-lua/plenary.nvim", + "archie-judd/telescope-words.nvim", }, - opts = {} - } + opts = {}, + }, } diff --git a/.config/nvim/lua/plugins/tidy.lua b/.config/nvim/lua/plugins/tidy.lua index 7482108..73d45e1 100644 --- a/.config/nvim/lua/plugins/tidy.lua +++ b/.config/nvim/lua/plugins/tidy.lua @@ -4,7 +4,7 @@ return { "mcauley-penney/tidy.nvim", branch = "main", opts = { - filetype_exclude = { "diff" } - } - } + filetype_exclude = { "diff" }, + }, + }, } diff --git a/.config/nvim/lua/plugins/todo-comments.lua b/.config/nvim/lua/plugins/todo-comments.lua index e2b5942..0bf34ce 100644 --- a/.config/nvim/lua/plugins/todo-comments.lua +++ b/.config/nvim/lua/plugins/todo-comments.lua @@ -1,8 +1,8 @@ return { -- todo symbols and highlighting { - 'folke/todo-comments.nvim', - dependencies = { 'nvim-lua/plenary.nvim' }, + "folke/todo-comments.nvim", + dependencies = { "nvim-lua/plenary.nvim" }, opts = { keywords = { ERRO = { icon = Error_sign, color = "error" }, @@ -12,11 +12,11 @@ return { TODO = { icon = Todo_sign, color = "info" }, INFO = { icon = Info_sign, color = "hint", alt = { "NOTE" } }, PERF = { icon = Perfect_sign, color = "default" }, - TEST = { icon = Test_sign, color = "test" } + TEST = { icon = Test_sign, color = "test" }, }, colors = { - default = { "Operator" } - } - } - } + default = { "Operator" }, + }, + }, + }, } diff --git a/.config/nvim/lua/plugins/trouble.lua b/.config/nvim/lua/plugins/trouble.lua index 894469a..a2652b6 100644 --- a/.config/nvim/lua/plugins/trouble.lua +++ b/.config/nvim/lua/plugins/trouble.lua @@ -1,13 +1,11 @@ return { -- list of errors - { - 'folke/trouble.nvim', - dependencies = { - { - 'nvim-tree/nvim-web-devicons', - lazy = true - } + "folke/trouble.nvim", + dependencies = { + { + "nvim-tree/nvim-web-devicons", + lazy = true, }, - opts = {} - } + }, + opts = {}, } diff --git a/.config/nvim/lua/plugins/undotree.lua b/.config/nvim/lua/plugins/undotree.lua index d35bee7..0c59e95 100644 --- a/.config/nvim/lua/plugins/undotree.lua +++ b/.config/nvim/lua/plugins/undotree.lua @@ -1,6 +1,4 @@ return { -- tree style undo visualizer - { - 'mbbill/undotree' - } + "mbbill/undotree", } diff --git a/.config/nvim/lua/plugins/vim-abolish.lua b/.config/nvim/lua/plugins/vim-abolish.lua index 1d12a5c..cb2536e 100644 --- a/.config/nvim/lua/plugins/vim-abolish.lua +++ b/.config/nvim/lua/plugins/vim-abolish.lua @@ -1,8 +1,5 @@ return { -- better substitutions - { - 'tpope/vim-abolish', - config = function () - end - } + "tpope/vim-abolish", + config = function() end, } diff --git a/.config/nvim/lua/plugins/vim-illuminate.lua b/.config/nvim/lua/plugins/vim-illuminate.lua index 65f511a..224f2bb 100644 --- a/.config/nvim/lua/plugins/vim-illuminate.lua +++ b/.config/nvim/lua/plugins/vim-illuminate.lua @@ -1,5 +1,4 @@ return { - { - "RRethy/vim-illuminate" - } + -- highlight other occurences of the same word + "RRethy/vim-illuminate", } diff --git a/.config/nvim/lua/plugins/vim-markdown.lua b/.config/nvim/lua/plugins/vim-markdown.lua index 8748c52..a896682 100644 --- a/.config/nvim/lua/plugins/vim-markdown.lua +++ b/.config/nvim/lua/plugins/vim-markdown.lua @@ -1,10 +1,7 @@ return { -- markdown improvements - { - 'preservim/vim-markdown', - ft = { 'markdown' }, - dependencies = { 'godlygeek/tabular' }, - config = function() - end - } + "preservim/vim-markdown", + ft = { "markdown" }, + dependencies = { "godlygeek/tabular" }, + config = function() end, } diff --git a/.config/nvim/lua/plugins/which-key.lua b/.config/nvim/lua/plugins/which-key.lua index 1e5815b..3c69889 100644 --- a/.config/nvim/lua/plugins/which-key.lua +++ b/.config/nvim/lua/plugins/which-key.lua @@ -1,6 +1,4 @@ return { -- improved keybindings, previewing them - { - "folke/which-key.nvim", - } - } + "folke/which-key.nvim", +} diff --git a/.config/nvim/lua/plugins/winshift.lua b/.config/nvim/lua/plugins/winshift.lua index adee4ad..f8f9adb 100644 --- a/.config/nvim/lua/plugins/winshift.lua +++ b/.config/nvim/lua/plugins/winshift.lua @@ -1,7 +1,5 @@ return { -- improved movement of windows - { - "sindrets/winshift.nvim", - opts = {}, - }, + "sindrets/winshift.nvim", + opts = {}, } diff --git a/.config/nvim/lua/style.lua b/.config/nvim/lua/style.lua index e714846..58f3770 100644 --- a/.config/nvim/lua/style.lua +++ b/.config/nvim/lua/style.lua @@ -21,7 +21,6 @@ Menu_signs = { path = "", } - Lsp_signs = { Array = "", Boolean = "⊥", @@ -108,6 +107,7 @@ Lualine_signs = { } vim.diagnostic.config({ + virtual_text = false, severity_sort = true, signs = { text = {