diff --git a/.config/nvim/lua/plugins/bigfile.lua b/.config/nvim/lua/plugins/bigfile.lua new file mode 100644 index 0000000..96d819a --- /dev/null +++ b/.config/nvim/lua/plugins/bigfile.lua @@ -0,0 +1,17 @@ +return { + "LunarVim/bigfile.nvim", + opts = { + filesize = 2, -- size of the file in MiB, the plugin round file sizes to the closest MiB + pattern = { "*" }, -- autocmd pattern or function see <### Overriding the detection of big files> + features = { -- features to disable + "indent_blankline", + "illuminate", + "lsp", + "treesitter", + "syntax", + "matchparen", + "vimopts", + "filetype", + }, + } +} diff --git a/.config/nvim/lua/plugins/cd-project.lua b/.config/nvim/lua/plugins/cd-project.lua new file mode 100644 index 0000000..fac5d5d --- /dev/null +++ b/.config/nvim/lua/plugins/cd-project.lua @@ -0,0 +1,37 @@ +return { + 'LintaoAmons/cd-project.nvim', + opts = { + -- this json file is acting like a database to update and read the projects in real time. + -- So because it's just a json file, you can edit directly to add more paths you want manually + projects_config_filepath = vim.fs.normalize(vim.fn.stdpath("config") .. "/cd-project.nvim.json"), + -- this controls the behaviour of `CdProjectAdd` command about how to get the project directory + project_dir_pattern = { ".git", ".gitignore", "Cargo.toml", "package.json", "go.mod" }, + choice_format = "both", -- optional, you can switch to "name" or "path" + projects_picker = "vim-ui", -- optional, you can switch to `telescope` + -- do whatever you like by hooks + hooks = { + { + callback = function(dir) + vim.notify("switched to dir: " .. dir) + end, + }, + { + callback = function(_) + vim.cmd("Telescope find_files") + end, + }, + { + callback = function(dir) + vim.notify("switched to dir: " .. dir) + end, -- required, action when trigger the hook + name = "cd hint", -- optional + order = 1, -- optional, the execution order if there're multiple hooks to be trigger at one point + pattern = "cd-project.nvim", -- optional, trigger hook if contains pattern + trigger_point = "DISABLE", -- optional, enum of trigger_points, default to `AFTER_CD` + match_rule = function(dir) -- optional, a function return bool. if have this fields, then pattern will be ignored + return true + end, + }, + }, + } +} diff --git a/.config/nvim/lua/plugins/chatgpt.lua b/.config/nvim/lua/plugins/chatgpt.lua new file mode 100644 index 0000000..a4dc597 --- /dev/null +++ b/.config/nvim/lua/plugins/chatgpt.lua @@ -0,0 +1,17 @@ +return { + "jackMort/ChatGPT.nvim", + event = "VeryLazy", + config = function() + require("chatgpt").setup({ + + --api_key_cmd = "op read op://private/OpenAI/credential --no-newline" + api_key = "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" + }) + end, + dependencies = { + "MunifTanjim/nui.nvim", + "nvim-lua/plenary.nvim", + "nvim-telescope/telescope.nvim" + }, + enabled = false +} diff --git a/.config/nvim/lua/plugins/column.lua b/.config/nvim/lua/plugins/column.lua new file mode 100644 index 0000000..035b0eb --- /dev/null +++ b/.config/nvim/lua/plugins/column.lua @@ -0,0 +1,24 @@ +return { + 'Bekaboo/deadcolumn.nvim', + opts = { + scope = 'buffer', + ---@type string[]|fun(mode: string): boolean + modes = function() return true end, + blending = { + threshold = 0.4, + colorcode = '#000000', + hlgroup = { 'Normal', 'bg' }, + }, + warning = { + alpha = 0.3, + offset = 0, + colorcode = '#CC0000', + hlgroup = { 'Error', 'bg' }, + }, + extra = { + ---@type string? + follow_tw = nil, + }, + }, + enabled = false +} diff --git a/.config/nvim/lua/plugins/digraphs.lua b/.config/nvim/lua/plugins/digraphs.lua new file mode 100644 index 0000000..0ee5b3b --- /dev/null +++ b/.config/nvim/lua/plugins/digraphs.lua @@ -0,0 +1,6 @@ +return { + 'protex/better-digraphs.nvim', + config = function() + vim.keymap.set('i', 'd', 'lua require("better-digraphs").digraphs("i")', { noremap = true, silent = true}) + end +} diff --git a/.config/nvim/lua/plugins/focus.lua b/.config/nvim/lua/plugins/focus.lua new file mode 100644 index 0000000..f3ea606 --- /dev/null +++ b/.config/nvim/lua/plugins/focus.lua @@ -0,0 +1,7 @@ +return {{ + "Pocco81/true-zen.nvim", + --"junegunn/goyo.vim", +}, +{ + "nullchilly/fsread.nvim", +}} diff --git a/.config/nvim/lua/plugins/fugitive.lua b/.config/nvim/lua/plugins/fugitive.lua new file mode 100644 index 0000000..2c2efeb --- /dev/null +++ b/.config/nvim/lua/plugins/fugitive.lua @@ -0,0 +1,3 @@ +return { + "tpope/vim-fugitive", +} diff --git a/.config/nvim/lua/plugins/gen.lua b/.config/nvim/lua/plugins/gen.lua new file mode 100644 index 0000000..4d29e0c --- /dev/null +++ b/.config/nvim/lua/plugins/gen.lua @@ -0,0 +1,23 @@ +return { + "David-Kunz/gen.nvim", + opts = { + model = "mistral", -- The default model to use. + host = "localhost", -- The host running the Ollama service. + port = "11434", -- The port on which the Ollama service is listening. + display_mode = "split", -- The display mode. Can be "float" or "split". + show_prompt = true, -- Shows the Prompt submitted to Ollama. + show_model = true, -- Displays which model you are using at the beginning of your chat session. + no_auto_close = false, -- Never closes the window automatically. + init = function(options) pcall(io.popen, "ollama serve > /dev/null 2>&1 &") end, + -- Function to initialize Ollama + command = function(options) + return "curl --silent --no-buffer -X POST http://" .. options.host .. ":" .. options.port .. "/api/generate -d $body" + end, + -- The command for the Ollama service. You can use placeholders $prompt, $model and $body (shellescaped). + -- This can also be a command string. + -- The executed command must return a JSON object with { response, context } + -- (context property is optional). + -- list_models = '', -- Retrieves a list of model names + debug = false -- Prints errors and the command which is run. + } +} diff --git a/.config/nvim/lua/plugins/godbolt.lua b/.config/nvim/lua/plugins/godbolt.lua new file mode 100644 index 0000000..907b48d --- /dev/null +++ b/.config/nvim/lua/plugins/godbolt.lua @@ -0,0 +1,16 @@ +return { + url = "https://git.sr.ht/~p00f/godbolt.nvim", + opts = { + languages = { + cpp = { compiler = "g122", options = {} }, + c = { compiler = "cg122", options = {} }, + rust = { compiler = "r1650", options = {} }, + -- any_additional_filetype = { compiler = ..., options = ... }, + }, + quickfix = { + enable = false, -- whether to populate the quickfix list in case of errors + auto_open = false -- whether to open the quickfix list in case of errors + }, + url = "https://godbolt.org" -- can be changed to a different godbolt instance + } +} diff --git a/.config/nvim/lua/plugins/lspconfig.lua b/.config/nvim/lua/plugins/lspconfig.lua index 8937a85..b686140 100644 --- a/.config/nvim/lua/plugins/lspconfig.lua +++ b/.config/nvim/lua/plugins/lspconfig.lua @@ -6,7 +6,8 @@ return { {url = "http://git.sr.ht/~p00f/clangd_extensions.nvim"}, "jubnzv/virtual-types.nvim", --"ray-x/lsp_signature.nvim", - "folke/neodev.nvim" + "folke/neodev.nvim", + "artemave/workspace-diagnostics.nvim" }, config = function() require("neodev").setup({ @@ -135,6 +136,7 @@ return { -- }) require("clangd_extensions.inlay_hints").setup_autocmd() require("clangd_extensions.inlay_hints").set_inlay_hints() + --require("workspace-diagnostics").populate_workspace_diagnostics(ev.buf) local signs = { { name = "DiagnosticSignError", text = "" }, diff --git a/.config/nvim/lua/plugins/no-neck-pain.lua b/.config/nvim/lua/plugins/no-neck-pain.lua new file mode 100644 index 0000000..122053e --- /dev/null +++ b/.config/nvim/lua/plugins/no-neck-pain.lua @@ -0,0 +1,4 @@ +return { + "shortcuts/no-neck-pain.nvim", + config = true +} diff --git a/.config/nvim/lua/plugins/notify.lua b/.config/nvim/lua/plugins/notify.lua new file mode 100644 index 0000000..3a7836e --- /dev/null +++ b/.config/nvim/lua/plugins/notify.lua @@ -0,0 +1,12 @@ +return { + "rcarriga/nvim-notify", + opts = { + stages = "static", + fps = 0, + on_open = function(win) + if vim.api.nvim_win_is_valid(win) then + vim.api.nvim_win_set_config(win, { border = "single" }) + end + end, + }, +} diff --git a/.config/nvim/lua/plugins/obsidian.lua b/.config/nvim/lua/plugins/obsidian.lua new file mode 100644 index 0000000..65d581e --- /dev/null +++ b/.config/nvim/lua/plugins/obsidian.lua @@ -0,0 +1,31 @@ +return { + "epwalsh/obsidian.nvim", + version = "*", -- recommended, use latest release instead of latest commit + --lazy = true, + --ft = "markdown", + -- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault: + -- event = { + -- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'. + -- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/**.md" + -- "BufReadPre path/to/my-vault/**.md", + -- "BufNewFile path/to/my-vault/**.md", + -- }, + dependencies = { + -- Required. + "nvim-lua/plenary.nvim", + + -- see below for full list of optional dependencies 👇 + }, + opts = { + workspaces = { + { + name = "personal", + path = "~/vaults/personal", + }, + { + name = "work", + path = "~/vaults/work", + }, + }, + }, +} diff --git a/.config/nvim/lua/plugins/startup.lua b/.config/nvim/lua/plugins/startup.lua new file mode 100644 index 0000000..4f414c1 --- /dev/null +++ b/.config/nvim/lua/plugins/startup.lua @@ -0,0 +1,8 @@ +return { + 'CWood-sdf/spaceport.nvim', + opts = { + + }, + lazy = false, -- load spaceport immediately + enabled = false +} diff --git a/.config/nvim/lua/plugins/swap.lua b/.config/nvim/lua/plugins/swap.lua new file mode 100644 index 0000000..6d9e917 --- /dev/null +++ b/.config/nvim/lua/plugins/swap.lua @@ -0,0 +1,6 @@ +return { + 'Wansmer/sibling-swap.nvim', + config = function() + require('sibling-swap').setup() + end +} diff --git a/.config/nvim/lua/plugins/tables.lua b/.config/nvim/lua/plugins/tables.lua new file mode 100644 index 0000000..8b5c922 --- /dev/null +++ b/.config/nvim/lua/plugins/tables.lua @@ -0,0 +1,4 @@ +return { + 'Myzel394/easytables.nvim', + config = true, +} diff --git a/.config/nvim/lua/plugins/targets.lua b/.config/nvim/lua/plugins/targets.lua new file mode 100644 index 0000000..38dcd49 --- /dev/null +++ b/.config/nvim/lua/plugins/targets.lua @@ -0,0 +1,3 @@ +return { + "wellle/targets.vim", +} diff --git a/.config/nvim/lua/plugins/terminal.lua b/.config/nvim/lua/plugins/terminal.lua new file mode 100644 index 0000000..feda615 --- /dev/null +++ b/.config/nvim/lua/plugins/terminal.lua @@ -0,0 +1,9 @@ +return { + 'akinsho/toggleterm.nvim', + config = function() + require('toggleterm').setup({ + open_mapping = [[i]], + insert_mappings = false + }) + end +} diff --git a/.config/nvim/lua/plugins/trouble.lua b/.config/nvim/lua/plugins/trouble.lua new file mode 100644 index 0000000..f5913e7 --- /dev/null +++ b/.config/nvim/lua/plugins/trouble.lua @@ -0,0 +1,4 @@ +return { + 'artemave/workspace-diagnostics.nvim', + config = true, +}