From 07d59927e3aa2a333456407fe6bd5fc5e6a3274d Mon Sep 17 00:00:00 2001 From: VectorKappa Date: Sun, 10 Aug 2025 17:19:45 +0200 Subject: [PATCH] Fuck it, nvim revamp --- .config/nvim/COQinit.lua.none | 171 ++++++++++++++++++++++++ .config/nvim/init.lua | 198 +++++++++++++--------------- .config/nvim/lazy-lock.json | 53 ++++---- .config/nvim/lua/plugins/rest.lua | 211 ++++++++++++++++++++---------- .config/nvim/lua/plugins/ux.lua | 61 ++++++++- 5 files changed, 492 insertions(+), 202 deletions(-) create mode 100644 .config/nvim/COQinit.lua.none diff --git a/.config/nvim/COQinit.lua.none b/.config/nvim/COQinit.lua.none new file mode 100644 index 0000000..ea5a210 --- /dev/null +++ b/.config/nvim/COQinit.lua.none @@ -0,0 +1,171 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) +--require("lazy").setup(pluginTable) +require("lazy").setup({ + spec = { + -- import your plugins + { import = "plugins" }, + }, + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "catppuccin" } }, + -- automatically check for plugin updates + checker = { enabled = true }, +}) +if vim.fn.has('persistent_undo') then + local target_path = vim.fn.stdpath('data') ..'/.nvimundodir' + if not vim.fn.isdirectory(target_path) then + vim.fn.mkpath(target_path, { mode = 0700 }) -- Use mkpath for parent creation + end + + vim.opt.undodir = target_path + vim.api.nvim_set_option('undofile', true) +end + + +vim.api.nvim_create_autocmd("StdinReadPre", { + pattern = "*", + command = "let s:std_in=1" +}) +--vim.api.nvim_create_autocmd("VimEnter", { +-- pattern = "*", +-- command = "if argc() == 1 && isdirectory(argv()[0]) && !exists('s:std_in') | execute 'Neotree current' | execute 'cd '.argv()[0] | endif" +--}) + + +vim.g.airline_powerline_fonts = 1 + +--vim.g.coq_settings = {'clients.tabnine.enabled' = false} +--filetype plugin on +--vim.g.syntastic_python_python_exec = 'python3' +--vim.g.syntastic_python_checkers = ['bandit', 'python'] + +--" Keybinds +vim.keymap.set('n', '', ':Neotree toggle',{noremap=true}) +vim.keymap.set('n', '', function() vim.lsp.buf.code_action() end,{noremap=true}) +vim.keymap.set('n', '', ':ZenMode',{noremap=true}) +vim.keymap.set('n', '', function() vim.lsp.buf.format() end,{noremap=true}) +--nnoremap :CHADopen +--nnoremap :lua vim.lsp.buf.code_action() +--nnoremap :Goyo +--nnoremap :MundoToggle +--nnoremap :lua require("dapui").toggle() +require("mason").setup() +require("mason-lspconfig").setup() +--require("mason-lspconfig").setup_handlers({ +-- function (server_name) -- default handler (optional) +-- require("lspconfig")[server_name].setup(require('coq').lsp_ensure_capabilities({})) +-- end}) +local lsp = require "lspconfig" +local coq = require "coq" -- add this +local dap = require("dap") +dap.adapters.gdb = { + type = "executable", + command = "gdb", + args = { "-i", "dap" } +} + +dap.configurations.cpp = { + { + name = "Launch", + type = "gdb", + request = "launch", + program = function() + return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') + end, + cwd = "${workspaceFolder}", + stopAtBeginningOfMainSubprogram = false, + }, +} +-- Mappings. +-- See `:help vim.diagnostic.*` for documentation on any of the below functions +local opts = { noremap=true, silent=true } +vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts) +vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) +vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) +vim.keymap.set('n', 'q', vim.diagnostic.setloclist, opts) + +-- Use an on_attach function to only map the following keys +-- after the language server attaches to the current buffer +local on_attach = function(client, bufnr) + -- Enable completion triggered by + vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') + + -- Mappings. + -- See `:help vim.lsp.*` for documentation on any of the below functions + local bufopts = { noremap=true, silent=true, buffer=bufnr } + vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) + vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) + vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts) + vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts) + vim.keymap.set('n', '', vim.lsp.buf.signature_help, bufopts) + vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, bufopts) + vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, bufopts) + vim.keymap.set('n', 'wl', function() + print(vim.inspect(vim.lsp.buf.list_workspace_folders())) + end, bufopts) + vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, bufopts) + vim.keymap.set('n', 'rn', vim.lsp.buf.rename, bufopts) + vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, bufopts) + vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts) + vim.keymap.set('n', 'f', function() vim.lsp.buf.format { async = true } end, bufopts) +end + +local lsp_flags = { + -- This is the default in Nvim 0.7+ + debounce_text_changes = 150, +} + +--lsp..setup() -- before +--lsp..setup(coq.lsp_ensure_capabilities()) -- after + +--lsp.pyright.setup(coq.lsp_ensure_capabilities({})) +--lsp.ccls.setup(coq.lsp_ensure_capabilities({})) +lsp.ltex.setup(coq.lsp_ensure_capabilities({settings = {ltex = {language = "pl-PL"}}})) +lsp.rust_analyzer.setup(coq.lsp_ensure_capabilities({ + settings = { + ["rust-analyzer"] = { + imports = { + granularity = { + group = "module", + }, + prefix = "self", + }, + cargo = { + buildScripts = { + enable = true, + }, + }, + procMacro = { + enable = true + }, + } + } +})) + +require("dapui").setup() +require("catppuccin").setup({flavour = "macchiato"}) +require('colorizer').setup() +require("circles").setup() +vim.cmd.colorscheme "catppuccin" +vim.api.nvim_create_autocmd('VimEnter', + {callback = + function() + vim.api.nvim_command("COQnow -s") + end, +}) +-- committia_open_only_vim_starting +vim.g.committia_open_only_vim_starting = 1 + +--autocmd VimEnter * execute 'COQnow -s' + diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index c87a024..871891a 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -1,35 +1,36 @@ local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not (vim.uv or vim.loop).fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) end vim.opt.rtp:prepend(lazypath) --require("lazy").setup(pluginTable) require("lazy").setup({ - spec = { - -- import your plugins - { import = "plugins" }, - }, - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "catppuccin" } }, - -- automatically check for plugin updates - checker = { enabled = true }, + spec = { + -- import your plugins + { import = "plugins" }, + }, + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "catppuccin" } }, + -- automatically check for plugin updates + checker = { enabled = true }, }) -if vim.fn.has('persistent_undo') then - local target_path = vim.fn.stdpath('data') ..'/.nvimundodir' - if not vim.fn.isdirectory(target_path) then - vim.fn.mkpath(target_path, { mode = 0700 }) -- Use mkpath for parent creation - end - vim.opt.undodir = target_path - vim.api.nvim_set_option('undofile', true) +if vim.fn.has('persistent_undo') then + local target_path = vim.fn.stdpath('data') .. '/.nvimundodir' + if not vim.fn.isdirectory(target_path) then + vim.fn.mkpath(target_path, { mode = 0700 }) -- Use mkpath for parent creation + end + + vim.opt.undodir = target_path + vim.api.nvim_set_option('undofile', true) end @@ -51,84 +52,78 @@ vim.g.airline_powerline_fonts = 1 --vim.g.syntastic_python_checkers = ['bandit', 'python'] --" Keybinds -vim.keymap.set('n', '', ':Neotree toggle',{noremap=true}) -vim.keymap.set('n', '', function() vim.lsp.buf.code_action() end,{noremap=true}) -vim.keymap.set('n', '', ':ZenMode',{noremap=true}) +vim.keymap.set('n', '', ':Neotree toggle', { noremap = true }) +vim.keymap.set('n', '', function() vim.lsp.buf.code_action() end, { noremap = true }) +vim.keymap.set('n', '', ':ZenMode', { noremap = true }) +vim.keymap.set('n', '', function() vim.lsp.buf.format() end, { noremap = true }) +vim.keymap.set('n', '', ':MundoToggle', { noremap = true }) + --nnoremap :CHADopen --nnoremap :lua vim.lsp.buf.code_action() --nnoremap :Goyo --nnoremap :MundoToggle --nnoremap :lua require("dapui").toggle() -require("neodev").setup({ - override = function(_, library) - library.enabled = true - library.plugins = true - end, -}) require("mason").setup() require("mason-lspconfig").setup() -require("mason-lspconfig").setup_handlers({ - function (server_name) -- default handler (optional) - require("lspconfig")[server_name].setup(require('coq').lsp_ensure_capabilities({})) - end}) +--require("mason-lspconfig").setup_handlers({ +-- function (server_name) -- default handler (optional) +-- require("lspconfig")[server_name].setup(require('coq').lsp_ensure_capabilities({})) +-- end}) local lsp = require "lspconfig" -local coq = require "coq" -- add this local dap = require("dap") dap.adapters.gdb = { - type = "executable", - command = "gdb", - args = { "-i", "dap" } + type = "executable", + command = "gdb", + args = { "-i", "dap" } } dap.configurations.cpp = { - { - name = "Launch", - type = "gdb", - request = "launch", - program = function() - return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') - end, - cwd = "${workspaceFolder}", - stopAtBeginningOfMainSubprogram = false, - }, + { + name = "Launch", + type = "gdb", + request = "launch", + program = function() + return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') + end, + cwd = "${workspaceFolder}", + stopAtBeginningOfMainSubprogram = false, + }, } -- Mappings. -- See `:help vim.diagnostic.*` for documentation on any of the below functions -local opts = { noremap=true, silent=true } +local opts = { noremap = true, silent = true } vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts) -vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) -vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) vim.keymap.set('n', 'q', vim.diagnostic.setloclist, opts) -- Use an on_attach function to only map the following keys -- after the language server attaches to the current buffer local on_attach = function(client, bufnr) - -- Enable completion triggered by - vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') + -- Enable completion triggered by + vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') - -- Mappings. - -- See `:help vim.lsp.*` for documentation on any of the below functions - local bufopts = { noremap=true, silent=true, buffer=bufnr } - vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) - vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) - vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts) - vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts) - vim.keymap.set('n', '', vim.lsp.buf.signature_help, bufopts) - vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, bufopts) - vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, bufopts) - vim.keymap.set('n', 'wl', function() - print(vim.inspect(vim.lsp.buf.list_workspace_folders())) - end, bufopts) - vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, bufopts) - vim.keymap.set('n', 'rn', vim.lsp.buf.rename, bufopts) - vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, bufopts) - vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts) - vim.keymap.set('n', 'f', function() vim.lsp.buf.format { async = true } end, bufopts) + -- Mappings. + -- See `:help vim.lsp.*` for documentation on any of the below functions + local bufopts = { noremap = true, silent = true, buffer = bufnr } + vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) + vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) + vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts) + vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts) + vim.keymap.set('n', '', vim.lsp.buf.signature_help, bufopts) + vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, bufopts) + vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, bufopts) + vim.keymap.set('n', 'wl', function() + print(vim.inspect(vim.lsp.buf.list_workspace_folders())) + end, bufopts) + vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, bufopts) + vim.keymap.set('n', 'rn', vim.lsp.buf.rename, bufopts) + vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, bufopts) + vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts) + vim.keymap.set('n', 'f', function() vim.lsp.buf.format { async = true } end, bufopts) end local lsp_flags = { - -- This is the default in Nvim 0.7+ - debounce_text_changes = 150, + -- This is the default in Nvim 0.7+ + debounce_text_changes = 150, } --lsp..setup() -- before @@ -136,41 +131,34 @@ local lsp_flags = { --lsp.pyright.setup(coq.lsp_ensure_capabilities({})) --lsp.ccls.setup(coq.lsp_ensure_capabilities({})) ---lsp.ltex.setup(coq.lsp_ensure_capabilities({settings = {ltex = {language = "pl-PL"}}})) -lsp.rust_analyzer.setup(coq.lsp_ensure_capabilities({ - settings = { - ["rust-analyzer"] = { - imports = { - granularity = { - group = "module", - }, - prefix = "self", - }, - cargo = { - buildScripts = { - enable = true, - }, - }, - procMacro = { - enable = true - }, - } - } -})) +lsp.ltex.setup({ settings = { ltex = { language = "pl-PL" } } }) +lsp.rust_analyzer.setup({ + settings = { + ["rust-analyzer"] = { + imports = { + granularity = { + group = "module", + }, + prefix = "self", + }, + cargo = { + buildScripts = { + enable = true, + }, + }, + procMacro = { + enable = true + }, + } + } +}) require("dapui").setup() -require("catppuccin").setup({flavour = "macchiato"}) +require("catppuccin").setup({ flavour = "macchiato" }) require('colorizer').setup() require("circles").setup() vim.cmd.colorscheme "catppuccin" -vim.api.nvim_create_autocmd('VimEnter', - {callback = - function() - vim.api.nvim_command("COQnow -s") - end, -}) -- committia_open_only_vim_starting vim.g.committia_open_only_vim_starting = 1 --autocmd VimEnter * execute 'COQnow -s' - diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 67b5fc4..4680b90 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -1,46 +1,47 @@ { + "blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" }, "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, - "catppuccin": { "branch": "main", "commit": "5b5e3aef9ad7af84f463d17b5479f06b87d5c429" }, + "catppuccin": { "branch": "main", "commit": "76a8d0515024cc55d8bd26fc13f1af88faef3ebf" }, "circles.nvim": { "branch": "main", "commit": "01b9ac1dc6c181f6982eddd57deb1fc7f92d7a70" }, - "codeium.vim": { "branch": "main", "commit": "272c6e2755e8faa90e26bcdcd9fde6b9e61751ea" }, + "codeium.vim": { "branch": "main", "commit": "a8d47ec54fe82df920b2545559f767003e8a7f8d" }, "committia.vim": { "branch": "master", "commit": "c8c0f255e8090ed90dd9d5dd2e8672994f8e3671" }, - "coq.artifacts": { "branch": "artifacts", "commit": "ef5f21d638ccc456cfa5b8d0ab37093cefe48c8b" }, - "coq.thirdparty": { "branch": "3p", "commit": "6ee3c221c308dca7071387267ac76c9272b184a9" }, - "coq_nvim": { "branch": "coq", "commit": "d83bc18d044cfcd65e91dc49740a353546bc143b" }, "ctrlp.vim": { "branch": "master", "commit": "475a864e7f01dfc5c93965778417cc66e77f3dcc" }, - "firenvim": { "branch": "master", "commit": "c4ab7d2aeb145cd93db8660cb134f771722f2b5e" }, - "formatter.nvim": { "branch": "master", "commit": "eb89a1f3e079f1b9680bc7293b75fffccb5e1598" }, - "git-messenger.vim": { "branch": "master", "commit": "edc603d4cda7894a743e383e16c638e206d03148" }, - "image.nvim": { "branch": "master", "commit": "2e2d28b7734b5efdfc1219f4da8a46c761587bc2" }, + "firenvim": { "branch": "master", "commit": "c927486daff6d1eb8a0d61fd9e264bc1bf5f2c36" }, + "formatter.nvim": { "branch": "master", "commit": "b9d7f853da1197b83b8edb4cc4952f7ad3a42e41" }, + "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, + "git-messenger.vim": { "branch": "master", "commit": "fd124457378a295a5d1036af4954b35d6b807385" }, + "image.nvim": { "branch": "master", "commit": "4c51d6202628b3b51e368152c053c3fb5c5f76f2" }, "indentLine.vim": { "branch": "master", "commit": "988ba5557a9d1ff49d27c22a6b5f405075b3cebb" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, - "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, - "neo-tree.nvim": { "branch": "v3.x", "commit": "9b5d67119c46e3262ffe1508fe6d8540b79ad75d" }, - "neoconf.nvim": { "branch": "main", "commit": "750656e4f15d7b66ea9d374d76dcbae160ab9c78" }, - "neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" }, - "nerdcommenter": { "branch": "master", "commit": "66c07e4083ab02ed2540ac289cc602c70b858c13" }, - "nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" }, - "nvim-colorizer.lua": { "branch": "master", "commit": "517df88cf2afb36652830df2c655df2da416a0ae" }, - "nvim-dap": { "branch": "master", "commit": "7aade9e99bef5f0735cf966e715b3ce45515d786" }, - "nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" }, + "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "7f0bf635082bb9b7d2b37766054526a6ccafdb85" }, + "mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "cea666ef965884414b1b71f6b39a537f9238bdb2" }, + "neoconf.nvim": { "branch": "main", "commit": "b516f1ca1943de917e476224e7aa6b9151961991" }, + "nerdcommenter": { "branch": "master", "commit": "02a3b6455fa07b61b9440a78732f1e9b7876c991" }, + "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, + "nvim-colorizer.lua": { "branch": "master", "commit": "16597180b4dd81fa3d23d88c4d2f1b49154f9479" }, + "nvim-dap": { "branch": "master", "commit": "a479e25ed5b5d331fb46ee4b9e160ff02ac64310" }, + "nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" }, "nvim-lightbulb": { "branch": "master", "commit": "aa3a8b0f4305b25cfe368f6c9be9923a7c9d0805" }, - "nvim-lspconfig": { "branch": "master", "commit": "442e077e326ac467daf9cd63e72120fb450a850b" }, + "nvim-lspconfig": { "branch": "master", "commit": "d6dc63670d3dc5204b1e874af4cbf340cb5d9d18" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, - "nvim-treesitter": { "branch": "master", "commit": "0e21ee8df6235511c02bab4a5b391d18e165a58d" }, - "nvim-web-devicons": { "branch": "master", "commit": "57dfa947cc88cdf1baa2c7e13ed31edddd8fb1d1" }, - "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, + "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, + "nvim-web-devicons": { "branch": "master", "commit": "3362099de3368aa620a8105b19ed04c2053e38c0" }, + "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, "syntastic": { "branch": "master", "commit": "8d5e37c29cf5952fbf300b9230bffe424c61a488" }, - "telescope.nvim": { "branch": "master", "commit": "a4ed82509cecc56df1c7138920a1aeaf246c0ac5" }, - "tree-sitter-c-sharp": { "branch": "master", "commit": "b5eb5742f6a7e9438bee22ce8026d6b927be2cd7" }, + "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, + "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, + "tree-sitter-c-sharp": { "branch": "master", "commit": "3431444351c871dffb32654f1299a00019280f2f" }, "twilight.nvim": { "branch": "main", "commit": "1584c0b0a979b71fd86b18d302ba84e9aba85b1b" }, "vim-easy-align": { "branch": "master", "commit": "9815a55dbcd817784458df7a18acacc6f82b1241" }, - "vim-gitgutter": { "branch": "main", "commit": "6620e5fbbe6a28de0bfed081f5bd2767023b7eea" }, + "vim-gitgutter": { "branch": "main", "commit": "85ca3a087204e3a32cb2faa5d9d0451524e08720" }, "vim-mundo": { "branch": "master", "commit": "2ceda8c65f7b3f9066820729fc02003a09df91f9" }, "vim-polyglot": { "branch": "master", "commit": "f5393cfee07aeb666f4d75f9b3a83163862fb094" }, "vim-visual-multi": { "branch": "master", "commit": "a6975e7c1ee157615bbc80fc25e4392f71c344d4" }, "webapi-vim": { "branch": "master", "commit": "70c49ada7827d3545a65cbdab04c5c89a3a8464e" }, "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }, + "window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" }, "yuck.vim": { "branch": "master", "commit": "9b5e0370f70cc30383e1dabd6c215475915fe5c3" }, "zen-mode.nvim": { "branch": "main", "commit": "863f150ca321b3dd8aa1a2b69b5f411a220e144f" } } diff --git a/.config/nvim/lua/plugins/rest.lua b/.config/nvim/lua/plugins/rest.lua index 2ab0e56..1c6bda6 100644 --- a/.config/nvim/lua/plugins/rest.lua +++ b/.config/nvim/lua/plugins/rest.lua @@ -2,88 +2,161 @@ return { "mattn/webapi-vim", "scrooloose/syntastic", "sheerun/vim-polyglot", - "simnalamburt/vim-mundo", + "simnalamburt/vim-mundo", "elkowar/yuck.vim", - {"glacambre/firenvim", + { + "glacambre/firenvim", lazy = not vim.g.started_by_firenvim, build = function() vim.fn["firenvim#install"](0) end }, ---'honza/vim-snippets', ---'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } -'vim-scripts/indentLine.vim', -'rhysd/git-messenger.vim', -'junegunn/vim-easy-align', -"preservim/nerdcommenter", -"mg979/vim-visual-multi", -"airblade/vim-gitgutter", ---'vim-airline/vim-airline' ---'vim-airline/vim-airline-themes' -{'ctrlpvim/ctrlp.vim'}, ---'godlygeek/tabular' ---'easymotion/vim-easymotion' ---'nathanaelkane/vim-indent-guides' ---'xuyuanp/nerdtree-git-plugin' ---'bronson/vim-trailing-whitespace' ---'tpope/vim-dadbod' ---'tpope/vim-eunuch' ---'tpope/vim-speeddating' ---'tpope/vim-repeat' ---'tpope/vim-rhubarb' ---'tpope/vim-unimpaired' ---'tpope/vim-abolish' ---'tpope/vim-obsession' ---'tpope/vim-fugitive' ---'tpope/vim-surround' -{ - 'Exafunction/codeium.vim', - event = 'BufEnter', - config = function () - -- Change '' here to any keycode you like. - vim.keymap.set('i', '', function () return vim.fn['codeium#Accept']() end, { expr = true, silent = true }) - vim.keymap.set('i', '', function() return vim.fn['codeium#CycleCompletions'](1) end, { expr = true, silent = true }) - vim.keymap.set('i', '', function() return vim.fn['codeium#CycleCompletions'](-1) end, { expr = true, silent = true }) - vim.keymap.set('i', '', function() return vim.fn['codeium#Clear']() end, { expr = true, silent = true }) - end -}, ---'lambdalisue/suda.vim' -{'tree-sitter/tree-sitter-c-sharp'}, -{'nvim-treesitter/nvim-treesitter', build = ':TSUpdate'}, -'nvim-lua/plenary.nvim', -'nvim-telescope/telescope.nvim', + --'honza/vim-snippets', + --'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } + 'vim-scripts/indentLine.vim', + 'rhysd/git-messenger.vim', + 'junegunn/vim-easy-align', + "preservim/nerdcommenter", + "mg979/vim-visual-multi", + "airblade/vim-gitgutter", + { + "folke/todo-comments.nvim", + dependencies = { "nvim-lua/plenary.nvim" }, + opts = { + -- your configuration comes here + -- or leave it empty to use the default settings + -- refer to the configuration section below + } + }, + --'vim-airline/vim-airline' + --'vim-airline/vim-airline-themes' + { 'ctrlpvim/ctrlp.vim' }, + --'godlygeek/tabular' + --'easymotion/vim-easymotion' + --'nathanaelkane/vim-indent-guides' + --'xuyuanp/nerdtree-git-plugin' + --'bronson/vim-trailing-whitespace' + --'tpope/vim-dadbod' + --'tpope/vim-eunuch' + --'tpope/vim-speeddating' + --'tpope/vim-repeat' + --'tpope/vim-rhubarb' + --'tpope/vim-unimpaired' + --'tpope/vim-abolish' + --'tpope/vim-obsession' + --'tpope/vim-fugitive' + --'tpope/vim-surround' + { + 'Exafunction/codeium.vim', + event = 'BufEnter', + config = function() + -- Change '' here to any keycode you like. + vim.keymap.set('i', '', function() return vim.fn['codeium#Accept']() end, { expr = true, silent = true }) + vim.keymap.set('i', '', function() return vim.fn['codeium#CycleCompletions'](1) end, + { expr = true, silent = true }) + vim.keymap.set('i', '', function() return vim.fn['codeium#CycleCompletions'](-1) end, + { expr = true, silent = true }) + vim.keymap.set('i', '', function() return vim.fn['codeium#Clear']() end, { expr = true, silent = true }) + end + }, + --'lambdalisue/suda.vim' + { 'tree-sitter/tree-sitter-c-sharp' }, + { 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate' }, + 'nvim-lua/plenary.nvim', + 'nvim-telescope/telescope.nvim', -'kosayoda/nvim-lightbulb', ---'antoinemadec/FixCursorHold.nvim' -'mhartington/formatter.nvim', -'NvChad/nvim-colorizer.lua', + 'kosayoda/nvim-lightbulb', + --'antoinemadec/FixCursorHold.nvim' + 'mhartington/formatter.nvim', + 'NvChad/nvim-colorizer.lua', ---{'ms-jpq/chadtree', branch='chad', build='python3 -m chadtree deps'}, -{'ms-jpq/coq_nvim', branch='coq'}, ---" 9000+ Snippets -{'ms-jpq/coq.artifacts', branch='artifacts'}, -{'ms-jpq/coq.thirdparty', branch='3p'}, + { + 'saghen/blink.cmp', + -- optional: provides snippets for the snippet source + dependencies = { 'rafamadriz/friendly-snippets' }, -'nvim-tree/nvim-web-devicons', -'projekt0n/circles.nvim', + -- use a release tag to download pre-built binaries + version = '1.*', + -- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust + -- build = 'cargo build --release', + -- If you use nix, you can build from source using latest nightly rust with: + -- build = 'nix run .#build-plugin', -'nvim-neotest/nvim-nio', + ---@module 'blink.cmp' + ---@type blink.cmp.Config + opts = { + -- 'default' (recommended) for mappings similar to built-in completions (C-y to accept) + -- 'super-tab' for mappings similar to vscode (tab to accept) + -- 'enter' for enter to accept + -- 'none' for no mappings + -- + -- All presets have the following mappings: + -- C-space: Open menu or open docs if already open + -- C-n/C-p or Up/Down: Select next/previous item + -- C-e: Hide menu + -- C-k: Toggle signature help (if signature.enabled = true) + -- + -- See :h blink-cmp-config-keymap for defining your own keymap + keymap = { preset = 'super-tab' }, + appearance = { + -- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font' + -- Adjusts spacing to ensure icons are aligned + nerd_font_variant = 'mono' + }, ---'uga-rosa/translate.nvim' ---'mechatroner/rainbow_csv' ---'christoomey/vim-system-copy' ---'eandrju/cellular-automaton.nvim' + -- (Default) Only show the documentation popup when manually triggered + completion = { documentation = { auto_show = false } }, + + -- Default list of enabled providers defined so that you can extend it + -- elsewhere in your config, without redefining it, due to `opts_extend` + sources = { + default = { 'lsp', 'path', 'snippets', 'buffer' }, + }, + + -- (Default) Rust fuzzy matcher for typo resistance and significantly better performance + -- You may use a lua implementation instead by using `implementation = "lua"` or fallback to the lua implementation, + -- when the Rust fuzzy matcher is not available, by using `implementation = "prefer_rust"` + -- + -- See the fuzzy documentation for more information + fuzzy = { implementation = "prefer_rust_with_warning" } + }, + opts_extend = { "sources.default" } + }, +-- { 'ms-jpq/coq_nvim', branch = 'coq' }, + --" 9000+ Snippets +-- { 'ms-jpq/coq.artifacts', branch = 'artifacts' }, +-- { 'ms-jpq/coq.thirdparty', branch = '3p' }, + + 'nvim-tree/nvim-web-devicons', + 'projekt0n/circles.nvim', + + 'nvim-neotest/nvim-nio', + + --'uga-rosa/translate.nvim' + --'mechatroner/rainbow_csv' + --'christoomey/vim-system-copy' + --'eandrju/cellular-automaton.nvim' --"neovim/nvim-lspconfig", ---"'ranjithshegde/ccls.nvim' + --"'ranjithshegde/ccls.nvim' "mfussenegger/nvim-dap", "rcarriga/nvim-dap-ui", - "folke/neodev.nvim", "folke/which-key.nvim", - { "folke/neoconf.nvim", cmd = "Neoconf" }, - {"neovim/nvim-lspconfig", - dependencies = { - "williamboman/mason.nvim", - "williamboman/mason-lspconfig.nvim", - { "folke/neodev.nvim", opts = {} }, - }, }, + {"folke/lazydev.nvim", + ft = "lua", -- only load on lua files + opts = { + library = { + -- See the configuration section for more details + -- Load luvit types when the `vim.uv` word is found + { path = "${3rd}/luv/library", words = { "vim%.uv" } }, + }, + }, + }, + { "folke/neoconf.nvim", cmd = "Neoconf" }, + { + "neovim/nvim-lspconfig", + dependencies = { + "williamboman/mason.nvim", + "williamboman/mason-lspconfig.nvim", + }, + }, } diff --git a/.config/nvim/lua/plugins/ux.lua b/.config/nvim/lua/plugins/ux.lua index d46ea10..b49402c 100644 --- a/.config/nvim/lua/plugins/ux.lua +++ b/.config/nvim/lua/plugins/ux.lua @@ -5,8 +5,56 @@ return { "nvim-lua/plenary.nvim", "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended "MunifTanjim/nui.nvim", - "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information - } + {"3rd/image.nvim", + opts={ + backend = "kitty", + processor = "magick_rock", -- or "magick_cli" + integrations = { + markdown = { + enabled = true, + clear_in_insert_mode = false, + download_remote_images = true, + only_render_image_at_cursor = false, + floating_windows = false, -- if true, images will be rendered in floating markdown windows + filetypes = { "markdown", "vimwiki" }, -- markdown extensions (ie. quarto) can go here + }, + neorg = { + enabled = true, + filetypes = { "norg" }, + }, + typst = { + enabled = true, + filetypes = { "typst" }, + }, + html = { + enabled = false, + }, + css = { + enabled = false, + }, + }, + max_width = nil, + max_height = nil, + max_width_window_percentage = nil, + max_height_window_percentage = 50, + window_overlap_clear_enabled = false, -- toggles images when windows are overlapped + window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "snacks_notif", "scrollview", "scrollview_sign" }, + editor_only_render_when_focused = false, -- auto show/hide images when the editor gains/looses focus + tmux_show_only_in_active_window = false, -- auto show/hide images in the correct Tmux window (needs visual-activity off) + hijack_file_patterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.webp", "*.avif" }, -- render image files as images when opened +} + }, -- Optional image support in preview window: See `# Preview Mode` for more information + }, + opts={ + window = { + mappings = { + ["P"] = { "toggle_preview", config = { use_float = false, use_image_nvim = true } }, + ["l"] = "focus_preview", + [""] = { "scroll_preview", config = {direction = 10} }, + [""] = { "scroll_preview", config = {direction = -10} }, + } + } + } }, {"catppuccin/nvim", lazy=true, name="catppuccin"}, { @@ -147,4 +195,13 @@ return { end, }, {"rhysd/committia.vim"}, + { + 's1n7ax/nvim-window-picker', + name = 'window-picker', + event = 'VeryLazy', + version = '2.*', + config = function() + require'window-picker'.setup() + end, + }, }