diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 16ec93c..3f9f278 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -1,40 +1,30 @@ { "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, - "LuaSnip": { "branch": "master", "commit": "33b06d72d220aa56a7ce80a0dd6f06c70cd82b9d" }, + "blink.cmp": { "branch": "main", "commit": "ae5a4ce8f7e519e49de7ae6fcadd74547f820a52" }, "catppuccin": { "branch": "main", "commit": "faf15ab0201b564b6368ffa47b56feefc92ce3f4" }, - "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, - "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, - "conform.nvim": { "branch": "master", "commit": "e76afe8f7976071fae308e31bf426f557a8ef339" }, + "conform.nvim": { "branch": "master", "commit": "f4e8837878fc5712d053ba3091a73d27d96a09e2" }, "dressing.nvim": { "branch": "master", "commit": "fc78a3ca96f4db9f8893bb7e2fd9823e0780451b" }, - "fidget.nvim": { "branch": "main", "commit": "e2a175c2abe2d4f65357da1c98c59a5cfb2b543f" }, + "fidget.nvim": { "branch": "main", "commit": "9238947645ce17d96f30842e61ba81147185b657" }, + "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, "hurl.nvim": { "branch": "main", "commit": "bc8d748a3754f63d50ee8dfd54e20de80f22754c" }, - "image.nvim": { "branch": "master", "commit": "b3e1af829a56bb038e5f81bf97798a2950064b62" }, - "lazy.nvim": { "branch": "main", "commit": "b97ee167f594c69656f985f919a00435a7bc7045" }, + "lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" }, "lazydev.nvim": { "branch": "main", "commit": "f59bd14a852ca43db38e3662395354cb2a9b13e0" }, - "lsp-zero.nvim": { "branch": "v3.x", "commit": "ab2a3413646fedd77aa0eab4214a6473e62f6a64" }, - "lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" }, "lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" }, "luvit-meta": { "branch": "main", "commit": "57d464c4acb5c2e66bd4145060f5dc9e96a7bbb7" }, "mini.map": { "branch": "main", "commit": "4c58e755d75f9999abcd3b3c6e934734b6a8b098" }, - "mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" }, - "nui.nvim": { "branch": "main", "commit": "b1b9b75a2d8041e1c2234f7448c61f8468a4258d" }, - "nvim-cmp": { "branch": "main", "commit": "3403e2e9391ed0a28c3afddd8612701b647c8e26" }, - "nvim-lspconfig": { "branch": "master", "commit": "5a812abc65d529ea7673059a348814c21d7f87ff" }, + "nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" }, + "nvim-lspconfig": { "branch": "master", "commit": "040001d85e9190a904d0e35ef5774633e14d8475" }, "nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" }, "nvim-surround": { "branch": "main", "commit": "9f0cb495f25bff32c936062d85046fbda0c43517" }, - "nvim-treesitter": { "branch": "master", "commit": "337b503688eccb3046547661e4c738e674548fcf" }, + "nvim-treesitter": { "branch": "master", "commit": "fa915a30c5cdf1d18129e9ef6ac2ee0fa799904f" }, "nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" }, - "nvim-web-devicons": { "branch": "master", "commit": "87c34abe5d1dc7c1c0a95aaaf888059c614c68ac" }, + "nvim-web-devicons": { "branch": "master", "commit": "0eb18da56e2ba6ba24de7130a12bcc4e31ad11cb" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "dae2eac9d91464448b584c7949a31df8faefec56" }, "telescope.nvim": { "branch": "master", "commit": "2eca9ba22002184ac05eddbe47a7fe2d5a384dfc" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, - "tree-sitter-nu": { "branch": "main", "commit": "a94fdf1df5deba1aa1a3fff23e1276333b5ab666" }, "trouble.nvim": { "branch": "main", "commit": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6" }, - "twilight.nvim": { "branch": "main", "commit": "1584c0b0a979b71fd86b18d302ba84e9aba85b1b" }, "vim-cool": { "branch": "master", "commit": "662e7b11064cbeedad17c45d2fe926e78d3cd0b6" }, - "which-key.nvim": { "branch": "main", "commit": "9b365a6428a9633e3eeb34dbef1b791511c54f70" }, - "zen-mode.nvim": { "branch": "main", "commit": "29b292bdc58b76a6c8f294c961a8bf92c5a6ebd6" } + "which-key.nvim": { "branch": "main", "commit": "8ab96b38a2530eacba5be717f52e04601eb59326" } } diff --git a/.config/nvim/lua/nvwynd/keymaps.lua b/.config/nvim/lua/nvwynd/keymaps.lua index 514ab79..1b8c039 100644 --- a/.config/nvim/lua/nvwynd/keymaps.lua +++ b/.config/nvim/lua/nvwynd/keymaps.lua @@ -14,42 +14,44 @@ map("n", "", "bd!", { desc = "Close Buffer" }) map("v", "J", ":m '>+1gv=gv") map("v", "K", ":m '<-2gv=gv") +-- quickfix +map("n", "", "cnext", { desc = "Qui[C]kfix Next" }) +map("n", "", "cprev", { desc = "Qui[C]kfix Next" }) + -- terminal map("t", "", "") -- telescope -map("n", "ff", "Telescope find_files", { desc = "[F]ind [F]iles" }) -map("n", "fh", "Telescope help_tags", { desc = "[F]ind [H]elp" }) -map("n", "fr", "Telescope oldfiles", { desc = "[F]ind [R]ecent" }) -map( - "n", - "fsb", - "Telescope current_buffer_fuzzy_find", - { desc = "[F]ind [S]tring in current [B]uffer" } -) -map("n", "fsg", "Telescope live_grep", { desc = "[F]ind [S]tring [G]lobal" }) -map("n", "fgg", "Telescope git_files", { desc = "[F]ind [G]it" }) -map("n", "fgs", "Telescope git_status", { desc = "[F]ind [G]it [S]tatus" }) +local telescope = require("telescope.builtin") +map("n", "ff", telescope.find_files, { desc = "[F]ind [F]iles" }) +map("n", "fh", telescope.help_tags, { desc = "[F]ind [H]elp" }) +map("n", "fr", telescope.oldfiles, { desc = "[F]ind [R]ecent" }) +map("n", "fsb", telescope.current_buffer_fuzzy_find, { desc = "[F]ind [S]tring in current [B]uffer" }) +map("n", "fsg", telescope.live_grep, { desc = "[F]ind [S]tring [G]lobal" }) +map("n", "fgg", telescope.git_files, { desc = "[F]ind [G]it" }) +map("n", "fgs", telescope.git_status, { desc = "[F]ind [G]it [S]tatus" }) +map("n", "fgh", telescope.git_stash, { desc = "[F]ind [G]it Stas[H]" }) map("n", "fgc", "Telescope git_commits", { desc = "[F]ind [G]it [C]ommits" }) -map( - "n", - "", - "Telescope buffers sort_mru=true sort_lastused=true ignore_current_buffer=true", - { desc = "[ ] Find Buffers" } -) +map("n", "", function() + telescope.buffers({ + sort_mru = true, + sort_lastused = true, + ignore_current_buffer = true, + }) +end, { desc = "[ ] Find Buffers" }) -- lsp -map("n", "gd", "Telescope lsp_definitions", { desc = "[G]oto [D]efinition" }) -map("n", "gr", "Telescope lsp_references", { desc = "[G]oto [R]eferences" }) -map("n", "gI", "Telescope lsp_implementations", { desc = "[G]oto [I]mplementations" }) +map("n", "gd", telescope.lsp_definitions, { desc = "[G]oto [D]efinition" }) +map("n", "gr", telescope.lsp_references, { desc = "[G]oto [R]eferences" }) +map("n", "gI", telescope.lsp_implementations, { desc = "[G]oto [I]mplementations" }) map("n", "gD", vim.lsp.buf.declaration, { desc = "[G]oto [D]eclaration" }) map("n", "", function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = 0 })) end, { desc = "Toggle Inlay Hint" }) map("n", "ca", vim.lsp.buf.code_action, { desc = "[C]ode [A]ction" }) map("n", "cf", vim.lsp.buf.format, { desc = "[C]ode [F]ormat" }) -map("n", "ws", require("telescope.builtin").lsp_dynamic_workspace_symbols, { desc = "[W]orkspace [S]ymbols" }) -map("n", "ds", require("telescope.builtin").lsp_document_symbols, { desc = "[D]ocument [S]ymbols" }) +map("n", "ws", telescope.lsp_dynamic_workspace_symbols, { desc = "[W]orkspace [S]ymbols" }) +map("n", "ds", telescope.lsp_document_symbols, { desc = "[D]ocument [S]ymbols" }) map("n", "rn", vim.lsp.buf.rename, { desc = "[R]e[n]ame" }) -- neo-tree diff --git a/.config/nvim/lua/nvwynd/plugins/completion.lua b/.config/nvim/lua/nvwynd/plugins/completion.lua index 25d1a77..8329092 100644 --- a/.config/nvim/lua/nvwynd/plugins/completion.lua +++ b/.config/nvim/lua/nvwynd/plugins/completion.lua @@ -1,71 +1,25 @@ return { { - "hrsh7th/nvim-cmp", - lazy = false, - priority = 100, - dependencies = { - "onsails/lspkind.nvim", - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-path", - "hrsh7th/cmp-buffer", - "L3MON4D3/LuaSnip", - "saadparwaiz1/cmp_luasnip", - }, - opts = function(_, opts) - opts.sources = opts.sources or {} - table.insert(opts.sources, { - name = "lazydev", - group_index = 0, - }) - end, - config = function() - vim.opt.completeopt = { "menu", "menuone", "noselect" } + "saghen/blink.cmp", + dependencies = "rafamadriz/friendly-snippets", + version = "v0.*", + opts = { + keymap = { preset = "enter" }, - -- some nice cmp icons - local lspkind = require("lspkind") - lspkind.init({}) + appearance = { + use_nvim_cmp_as_default = true, + nerd_font_variant = "mono", + }, - local cmp = require("cmp") + signature = { enabled = true }, - cmp.setup({ - mapping = cmp.mapping.preset.insert({ - -- `Enter` key to confirm completion - [""] = cmp.mapping.confirm({ select = false }), - - -- `Esc` key to close the menu - [""] = cmp.mapping.abort(), - - -- Ctrl+Space to trigger completion menu - [""] = cmp.mapping.complete(), - - -- Scroll up and down in the completion documentation - -- [""] = cmp.mapping.scroll_docs(-4), - -- [""] = cmp.mapping.scroll_docs(4), - }), - sources = cmp.config.sources({ - { - name = "nvim_lsp", - entry_filter = function(entry, ctx) - -- 1 is the Text entry from LSP specs - -- https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionItemKind - if entry:get_kind() == 1 then - return false - end - return true - end, + completion = { + menu = { + draw = { + columns = { { "kind_icon" }, { "label", "label_description", gap = 1 }, { "kind" } }, }, - { name = "path" }, - -- { name = "buffer" }, - }), - snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) - end, }, - formatting = { - format = lspkind.cmp_format({}), - }, - }) - end, + }, + }, }, } diff --git a/.config/nvim/lua/nvwynd/plugins/editor.lua b/.config/nvim/lua/nvwynd/plugins/editor.lua index 743985d..235d1ad 100644 --- a/.config/nvim/lua/nvwynd/plugins/editor.lua +++ b/.config/nvim/lua/nvwynd/plugins/editor.lua @@ -2,7 +2,20 @@ return { { "nvim-telescope/telescope.nvim", version = false, - dependencies = { "nvim-lua/plenary.nvim" }, + dependencies = { + "nvim-lua/plenary.nvim", + { "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, + }, + config = function() + local telescope = require("telescope") + telescope.setup({ + extension = { + fzf = {}, + }, + }) + + telescope.load_extension("fzf") + end, }, { diff --git a/.config/nvim/lua/nvwynd/plugins/lsp.lua b/.config/nvim/lua/nvwynd/plugins/lsp.lua index c3bcc9b..ddb7695 100644 --- a/.config/nvim/lua/nvwynd/plugins/lsp.lua +++ b/.config/nvim/lua/nvwynd/plugins/lsp.lua @@ -2,14 +2,12 @@ return { { "neovim/nvim-lspconfig", dependencies = { + "saghen/blink.cmp", { "j-hui/fidget.nvim", opts = {} }, }, config = function() - local lsp_zero = require("lsp-zero") - lsp_zero.extend_lspconfig() - local lspconfig = require("lspconfig") - local capabilities = require("cmp_nvim_lsp").default_capabilities() + local capabilities = require("blink.cmp").get_lsp_capabilities() -- Python lspconfig.pyright.setup({ @@ -92,11 +90,6 @@ return { capabilities = capabilities, }) - -- C3 - lspconfig.c3_lsp.setup({ - capabilities = capabilities, - }) - -- Bash lspconfig.bashls.setup({ capabilities = capabilities, @@ -139,23 +132,6 @@ return { end, }, - { - "VonHeikemen/lsp-zero.nvim", - opts = {}, - lazy = true, - dependencies = { "hrsh7th/cmp-nvim-lsp", "hrsh7th/nvim-cmp", "L3MON4D3/LuaSnip" }, - config = function() - local lsp_zero = require("lsp-zero") - - lsp_zero.on_attach(function(client, bufnr) - lsp_zero.default_keymaps({ - buffer = bufnr, - preserve_mappings = false, - }) - end) - end, - }, - { "folke/lazydev.nvim", ft = "lua", @@ -173,9 +149,4 @@ return { "Bilal2453/luvit-meta", lazy = true, }, - - -- { - -- "folke/neodev.nvim", - -- opts = {}, - -- }, } diff --git a/.config/nvim/lua/nvwynd/plugins/treesitter.lua b/.config/nvim/lua/nvwynd/plugins/treesitter.lua index c3ab627..4561c46 100644 --- a/.config/nvim/lua/nvwynd/plugins/treesitter.lua +++ b/.config/nvim/lua/nvwynd/plugins/treesitter.lua @@ -2,19 +2,6 @@ return { { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate", - init = function() - local parser_config = require("nvim-treesitter.parsers").get_parser_configs() - parser_config.c3 = { - install_info = { - url = "https://github.com/c3lang/tree-sitter-c3", - files = { "src/parser.c", "src/scanner.c" }, - branch = "main", - }, - } - end, - dependencies = { - { "nushell/tree-sitter-nu", build = ":TSUpdate nu" }, - }, config = function() local configs = require("nvim-treesitter.configs") @@ -24,10 +11,6 @@ return { vsh = "glsl", hbs = "html", - - c3 = "c3", - c3i = "c3", - c3t = "c3", }, }) @@ -48,7 +31,7 @@ return { "yaml", "markdown", "dockerfile", - "nu", + -- "nu", -- vim "vim", diff --git a/.config/nvim/lua/nvwynd/plugins/util.lua b/.config/nvim/lua/nvwynd/plugins/util.lua index ff787ad..1bccabf 100644 --- a/.config/nvim/lua/nvwynd/plugins/util.lua +++ b/.config/nvim/lua/nvwynd/plugins/util.lua @@ -22,12 +22,6 @@ return { opts = {}, }, - { - "echasnovski/mini.pairs", - version = false, - opts = {}, - }, - { "echasnovski/mini.map", version = false, diff --git a/.zshrc b/.zshrc index e9b9f91..bcb7cd0 100644 --- a/.zshrc +++ b/.zshrc @@ -127,6 +127,7 @@ function days_since() {( alias repos="~/.local/bin/repos.sh" alias reposn="~/.local/bin/reposn.sh" +alias reposl="~/.local/bin/reposl.sh" # private SSH stuff source ~/.piwrc