diff --git a/config/nvim_unstable/lazy-lock.json b/config/nvim_unstable/lazy-lock.json new file mode 100644 index 0000000..7a2038a --- /dev/null +++ b/config/nvim_unstable/lazy-lock.json @@ -0,0 +1,35 @@ +{ + "catppuccin": { "branch": "main", "commit": "5b5e3aef9ad7af84f463d17b5479f06b87d5c429" }, + "comment-box.nvim": { "branch": "main", "commit": "06bb771690bc9df0763d14769b779062d8f12bc5" }, + "conform.nvim": { "branch": "master", "commit": "b1a75324ddf96b7bb84963a297b1ed334db087c0" }, + "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, + "fzf-lua": { "branch": "main", "commit": "6488ada2f376e47789391dc353b6d91a3f9de6f6" }, + "grapple.nvim": { "branch": "main", "commit": "b41ddfc1c39f87f3d1799b99c2f0f1daa524c5f7" }, + "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, + "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, + "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, + "mini.nvim": { "branch": "main", "commit": "0420076298c4457f200c2de468f65d080597a347" }, + "neogen": { "branch": "main", "commit": "b2e78708876f4da507839726816010a68e33fec8" }, + "nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" }, + "nvim-lint": { "branch": "master", "commit": "93b8040115c9114dac1047311763bef275e752dc" }, + "nvim-lspconfig": { "branch": "master", "commit": "ff6471d4f837354d8257dfa326b031dd8858b16e" }, + "nvim-treesitter": { "branch": "master", "commit": "9be6836ebeb88a536055bf1ce0961eef68da4bc6" }, + "nvim-treesitter-context": { "branch": "master", "commit": "93b29a32d5f4be10e39226c6b796f28d68a8b483" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "9937e5e356e5b227ec56d83d0a9d0a0f6bc9cad4" }, + "nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" }, + "nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" }, + "nvim-web-devicons": { "branch": "master", "commit": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c" }, + "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, + "remote-nvim.nvim": { "branch": "main", "commit": "66fc20fd259401c7bb6ac5189ecb6283c2eb65d2" }, + "remote-sshfs.nvim": { "branch": "main", "commit": "1ae5784bf0729c8b03cb7fe6561508a673c9adc8" }, + "render-markdown": { "branch": "main", "commit": "92256e02db70c474f97fc461b6b6bc4aff7a499a" }, + "telescope.nvim": { "branch": "master", "commit": "a4ed82509cecc56df1c7138920a1aeaf246c0ac5" }, + "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, + "ts-node-action": { "branch": "master", "commit": "bfaa787cc85d753af3c19245b4142ed727a534b5" }, + "typescript-tools.nvim": { "branch": "master", "commit": "e0887c1e336edbb01243e9f1e60d74b0bc0a2bed" }, + "vim-dadbod": { "branch": "master", "commit": "9f0ca8bcef704659820a95c3bbd2c262583a66a1" }, + "vim-dadbod-completion": { "branch": "master", "commit": "a8dac0b3cf6132c80dc9b18bef36d4cf7a9e1fe6" }, + "vim-dadbod-ui": { "branch": "master", "commit": "685e75b34ee0e12f92ec4507ea8bb7f1aaa936e5" }, + "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, + "yazi.nvim": { "branch": "main", "commit": "aae26f6794c2afe2054a0782fb0ff07b2cd2876c" } +} diff --git a/config/nvim_unstable/lua/aleidk/plugins/comments.lua b/config/nvim_unstable/lua/aleidk/plugins/comments.lua index de06eda..9137253 100644 --- a/config/nvim_unstable/lua/aleidk/plugins/comments.lua +++ b/config/nvim_unstable/lua/aleidk/plugins/comments.lua @@ -9,4 +9,19 @@ return { { "gcl", function() require("comment-box").llline() end, { desc = "Create a comment line", mode = { "n", "v" }, } }, }, }, + { + "danymat/neogen", + opts = { snippet_engine = "nvim" }, + dependencies = { "nvim-treesitter/nvim-treesitter" }, + version = "*", -- stable releases + keys = { + { + "gcd", + function() + require("neogen").generate() + end, + desc = "Generate comment docstring", + }, + }, + } } diff --git a/config/nvim_unstable/lua/aleidk/plugins/doc-gen.lua b/config/nvim_unstable/lua/aleidk/plugins/doc-gen.lua deleted file mode 100644 index 199ce62..0000000 --- a/config/nvim_unstable/lua/aleidk/plugins/doc-gen.lua +++ /dev/null @@ -1,15 +0,0 @@ -return { - "danymat/neogen", - opts = { snippet_engine = "luasnip" }, - dependencies = { "nvim-treesitter/nvim-treesitter" }, - version = "*", -- stable releases - keys = { - { - "gcd", - function() - require("neogen").generate() - end, - desc = "Generate comment docstring", - }, - }, -} diff --git a/config/nvim_unstable/lua/aleidk/plugins/formatter.lua b/config/nvim_unstable/lua/aleidk/plugins/formatter.lua index 2406d75..2cb4e71 100644 --- a/config/nvim_unstable/lua/aleidk/plugins/formatter.lua +++ b/config/nvim_unstable/lua/aleidk/plugins/formatter.lua @@ -3,13 +3,11 @@ return { event = { "BufWritePre" }, cmd = { "ConformInfo" }, opts = { - -- log_level = vim.log.levels.DEBUG, - - -- See aviable formatters in: https://github.com/stevearc/conform.nvim#formatters + -- See available formatters in: https://github.com/stevearc/conform.nvim#formatters -- Formatters can be installed by mason formatters_by_ft = { -- Conform will run multiple formatters sequentially - -- Use a stop_after_first = true to run only the first available formatter + -- Use a stop_after_first = true to run only the first available formatters -- Use the "_" filetype to run formatters on filetypes that don't -- have other formatters configured. ["_"] = { "trim_whitespace" }, @@ -24,10 +22,9 @@ return { jsonc = { "biome" }, lua = { "stylua" }, markdown = { "markdownlint" }, - nim = { "nimpretty" }, php = { "pint" }, python = { "ruff_format", "ruff_organize_imports" }, - scss = { "prettierd", "prettier", stop_after_first = true }, + scss = { "biome", "prettierd", "prettier", stop_after_first = true }, sh = { "shfmt" }, toml = { "taplo" }, typescript = { "biome" }, diff --git a/config/nvim_unstable/lua/aleidk/plugins/init.lua b/config/nvim_unstable/lua/aleidk/plugins/init.lua index 1745f23..1f62383 100644 --- a/config/nvim_unstable/lua/aleidk/plugins/init.lua +++ b/config/nvim_unstable/lua/aleidk/plugins/init.lua @@ -9,4 +9,16 @@ return { { "ls", function() require("ts-node-action").node_action() end, desc = "Node Action" } } }, + { + -- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins + -- used for completion, annotations and signatures of Neovim apis + 'folke/lazydev.nvim', + ft = 'lua', + opts = { + library = { + -- Load luvit types when the `vim.uv` word is found + { path = "${3rd}/luv/library", words = { "vim%.uv" } } + }, + }, + }, } diff --git a/config/nvim_unstable/lua/aleidk/plugins/markdown.lua b/config/nvim_unstable/lua/aleidk/plugins/markdown.lua index 19e36a2..9f9ea53 100644 --- a/config/nvim_unstable/lua/aleidk/plugins/markdown.lua +++ b/config/nvim_unstable/lua/aleidk/plugins/markdown.lua @@ -1,12 +1,11 @@ return { { "MeanderingProgrammer/markdown.nvim", - name = "render-markdown", -- Only needed if you have another plugin named markdown.nvim - -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite + name = "render-markdown", -- Only needed if you have another plugin named markdown.nvim + dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins - dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons" }, -- if you prefer nvim-web-devicons opts = { - file_types = { 'markdown', 'copilot-chat' }, + file_types = { 'markdown' }, sign = { enabled = false, }, diff --git a/config/nvim_unstable/lua/aleidk/plugins/mini.lua b/config/nvim_unstable/lua/aleidk/plugins/mini.lua index 17aad31..88f6bbe 100644 --- a/config/nvim_unstable/lua/aleidk/plugins/mini.lua +++ b/config/nvim_unstable/lua/aleidk/plugins/mini.lua @@ -17,7 +17,14 @@ return { require('mini.splitjoin').setup() require("mini.align").setup({}) require('mini.animate').setup() - require('mini.notify').setup() + require('mini.notify').setup({ + -- Notifications about LSP progress + lsp_progress = { + -- Whether to enable showing + enable = false, + } + }) + vim.notify = require('mini.notify').make_notify() require('mini.starter').setup() require('mini.statusline').setup({}) require('mini.diff').setup({ view = { style = 'sign' } }) diff --git a/config/nvim_unstable/lua/aleidk/plugins/remote-sshfs.lua b/config/nvim_unstable/lua/aleidk/plugins/remote-sshfs.lua index 30f9134..8c11bc1 100644 --- a/config/nvim_unstable/lua/aleidk/plugins/remote-sshfs.lua +++ b/config/nvim_unstable/lua/aleidk/plugins/remote-sshfs.lua @@ -3,57 +3,5 @@ return { "nosduco/remote-sshfs.nvim", dependencies = { "nvim-telescope/telescope.nvim" }, cmd = { "RemoteSSHFSConnect" }, - config = function() - require("remote-sshfs").setup({}) - require("telescope").load_extension("remote-sshfs") - end, }, - { - "amitds1997/remote-nvim.nvim", - version = "*", -- Pin to GitHub releases - dependencies = { - "nvim-lua/plenary.nvim", -- For standard functions - "MunifTanjim/nui.nvim", -- To build the plugin UI - "nvim-telescope/telescope.nvim", -- For picking b/w different remote methods - }, - opts = { - remote = { - copy_dirs = { - data = { - base = vim.fn.stdpath("data"), -- Path from where data has to be copied. You can choose to copy entire path or subdirectories inside using `dirs` - dirs = { "lazy" }, -- Directories inside `base` to copy over. If this is set to string "*"; it means entire `base` should be copied over - compression = { - enabled = true, -- Should data be compressed before uploading - additional_opts = { "--exclude-vcs" }, -- Any arguments that can be passed to `tar` for compression can be specified here to improve your compression - }, - }, - -- cache = { - -- base = vim.fn.stdpath("cache"), - -- dirs = {}, - -- compression = { - -- enabled = true, - -- }, - -- }, - state = { - base = vim.fn.stdpath("state"), - dirs = {}, - compression = { - enabled = true, - }, - }, - }, - }, - client_callback = function(port, workspace_config) - local cmd = ("tmux new-window 'nvim --server localhost:%s --remote-ui' && tmux select-window -t:$"):format(port) - vim.fn.jobstart(cmd, { - detach = true, - on_exit = function(job_id, exit_code, event_type) - -- This function will be called when the job exits - print("Client", job_id, "exited with code", exit_code, "Event type:", event_type) - end, - }) - end, - }, - config = true, - } } diff --git a/config/nvim_unstable/lua/aleidk/plugins/treesitter.lua b/config/nvim_unstable/lua/aleidk/plugins/treesitter.lua index e281176..c677f4f 100644 --- a/config/nvim_unstable/lua/aleidk/plugins/treesitter.lua +++ b/config/nvim_unstable/lua/aleidk/plugins/treesitter.lua @@ -1,84 +1,19 @@ return { - -- Highlight, edit, and navigate code "nvim-treesitter/nvim-treesitter", event = { "BufReadPost", "BufNewFile", "BufWritePre", "VeryLazy" }, dependencies = { - "nvim-treesitter/nvim-treesitter-textobjects", - "JoosepAlviste/nvim-ts-context-commentstring", - "nvim-treesitter/nvim-treesitter-context", - { "windwp/nvim-ts-autotag", opts = {} }, + { + "JoosepAlviste/nvim-ts-context-commentstring", + opts = { + enable_autocmd = false, + }, + }, + { "nvim-treesitter/nvim-treesitter-context" }, }, build = ":TSUpdate", - config = function() - ---@diagnostic disable-next-line: missing-fields - require("nvim-treesitter.configs").setup({ - -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) - auto_install = true, - highlight = { enable = true }, - indent = { enable = true }, - incremental_selection = { - enable = true, - }, - textobjects = { - select = { - enable = true, - lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim - keymaps = { - -- You can use the capture groups defined in textobjects.scm - ["aa"] = "@parameter.outer", - ["ia"] = "@parameter.inner", - ["af"] = "@function.outer", - ["if"] = "@function.inner", - ["ac"] = "@class.outer", - ["ic"] = "@class.inner", - }, - }, - move = { - enable = true, - set_jumps = true, -- whether to set jumps in the jumplist - goto_previous = { -- current or last start of object - ["[["] = { query = "@local.scope", query_group = "locals", desc = "Next scope" }, - ["[f"] = "@function.outer", - ["[c"] = "@class.outer", - }, - goto_next = { -- next object end - ["]]"] = { query = "@local.scope", query_group = "locals", desc = "Next scope" }, - ["]f"] = "@function.outer", -- current function end - ["]c"] = "@class.outer", - }, - }, - swap = { - enable = true, - swap_next = { - ["ln"] = "@parameter.inner", - }, - swap_previous = { - ["lN"] = "@parameter.inner", - }, - }, - }, - -- autotag = { enable = true }, - }) - - require('ts_context_commentstring').setup { - enable_autocmd = false, - } - - local ts_repeat_move = require "nvim-treesitter.textobjects.repeatable_move" - - -- Repeat movement with ; and , - -- ensure , goes forward and ; goes backward regardless of the last direction - vim.keymap.set({ "n", "x", "o" }, ",", ts_repeat_move.repeat_last_move_next) - vim.keymap.set({ "n", "x", "o" }, ";", ts_repeat_move.repeat_last_move_previous) - - -- Optionally, make builtin f, F, t, T also repeatable with ; and , - vim.keymap.set({ "n", "x", "o" }, "f", ts_repeat_move.builtin_f_expr, { expr = true }) - vim.keymap.set({ "n", "x", "o" }, "F", ts_repeat_move.builtin_F_expr, { expr = true }) - vim.keymap.set({ "n", "x", "o" }, "t", ts_repeat_move.builtin_t_expr, { expr = true }) - vim.keymap.set({ "n", "x", "o" }, "T", ts_repeat_move.builtin_T_expr, { expr = true }) - - vim.keymap.set("n", "[u", function() - require("treesitter-context").go_to_context() - end, { silent = true, noremap = true, desc = "Go up when context is out of view" }) - end, + opts = { + auto_install = true, + highlight = { enable = true }, + indent = { enable = true }, + }, } diff --git a/config/nvim_unstable/lua/aleidk/plugins/trouble.lua b/config/nvim_unstable/lua/aleidk/plugins/trouble.lua index b7a17bf..dbcb527 100644 --- a/config/nvim_unstable/lua/aleidk/plugins/trouble.lua +++ b/config/nvim_unstable/lua/aleidk/plugins/trouble.lua @@ -2,7 +2,7 @@ return { "folke/trouble.nvim", - dependencies = { "nvim-tree/nvim-web-devicons" }, + dependencies = { "echasnovski/mini.nvim", "ibhagwan/fzf-lua" }, cmd = { "Trouble" }, keys = { { @@ -32,6 +32,10 @@ return { }, }, opts = function() + local config = require("fzf-lua.config") + local actions = require("trouble.sources.fzf").actions + config.defaults.actions.files["ctrl-t"] = actions.open + ---@type trouble.Window.opts local win_opts = { -- size = { width = 30, height = 0.5 },