diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index e4e8ba2..3290b40 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -76,6 +76,7 @@ "sqlite.lua": { "branch": "master", "commit": "50092d60feb242602d7578398c6eb53b4a8ffe7b" }, "tabular": { "branch": "master", "commit": "12437cd1b53488e24936ec4b091c9324cafee311" }, "tccs.nvim": { "branch": "master", "commit": "23fabbb0a65517307e571f63fe7a3760670086fe" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, "telescope-words.nvim": { "branch": "main", "commit": "295d51fe1e525fee18c0c164ad0ae5fb23273aa0" }, "telescope.nvim": { "branch": "master", "commit": "3333a52ff548ba0a68af6d8da1e54f9cd96e9179" }, "tidy.nvim": { "branch": "main", "commit": "8b6921150b16f38f48a2459a844a0c2b4c916914" }, diff --git a/.config/nvim/lua/plugins/action-hints.lua b/.config/nvim/lua/plugins/action-hints.lua new file mode 100644 index 0000000..720b171 --- /dev/null +++ b/.config/nvim/lua/plugins/action-hints.lua @@ -0,0 +1,15 @@ +return { + -- display available options for highlighted word + "tiyn/action-hints.nvim", + lazy = true, -- load as dependency + 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, +} diff --git a/.config/nvim/lua/plugins/barbecue.lua b/.config/nvim/lua/plugins/barbecue.lua index dd999dc..e465118 100644 --- a/.config/nvim/lua/plugins/barbecue.lua +++ b/.config/nvim/lua/plugins/barbecue.lua @@ -7,6 +7,7 @@ return { "SmiteshP/nvim-navic", "nvim-tree/nvim-web-devicons", -- optional dependency }, + lazy = false, opts = { theme = { normal = { bg = "#272727" }, diff --git a/.config/nvim/lua/plugins/blink-pairs.lua b/.config/nvim/lua/plugins/blink-pairs.lua index f0bf665..26f325b 100644 --- a/.config/nvim/lua/plugins/blink-pairs.lua +++ b/.config/nvim/lua/plugins/blink-pairs.lua @@ -1,8 +1,9 @@ return { - -- rainbow auto-pairs + -- rainbow and auto-pairs for parenthesis "saghen/blink.pairs", version = "*", -- (recommended) only required with prebuilt binaries - dependencies = "saghen/blink.download", -- download prebuilt binaries from github releases + dependencies = { "saghen/blink.download" }, -- download prebuilt binaries from github releases + lazy = false, --- @module 'blink.pairs' --- @type blink.pairs.Config opts = { diff --git a/.config/nvim/lua/plugins/cmp-nvim-lsp.lua b/.config/nvim/lua/plugins/cmp-nvim-lsp.lua new file mode 100644 index 0000000..c7b5bf3 --- /dev/null +++ b/.config/nvim/lua/plugins/cmp-nvim-lsp.lua @@ -0,0 +1,5 @@ +return { + -- nvim-cmp source for lsp + "hrsh7th/cmp-nvim-lsp", + lazy = true, -- load as dependency +} diff --git a/.config/nvim/lua/plugins/comment.lua b/.config/nvim/lua/plugins/comment.lua index c9ceaa4..95b20b2 100644 --- a/.config/nvim/lua/plugins/comment.lua +++ b/.config/nvim/lua/plugins/comment.lua @@ -1,5 +1,6 @@ return { -- commenting improvements "numtostr/comment.nvim", + lazy = false, opts = {}, } diff --git a/.config/nvim/lua/plugins/csvview.lua b/.config/nvim/lua/plugins/csvview.lua index 0c104a9..644c7cf 100644 --- a/.config/nvim/lua/plugins/csvview.lua +++ b/.config/nvim/lua/plugins/csvview.lua @@ -1,8 +1,7 @@ return { -- improved csv handling "hat0uma/csvview.nvim", - ft = "csv", - cmd = { "CsvViewEnable", "CsvViewDisable", "CsvViewToggle" }, + ft = { "csv" }, opts = { parser = { comments = { "#", "//" } }, keymaps = { diff --git a/.config/nvim/lua/plugins/edgy.lua b/.config/nvim/lua/plugins/edgy.lua new file mode 100644 index 0000000..3537ad9 --- /dev/null +++ b/.config/nvim/lua/plugins/edgy.lua @@ -0,0 +1,117 @@ +return { + -- better predefined window layouts + "folke/edgy.nvim", + lazy = true, -- load as dependency + init = function() + vim.opt.laststatus = 3 + vim.opt.splitkeep = "screen" -- or "topline" or "screen" + end, + opts = { + exit_when_last = false, + animate = { + enabled = false, + }, + wo = { + winbar = true, + winfixwidth = true, + winfixheight = false, + winhighlight = "WinBar:EdgyWinBar,Normal:EdgyNormal", + spell = false, + signcolumn = "no", + }, + keys = { + -- -- close window + ["q"] = function(win) + win:close() + end, + -- close sidebar + ["Q"] = function(win) + win.view.edgebar:close() + end, + -- increase width + [""] = function(win) + win:resize("width", 3) + end, + -- decrease width + [""] = function(win) + win:resize("width", -3) + end, + -- increase height + [""] = function(win) + win:resize("height", 3) + end, + -- decrease height + [""] = function(win) + win:resize("height", -3) + end, + }, + right = { + { + title = "OGPT Popup", + ft = "ogpt-popup", + size = { width = 0.2 }, + wo = { + wrap = true, + }, + }, + { + title = "OGPT Parameters", + ft = "ogpt-parameters-window", + size = { height = 6 }, + wo = { + wrap = true, + }, + }, + { + title = "OGPT Template", + ft = "ogpt-template", + size = { height = 6 }, + }, + { + title = "OGPT Sessions", + ft = "ogpt-sessions", + size = { height = 6 }, + wo = { + wrap = true, + }, + }, + { + title = "OGPT System Input", + ft = "ogpt-system-window", + size = { height = 6 }, + }, + { + title = "OGPT", + ft = "ogpt-window", + size = { height = 0.5 }, + wo = { + wrap = true, + }, + }, + { + title = "OGPT {{{selection}}}", + ft = "ogpt-selection", + size = { width = 80, height = 4 }, + wo = { + wrap = true, + }, + }, + { + title = "OGPt {{{instruction}}}", + ft = "ogpt-instruction", + size = { width = 80, height = 4 }, + wo = { + wrap = true, + }, + }, + { + title = "OGPT Chat", + ft = "ogpt-input", + size = { width = 80, height = 4 }, + wo = { + wrap = true, + }, + }, + }, + }, +} diff --git a/.config/nvim/lua/plugins/file-renamer.lua b/.config/nvim/lua/plugins/file-renamer.lua index c596980..8681ffc 100644 --- a/.config/nvim/lua/plugins/file-renamer.lua +++ b/.config/nvim/lua/plugins/file-renamer.lua @@ -1,4 +1,5 @@ return { -- rename files in buffer "tiyn/file-renamer.nvim", + cmd = { "Ren", "Renamer" }, } diff --git a/.config/nvim/lua/plugins/gitsigns.lua b/.config/nvim/lua/plugins/gitsigns.lua index e4d714e..b9e2037 100644 --- a/.config/nvim/lua/plugins/gitsigns.lua +++ b/.config/nvim/lua/plugins/gitsigns.lua @@ -1,5 +1,6 @@ return { -- display git status per line "lewis6991/gitsigns.nvim", + lazy = true, -- load as dependency opts = {}, } diff --git a/.config/nvim/lua/plugins/goto-preview.lua b/.config/nvim/lua/plugins/goto-preview.lua index c579eb1..026d126 100644 --- a/.config/nvim/lua/plugins/goto-preview.lua +++ b/.config/nvim/lua/plugins/goto-preview.lua @@ -1,7 +1,7 @@ return { -- preview definitions using floating windows "rmagatti/goto-preview", - dependencies = "rmagatti/logger.nvim", + dependencies = { "rmagatti/logger.nvim" }, keys = { { "gpd", diff --git a/.config/nvim/lua/plugins/image.lua b/.config/nvim/lua/plugins/image.lua new file mode 100644 index 0000000..9743fc1 --- /dev/null +++ b/.config/nvim/lua/plugins/image.lua @@ -0,0 +1,14 @@ +return { + -- display images inside neovim + "3rd/image.nvim", + lazy = true, -- load as dependency + 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", "" }, + }, +} diff --git a/.config/nvim/lua/plugins/indent-blankline.lua b/.config/nvim/lua/plugins/indent-blankline.lua index b956521..ae9184b 100644 --- a/.config/nvim/lua/plugins/indent-blankline.lua +++ b/.config/nvim/lua/plugins/indent-blankline.lua @@ -1,7 +1,7 @@ return { -- show indentation lines "lukas-reineke/indent-blankline.nvim", - event = "BufReadPre", + lazy = false, main = "ibl", opts = {}, } diff --git a/.config/nvim/lua/plugins/jupytext.lua b/.config/nvim/lua/plugins/jupytext.lua new file mode 100644 index 0000000..4957ffe --- /dev/null +++ b/.config/nvim/lua/plugins/jupytext.lua @@ -0,0 +1,10 @@ +return { + -- open jupyter notebooks as their plain text alternatives + "GCBallesteros/jupytext.nvim", + lazy = true, -- load as dependency + opts = { + style = "markdown", + output_extension = "md", + force_ft = "markdown", + }, +} diff --git a/.config/nvim/lua/plugins/lsp_signature.lua b/.config/nvim/lua/plugins/lsp_signature.lua index 0a75343..c6aeecc 100644 --- a/.config/nvim/lua/plugins/lsp_signature.lua +++ b/.config/nvim/lua/plugins/lsp_signature.lua @@ -1,6 +1,7 @@ return { -- show function signature while typing "ray-x/lsp_signature.nvim", + lazy = false, opts = { bind = true, handler_opts = { diff --git a/.config/nvim/lua/plugins/lualine.lua b/.config/nvim/lua/plugins/lualine.lua index d6e1bcf..6c314f8 100644 --- a/.config/nvim/lua/plugins/lualine.lua +++ b/.config/nvim/lua/plugins/lualine.lua @@ -4,26 +4,10 @@ return { dependencies = { "nvim-tree/nvim-web-devicons", "tiyn/tccs.nvim", - { - "f-person/git-blame.nvim", - config = function() - vim.g.gitblame_display_virtual_text = 0 - end, - }, - { - "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, - }, + "f-person/git-blame.nvim", + "tiyn/action-hints.nvim", }, + lazy = false, opts = { options = { globalstatus = true, diff --git a/.config/nvim/lua/plugins/luasnip.lua b/.config/nvim/lua/plugins/luasnip.lua new file mode 100644 index 0000000..c919d04 --- /dev/null +++ b/.config/nvim/lua/plugins/luasnip.lua @@ -0,0 +1,11 @@ +return { + -- snippet support + "l3mon4d3/luasnip", + version = "v2.*", + dependencies = { "saadparwaiz1/cmp_luasnip" }, + lazy = true, -- load as dependency + -- build = "make install_jsregexp", + config = function() + require("luasnip.loaders.from_snipmate").lazy_load() + end, +} diff --git a/.config/nvim/lua/plugins/mason-null-ls.lua b/.config/nvim/lua/plugins/mason-null-ls.lua new file mode 100644 index 0000000..beb8032 --- /dev/null +++ b/.config/nvim/lua/plugins/mason-null-ls.lua @@ -0,0 +1,23 @@ +return { + -- bridge mason and null-ls + "jay-babu/mason-null-ls.nvim", + lazy = true, -- load as dependency + opts = { + automatic_installation = true, + ensure_installed = { + -- assembler + "asmfmt", + -- lua + "stylua", + -- markdown + "mdformat", + -- python + "isort", + "yapf", + -- shell + "shfmt", + -- yaml + "yamlfmt", + }, + }, +} diff --git a/.config/nvim/lua/plugins/mason.lua b/.config/nvim/lua/plugins/mason.lua index 74a2c90..b3d5cf7 100644 --- a/.config/nvim/lua/plugins/mason.lua +++ b/.config/nvim/lua/plugins/mason.lua @@ -2,49 +2,9 @@ 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 = { - -- assembler - "asmfmt", - -- lua - "stylua", - -- markdown - "mdformat", - -- python - "isort", - "yapf", - -- shell - "shfmt", - -- yaml - "yamlfmt", - }, - }, - }, + "nvimtools/none-ls.nvim", + "jay-babu/mason-null-ls.nvim", }, + lazy = false, opts = { ui = { icons = Install_signs } }, } diff --git a/.config/nvim/lua/plugins/modes.lua b/.config/nvim/lua/plugins/modes.lua index 1448073..5ea7a1c 100644 --- a/.config/nvim/lua/plugins/modes.lua +++ b/.config/nvim/lua/plugins/modes.lua @@ -1,5 +1,6 @@ return { -- decorations for the current line mode "mvllow/modes.nvim", + lazy = false, opts = {}, } diff --git a/.config/nvim/lua/plugins/molten.lua b/.config/nvim/lua/plugins/molten.lua index 05337a8..169d125 100644 --- a/.config/nvim/lua/plugins/molten.lua +++ b/.config/nvim/lua/plugins/molten.lua @@ -1,108 +1,14 @@ return { -- jupyter notebook support "benlubas/molten-nvim", + build = ":UpdateRemotePlugins", 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", - }, - keys = { - { - "rc", - function() - require("quarto.runner").run_cell() - end, - desc = "Quarto: Run cell", - }, - { - "ra", - function() - require("quarto.runner").run_above() - end, - desc = "Quarto: Run cell and above", - }, - { - "rA", - function() - require("quarto.runner").run_all() - end, - desc = "Quarto: Run all cells", - }, - { - "rl", - function() - require("quarto.runner").run_line() - end, - desc = "Quarto: Run line", - }, - { - "rr", - function() - require("quarto.runner").run_range() - end, - desc = "Quarto: Run visual range", - }, - { - "rL", - function() - require("quarto.runner").run_all(true) - end, - desc = "Quarto: Run all cells of all languages", - }, - }, - opts = { - lspFeatures = { - languages = { "python" }, - chunks = "all", - diagnostics = { - enabled = true, - triggers = { "BufWritePost" }, - }, - completion = { - enabled = true, - }, - }, - codeRunner = { - enabled = true, - default_method = "molten", - }, - }, - config = function(_, opts) - local quarto = require("quarto") - quarto.setup(opts) - vim.api.nvim_create_autocmd("FileType", { - pattern = "markdown", - callback = function() - quarto.activate() - end, - }) - end, - }, - { - "GCBallesteros/jupytext.nvim", - opts = { - style = "markdown", - output_extension = "md", - force_ft = "markdown", - }, - }, + "3rd/image.nvim", + "quarto-dev/quarto-nvim", + "GCBallesteros/jupytext.nvim", }, - build = ":UpdateRemotePlugins", + lazy = false, init = function() vim.g.molten_auto_open_output = false vim.g.molten_wrap_output = true diff --git a/.config/nvim/lua/plugins/neogen.lua b/.config/nvim/lua/plugins/neogen.lua index c031c11..6cd329b 100644 --- a/.config/nvim/lua/plugins/neogen.lua +++ b/.config/nvim/lua/plugins/neogen.lua @@ -1,6 +1,7 @@ return { -- generate annotations automatically "danymat/neogen", + lazy = false, opts = { snippet_engine = "luasnip", }, diff --git a/.config/nvim/lua/plugins/none-ls.lua b/.config/nvim/lua/plugins/none-ls.lua new file mode 100644 index 0000000..98005be --- /dev/null +++ b/.config/nvim/lua/plugins/none-ls.lua @@ -0,0 +1,24 @@ +return { + -- inject lsp diagnostics, etc + "nvimtools/none-ls.nvim", + lazy = true, -- load as dependency + 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, +} diff --git a/.config/nvim/lua/plugins/nvim-cmp.lua b/.config/nvim/lua/plugins/nvim-cmp.lua index 40dcc9b..f7d84a2 100644 --- a/.config/nvim/lua/plugins/nvim-cmp.lua +++ b/.config/nvim/lua/plugins/nvim-cmp.lua @@ -4,22 +4,13 @@ return { 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", - }, + "l3mon4d3/luasnip", }, + lazy = false, config = function() local cmp = require("cmp") cmp.setup({ diff --git a/.config/nvim/lua/plugins/nvim-colorizer.lua b/.config/nvim/lua/plugins/nvim-colorizer.lua index a6beb01..648c3ab 100644 --- a/.config/nvim/lua/plugins/nvim-colorizer.lua +++ b/.config/nvim/lua/plugins/nvim-colorizer.lua @@ -1,6 +1,7 @@ return { -- showing color of hex values, etc "ChristianChiarulli/nvim-colorizer.lua", + lazy = false, opts = { filetypes = { "*", diff --git a/.config/nvim/lua/plugins/nvim-lilypond-suite.lua b/.config/nvim/lua/plugins/nvim-lilypond-suite.lua index b334a96..d5a832d 100644 --- a/.config/nvim/lua/plugins/nvim-lilypond-suite.lua +++ b/.config/nvim/lua/plugins/nvim-lilypond-suite.lua @@ -1,8 +1,8 @@ return { -- lillypond integration "martineausimon/nvim-lilypond-suite", - ft = "lilypond", - dependencies = "uga-rosa/cmp-dictionary", + dependencies = { "uga-rosa/cmp-dictionary" }, + ft = { "lilypond" }, opts = { lilypond = { mappings = { diff --git a/.config/nvim/lua/plugins/nvim-lspconfig.lua b/.config/nvim/lua/plugins/nvim-lspconfig.lua index fbb8a22..e71e6e4 100644 --- a/.config/nvim/lua/plugins/nvim-lspconfig.lua +++ b/.config/nvim/lua/plugins/nvim-lspconfig.lua @@ -3,22 +3,9 @@ return { "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, - }, + "hrsh7th/cmp-nvim-lsp", }, + lazy = false, opts = { automatic_setup = true, ensure_installed = { @@ -69,12 +56,17 @@ return { }, pyright = {}, } + local capabilities = require("cmp_nvim_lsp").default_capabilities() + capabilities.textDocument.foldingRange = { + dynamicRegistration = false, + lineFoldingOnly = true, + } for name, config in pairs(servers) do vim.lsp.config( name, vim.tbl_extend("force", config, { on_attach = on_attach, - capabilities = Capabilities, + capabilities = capabilities, flags = default_flags, }) ) diff --git a/.config/nvim/lua/plugins/nvim-scrollbar.lua b/.config/nvim/lua/plugins/nvim-scrollbar.lua index 1cd4b1d..51d21e4 100644 --- a/.config/nvim/lua/plugins/nvim-scrollbar.lua +++ b/.config/nvim/lua/plugins/nvim-scrollbar.lua @@ -5,6 +5,7 @@ return { "kevinhwang91/nvim-hlslens", "lewis6991/gitsigns.nvim", }, + lazy = false, opts = { marks = { Cursor = { highlight = "Normal" }, diff --git a/.config/nvim/lua/plugins/nvim-surround.lua b/.config/nvim/lua/plugins/nvim-surround.lua index 4a450ec..39d39bd 100644 --- a/.config/nvim/lua/plugins/nvim-surround.lua +++ b/.config/nvim/lua/plugins/nvim-surround.lua @@ -2,6 +2,6 @@ return { -- additional quote/parantheses funtions "kylechui/nvim-surround", version = "*", - event = "VeryLazy", + lazy = false, opts = {}, } diff --git a/.config/nvim/lua/plugins/nvim-tree.lua b/.config/nvim/lua/plugins/nvim-tree.lua index 61ab359..4a2baa0 100644 --- a/.config/nvim/lua/plugins/nvim-tree.lua +++ b/.config/nvim/lua/plugins/nvim-tree.lua @@ -1,13 +1,10 @@ return { -- fileexplorer on the side "nvim-tree/nvim-tree.lua", - cmd = "NvimTreeToggle", dependencies = { - { - "nvim-tree/nvim-web-devicons", - lazy = true, - }, + "nvim-tree/nvim-web-devicons", }, + cmd = { "NvimTreeToggle" }, keys = { { "", diff --git a/.config/nvim/lua/plugins/nvim-treesitter.lua b/.config/nvim/lua/plugins/nvim-treesitter.lua index 0cac71b..85ecb82 100644 --- a/.config/nvim/lua/plugins/nvim-treesitter.lua +++ b/.config/nvim/lua/plugins/nvim-treesitter.lua @@ -3,19 +3,10 @@ return { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate", dependencies = { - -- automatically close html-tags - { - "windwp/nvim-ts-autotag", - opts = { - opts = { - enable_close = true, - enable_rename = true, - }, - }, - }, - -- 'p00f/nvim-ts-rainbow', -- color brackets + "windwp/nvim-ts-autotag", -- automatically close html-tags "nvim-treesitter/nvim-treesitter-context", }, + lazy = false, config = function() local treesitter = require("nvim-treesitter") treesitter.setup() diff --git a/.config/nvim/lua/plugins/nvim-ts-autotag.lua b/.config/nvim/lua/plugins/nvim-ts-autotag.lua new file mode 100644 index 0000000..40eeffe --- /dev/null +++ b/.config/nvim/lua/plugins/nvim-ts-autotag.lua @@ -0,0 +1,11 @@ +return { + -- automatically close tags with treesitter + "windwp/nvim-ts-autotag", + lazy = true, -- load as dependency + opts = { + opts = { + enable_close = true, + enable_rename = true, + }, + }, +} diff --git a/.config/nvim/lua/plugins/nvim-web-devicons.lua b/.config/nvim/lua/plugins/nvim-web-devicons.lua new file mode 100644 index 0000000..663357d --- /dev/null +++ b/.config/nvim/lua/plugins/nvim-web-devicons.lua @@ -0,0 +1,8 @@ +return { + -- git blame support + "f-person/git-blame.nvim", + lazy = true, + config = function() + vim.g.gitblame_display_virtual_text = 0 + end, +} diff --git a/.config/nvim/lua/plugins/ogpt.lua b/.config/nvim/lua/plugins/ogpt.lua index 2409d39..56da3b9 100644 --- a/.config/nvim/lua/plugins/ogpt.lua +++ b/.config/nvim/lua/plugins/ogpt.lua @@ -1,127 +1,11 @@ return { -- ollama llm integration "huynle/ogpt.nvim", - event = "VeryLazy", dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim", "nvim-telescope/telescope.nvim", - { - "folke/edgy.nvim", - event = "VeryLazy", - init = function() - vim.opt.laststatus = 3 - vim.opt.splitkeep = "screen" -- or "topline" or "screen" - end, - opts = { - exit_when_last = false, - animate = { - enabled = false, - }, - wo = { - winbar = true, - winfixwidth = true, - winfixheight = false, - winhighlight = "WinBar:EdgyWinBar,Normal:EdgyNormal", - spell = false, - signcolumn = "no", - }, - keys = { - -- -- close window - ["q"] = function(win) - win:close() - end, - -- close sidebar - ["Q"] = function(win) - win.view.edgebar:close() - end, - -- increase width - [""] = function(win) - win:resize("width", 3) - end, - -- decrease width - [""] = function(win) - win:resize("width", -3) - end, - -- increase height - [""] = function(win) - win:resize("height", 3) - end, - -- decrease height - [""] = function(win) - win:resize("height", -3) - end, - }, - right = { - { - title = "OGPT Popup", - ft = "ogpt-popup", - size = { width = 0.2 }, - wo = { - wrap = true, - }, - }, - { - title = "OGPT Parameters", - ft = "ogpt-parameters-window", - size = { height = 6 }, - wo = { - wrap = true, - }, - }, - { - title = "OGPT Template", - ft = "ogpt-template", - size = { height = 6 }, - }, - { - title = "OGPT Sessions", - ft = "ogpt-sessions", - size = { height = 6 }, - wo = { - wrap = true, - }, - }, - { - title = "OGPT System Input", - ft = "ogpt-system-window", - size = { height = 6 }, - }, - { - title = "OGPT", - ft = "ogpt-window", - size = { height = 0.5 }, - wo = { - wrap = true, - }, - }, - { - title = "OGPT {{{selection}}}", - ft = "ogpt-selection", - size = { width = 80, height = 4 }, - wo = { - wrap = true, - }, - }, - { - title = "OGPt {{{instruction}}}", - ft = "ogpt-instruction", - size = { width = 80, height = 4 }, - wo = { - wrap = true, - }, - }, - { - title = "OGPT Chat", - ft = "ogpt-input", - size = { width = 80, height = 4 }, - wo = { - wrap = true, - }, - }, - }, - }, - }, + "folke/edgy.nvim", }, keys = { { diff --git a/.config/nvim/lua/plugins/papis.lua b/.config/nvim/lua/plugins/papis.lua index d82fe31..4be45f5 100644 --- a/.config/nvim/lua/plugins/papis.lua +++ b/.config/nvim/lua/plugins/papis.lua @@ -7,7 +7,12 @@ return { "hrsh7th/nvim-cmp", "nvim-telescope/telescope.nvim", }, + lazy = false, opts = { enable_keymaps = false, + init_filetypes = { "yaml", "tex" } }, + config = function(_, opts) + require("papis").setup(opts) + end, } diff --git a/.config/nvim/lua/plugins/projections.lua b/.config/nvim/lua/plugins/projections.lua index 0765a93..f90a3e2 100644 --- a/.config/nvim/lua/plugins/projections.lua +++ b/.config/nvim/lua/plugins/projections.lua @@ -1,10 +1,10 @@ return { -- navigate between projects using telescope "gnikdroy/projections.nvim", + branch = "pre_release", dependencies = { "nvim-telescope/telescope.nvim", }, - branch = "pre_release", keys = { { "fp", diff --git a/.config/nvim/lua/plugins/quarto-nvim.lua b/.config/nvim/lua/plugins/quarto-nvim.lua new file mode 100644 index 0000000..9ca7e22 --- /dev/null +++ b/.config/nvim/lua/plugins/quarto-nvim.lua @@ -0,0 +1,80 @@ +return { + -- quarto support + "quarto-dev/quarto-nvim", + dependencies = { + "jmbuhr/otter.nvim", + "nvim-treesitter/nvim-treesitter", + }, + lazy = true, -- load as dependency + keys = { + { + "rc", + function() + require("quarto.runner").run_cell() + end, + desc = "Quarto: Run cell", + }, + { + "ra", + function() + require("quarto.runner").run_above() + end, + desc = "Quarto: Run cell and above", + }, + { + "rA", + function() + require("quarto.runner").run_all() + end, + desc = "Quarto: Run all cells", + }, + { + "rl", + function() + require("quarto.runner").run_line() + end, + desc = "Quarto: Run line", + }, + { + "rr", + function() + require("quarto.runner").run_range() + end, + desc = "Quarto: Run visual range", + }, + { + "rL", + function() + require("quarto.runner").run_all(true) + end, + desc = "Quarto: Run all cells of all languages", + }, + }, + opts = { + lspFeatures = { + languages = { "python" }, + chunks = "all", + diagnostics = { + enabled = true, + triggers = { "BufWritePost" }, + }, + completion = { + enabled = true, + }, + }, + codeRunner = { + enabled = true, + default_method = "molten", + }, + }, + config = function(_, opts) + local quarto = require("quarto") + quarto.setup(opts) + vim.api.nvim_create_autocmd("FileType", { + pattern = "markdown", + callback = function() + quarto.activate() + end, + }) + end, +} diff --git a/.config/nvim/lua/plugins/render-markdown.lua b/.config/nvim/lua/plugins/render-markdown.lua index 32a518c..711e9cd 100644 --- a/.config/nvim/lua/plugins/render-markdown.lua +++ b/.config/nvim/lua/plugins/render-markdown.lua @@ -5,6 +5,10 @@ return { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons", }, + ft = { "markdown" }, + cond = function() + return vim.fn.expand("%:e") ~= "ipynb" + end, ---@module 'render-markdown' ---@type render.md.UserConfig opts = { diff --git a/.config/nvim/lua/plugins/resolve.lua b/.config/nvim/lua/plugins/resolve.lua index 0e085c1..c3c3b1f 100644 --- a/.config/nvim/lua/plugins/resolve.lua +++ b/.config/nvim/lua/plugins/resolve.lua @@ -1,6 +1,6 @@ return { -- color and improve git merge conflicts "spacedentist/resolve.nvim", - event = { "BufReadPre", "BufNewFile" }, + lazy = false, opts = {}, } diff --git a/.config/nvim/lua/plugins/rustacean.lua b/.config/nvim/lua/plugins/rustacean.lua new file mode 100644 index 0000000..0692cdc --- /dev/null +++ b/.config/nvim/lua/plugins/rustacean.lua @@ -0,0 +1,6 @@ +return { + -- support for rust + "mrcjkb/rustaceanvim", + version = "^6", + lazy = false, -- this plugin is already lazy +} diff --git a/.config/nvim/lua/plugins/telescope-fzf-native.lua b/.config/nvim/lua/plugins/telescope-fzf-native.lua new file mode 100644 index 0000000..27ed849 --- /dev/null +++ b/.config/nvim/lua/plugins/telescope-fzf-native.lua @@ -0,0 +1,6 @@ +return { + -- fzf support for telescope + "nvim-telescope/telescope-fzf-native.nvim", + build = "make", + lazy = true, -- load as dependency +} diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua index 1b964d3..b029228 100644 --- a/.config/nvim/lua/plugins/telescope.lua +++ b/.config/nvim/lua/plugins/telescope.lua @@ -4,7 +4,7 @@ return { version = "*", dependencies = { "nvim-lua/plenary.nvim", - { "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, + "nvim-telescope/telescope-fzf-native.nvim", "archie-judd/telescope-words.nvim", }, keys = { diff --git a/.config/nvim/lua/plugins/tiny-inline-diagnostic.lua b/.config/nvim/lua/plugins/tiny-inline-diagnostic.lua index b1f2344..25f5a3e 100644 --- a/.config/nvim/lua/plugins/tiny-inline-diagnostic.lua +++ b/.config/nvim/lua/plugins/tiny-inline-diagnostic.lua @@ -1,7 +1,7 @@ return { -- display inline diagnostics "rachartier/tiny-inline-diagnostic.nvim", - event = "VeryLazy", + lazy = false, priority = 1000, opts = { preset = "classic", diff --git a/.config/nvim/lua/plugins/todo-comments.lua b/.config/nvim/lua/plugins/todo-comments.lua index 08422ae..19bfc6f 100644 --- a/.config/nvim/lua/plugins/todo-comments.lua +++ b/.config/nvim/lua/plugins/todo-comments.lua @@ -2,6 +2,7 @@ return { -- todo symbols and highlighting "folke/todo-comments.nvim", dependencies = { "nvim-lua/plenary.nvim" }, + lazy = false, opts = { keywords = { ERRO = { icon = Error_sign, color = "error" }, diff --git a/.config/nvim/lua/plugins/trouble.lua b/.config/nvim/lua/plugins/trouble.lua index 0c2e580..0378f7b 100644 --- a/.config/nvim/lua/plugins/trouble.lua +++ b/.config/nvim/lua/plugins/trouble.lua @@ -1,12 +1,7 @@ return { -- list of errors "folke/trouble.nvim", - dependencies = { - { - "nvim-tree/nvim-web-devicons", - lazy = true, - }, - }, + dependencies = { "nvim-tree/nvim-web-devicons" }, keys = { { "", diff --git a/.config/nvim/lua/plugins/vim-illuminate.lua b/.config/nvim/lua/plugins/vim-illuminate.lua index 224f2bb..560662f 100644 --- a/.config/nvim/lua/plugins/vim-illuminate.lua +++ b/.config/nvim/lua/plugins/vim-illuminate.lua @@ -1,4 +1,5 @@ return { -- highlight other occurences of the same word "RRethy/vim-illuminate", + lazy = false, } diff --git a/.config/nvim/lua/plugins/viper-nvim.lua b/.config/nvim/lua/plugins/viper-nvim.lua index 79c31ac..78a7219 100644 --- a/.config/nvim/lua/plugins/viper-nvim.lua +++ b/.config/nvim/lua/plugins/viper-nvim.lua @@ -1,6 +1,6 @@ return { -- highlighting for the viper verification language "tiyn/viper.nvim", - event = { "BufReadPre *.vpr", "FileType viper" }, - opts = {} + ft = { "viper" }, + opts = {}, } diff --git a/.config/nvim/lua/plugins/which-key.lua b/.config/nvim/lua/plugins/which-key.lua index 7f38237..0748f9f 100644 --- a/.config/nvim/lua/plugins/which-key.lua +++ b/.config/nvim/lua/plugins/which-key.lua @@ -1,6 +1,7 @@ return { -- improved keybindings, previewing them "folke/which-key.nvim", + lazy = false, config = function() require("which-key").add({ { mode = "n", "g", desc = "LSP: goto" }, diff --git a/.config/nvim/lua/plugins/wilder.lua b/.config/nvim/lua/plugins/wilder.lua index af6ea9a..a15ebf9 100644 --- a/.config/nvim/lua/plugins/wilder.lua +++ b/.config/nvim/lua/plugins/wilder.lua @@ -2,15 +2,13 @@ return { -- improved wild menu "gelguy/wilder.nvim", dependencies = { - { - "nvim-tree/nvim-web-devicons", - lazy = true, - }, + "nvim-tree/nvim-web-devicons", "roxma/nvim-yarp", "roxma/vim-hug-neovim-rpc", "romgrk/fzy-lua-native", "nixprime/cpsm", }, + lazy = false, opts = { modes = { ":", "/", "?" }, accept_key = "",