diff --git a/lazy-lock.json b/lazy-lock.json index e047526..003ccde 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,65 +1,79 @@ { "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, - "LuaSnip": { "branch": "master", "commit": "3732756842a2f7e0e76a7b0487e9692072857277" }, + "LuaSnip": { "branch": "master", "commit": "0abc8f390b278c3b4aabc4c004ac8a088b65cf24" }, "auto-cmdheight.nvim": { "branch": "main", "commit": "82619eab0268f27024e1e0981ec3721a003ab2b7" }, + "auto-session": { "branch": "main", "commit": "3e145ee9af42eb6764908a1a481f53fe7f0bdbe5" }, "barbecue": { "branch": "main", "commit": "3e31404f0b93a2c30d151abf0648650ac811c664" }, + "catppuccin": { "branch": "main", "commit": "8edd468af4d63212b84d69b2ddb5ffc9023ef5eb" }, + "cellular-automaton.nvim": { "branch": "main", "commit": "1606e9d5d04ff254023c3f3c62842d065708d6d3" }, "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, "cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" }, "cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, - "conform.nvim": { "branch": "master", "commit": "ffe26e8df8115c9665d24231f8a49fadb2d611ce" }, + "conform.nvim": { "branch": "master", "commit": "619363c30309d29ffa631e67c8183f2a72caa373" }, + "cord.nvim": { "branch": "master", "commit": "0be090969e978f7442870ef227e09eff7bf3480d" }, + "cyberdream.nvim": { "branch": "main", "commit": "d1866f5b606896ca530be00bafbd12a3e6bb6efd" }, + "dracula.nvim": { "branch": "main", "commit": "ae752c13e95fb7c5f58da4b5123cb804ea7568ee" }, "fidget.nvim": { "branch": "main", "commit": "9238947645ce17d96f30842e61ba81147185b657" }, - "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, - "gitsigns.nvim": { "branch": "main", "commit": "5813e4878748805f1518cee7abb50fd7205a3a48" }, - "go.nvim": { "branch": "master", "commit": "41a18f0c05534c375bafec7ed05cdb409c4abcc6" }, - "guihua.lua": { "branch": "master", "commit": "ef44ba40f12e56c1c9fa45967f2b4d142e4b97a0" }, - "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, - "inlay-hints.nvim": { "branch": "master", "commit": "990e1f96699b8293b6665b9e73b16128c66684e6" }, - "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, + "flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" }, + "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, + "gitsigns.nvim": { "branch": "main", "commit": "dd3f588bacbeb041be6facf1742e42097f62165d" }, + "go.nvim": { "branch": "master", "commit": "5c741a26f5df77c95d42d8f48e7008aea10e5f4f" }, + "gruvbox.nvim": { "branch": "main", "commit": "154eb5ff5b96d0641307113fa385eaf0d36d9796" }, + "guihua.lua": { "branch": "master", "commit": "f8e06bd8a26dee3377d63c2adf1e57cdb58ac474" }, + "indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" }, + "inlay-hints.nvim": { "branch": "master", "commit": "297a65ab9543eb0850c1a55df4bb89e22cfec504" }, + "kanagawa.nvim": { "branch": "master", "commit": "bb85e4bfc8d89b0e62c8fa53ccdd13d12e2f77b3" }, + "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, "lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" }, "let-it-snow.nvim": { "branch": "main", "commit": "15ad478c8f903f8c2addad08fed1d8429bc01bde" }, - "live-server.nvim": { "branch": "main", "commit": "e8a34bc37fc565c678addbb352a59aa6c1842c2b" }, - "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" }, - "markdown.nvim": { "branch": "master", "commit": "1a16542bc3e3faf079b4d38b467a71356c7ea2f4" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "0b9bb925c000ae649ff7e7149c8cd00031f4b539" }, - "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, - "mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" }, - "mdx.nvim": { "branch": "main", "commit": "63fc7d0f39140a61a9758818067ff4d0872f332c" }, + "live-server.nvim": { "branch": "main", "commit": "f1a2defb7bc3bfc37bcb455fafdf6d61113d71c8" }, + "lualine.nvim": { "branch": "master", "commit": "131a558e13f9f28b15cd235557150ccb23f89286" }, + "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, + "markdown.nvim": { "branch": "master", "commit": "093be911d90de03877f3009de36081c1a6242d51" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "7b01e2974a47d489bb92f47a41e4c0088ea8f86e" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" }, + "mason.nvim": { "branch": "main", "commit": "bb639d4bf385a4d89f478b83af4d770be05ab7eb" }, + "mdx.nvim": { "branch": "main", "commit": "6c3dc7c4a4b58b5d86404c21a9b4655282ca08c5" }, + "mini.ai": { "branch": "main", "commit": "bfb26d9072670c3aaefab0f53024b2f3729c8083" }, + "mini.splitjoin": { "branch": "main", "commit": "9fcd8856efb95a505090c3225726466494076127" }, "neocord": { "branch": "main", "commit": "2ebf3792a8100376bb65fd66d5dbf60f50af7529" }, - "nvim-autopairs": { "branch": "master", "commit": "7a2c97cccd60abc559344042fefb1d5a85b3e33b" }, - "nvim-cmp": { "branch": "main", "commit": "d97d85e01339f01b842e6ec1502f639b080cb0fc" }, - "nvim-colorizer.lua": { "branch": "master", "commit": "81e676d3203c9eb6e4c0ccf1eba1679296ef923f" }, - "nvim-hlslens": { "branch": "main", "commit": "425405475300d64de07dec3af60b1f1d31d49230" }, - "nvim-lspconfig": { "branch": "master", "commit": "9c923997123ff9071198ea3b594d4c1931fab169" }, - "nvim-navic": { "branch": "master", "commit": "7d914a39a1ef8f4e22c2c4381abeef7c556f5a13" }, + "nightfox.nvim": { "branch": "main", "commit": "26b61b1f856ec37cae3cb64f5690adb955f246a1" }, + "nvim-autopairs": { "branch": "master", "commit": "7b9923abad60b903ece7c52940e1321d39eccc79" }, + "nvim-cmp": { "branch": "main", "commit": "a1d504892f2bc56c2e79b65c6faded2fd21f3eca" }, + "nvim-colorizer.lua": { "branch": "master", "commit": "5cfe7fffbd01e17b3c1e14af85d5febdef88bd8c" }, + "nvim-hlslens": { "branch": "main", "commit": "be2d7b2be01860b5445a007ff2bc72b29896db6b" }, + "nvim-lspconfig": { "branch": "master", "commit": "6f76a3eeadc2ee235d74cd7d5319e95a261084af" }, + "nvim-navic": { "branch": "master", "commit": "f5eba192f39b453675d115351808bd51276d9de5" }, "nvim-scrollbar": { "branch": "main", "commit": "f8e87b96cd6362ef8579be456afee3b38fd7e2a8" }, - "nvim-surround": { "branch": "main", "commit": "fcfa7e02323d57bfacc3a141f8a74498e1522064" }, - "nvim-tree.lua": { "branch": "master", "commit": "59088b96a32ea47caf4976e164dbd88b86447fb7" }, - "nvim-treesitter": { "branch": "main", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, - "nvim-treesitter-context": { "branch": "master", "commit": "64dd4cf3f6fd0ab17622c5ce15c91fc539c3f24a" }, - "nvim-treesitter-textobjects": { "branch": "main", "commit": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef" }, - "nvim-ts-autotag": { "branch": "main", "commit": "8e1c0a389f20bf7f5b0dd0e00306c1247bda2595" }, - "nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" }, - "onedark.nvim": { "branch": "master", "commit": "213c23ae45a04797572242568d5d51937181792d" }, - "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, - "render-markdown.nvim": { "branch": "main", "commit": "b2b135347e299ffbf7f4123fb7811899b0c9f4b8" }, - "spotify.nvim": { "branch": "master", "commit": "0ff75f2530e8f975d243a36793e24f257e846e02" }, + "nvim-surround": { "branch": "main", "commit": "2e93e154de9ff326def6480a4358bfc149d5da2c" }, + "nvim-tree.lua": { "branch": "master", "commit": "07f541fcaa4a5ae019598240362449ab7e9812b3" }, + "nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" }, + "nvim-treesitter-context": { "branch": "master", "commit": "b311b30818951d01f7b4bf650521b868b3fece16" }, + "nvim-treesitter-textobjects": { "branch": "main", "commit": "851e865342e5a4cb1ae23d31caf6e991e1c99f1e" }, + "nvim-ts-autotag": { "branch": "main", "commit": "88c1453db4ba7dd24131086fe51fdf74e587d275" }, + "nvim-web-devicons": { "branch": "master", "commit": "dfbfaa967a6f7ec50789bead7ef87e336c1fa63c" }, + "onedark.nvim": { "branch": "master", "commit": "df4792accde9db0043121f32628bcf8e645d9aea" }, + "opencode.nvim": { "branch": "main", "commit": "6ab7d2fa0167ee81f1e22af712aaaaea4b64488a" }, + "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, + "refactoring.nvim": { "branch": "master", "commit": "624c01e8175901484eac74512baf35e9dfe269b8" }, + "render-markdown.nvim": { "branch": "main", "commit": "5adf0895310c1904e5abfaad40a2baad7fe44a07" }, + "rose-pine": { "branch": "main", "commit": "ff483051a47e27d84bdef47703538df1ed9f4a47" }, + "snacks.nvim": { "branch": "main", "commit": "882c996cf28183f4d63640de0b4c02ec886d01f2" }, "supermaven-nvim": { "branch": "main", "commit": "07d20fce48a5629686aefb0a7cd4b25e33947d50" }, - "tailwind-fold.nvim": { "branch": "main", "commit": "d9e7ca11691d252b35795726dff087bf013b2ebf" }, + "tailwind-fold.nvim": { "branch": "main", "commit": "e2ba5ee1ca9b74208709fe9d7314b8aa753b26a7" }, "tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "3d3cd95e4a4135c250faf83dd5ed61b8e5502b86" }, "targets.vim": { "branch": "master", "commit": "6325416da8f89992b005db3e4517aaef0242602e" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, - "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, - "telescope.nvim": { "branch": "master", "commit": "e69b434b968a33815e2f02a5c7bd7b8dd4c7d4b2" }, + "tiny-glimmer.nvim": { "branch": "main", "commit": "f26728abf811324d7ed6b035a11d7b76a27c06c3" }, "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, - "tokyonight.nvim": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" }, + "tokyonight.nvim": { "branch": "main", "commit": "cdc07ac78467a233fd62c493de29a17e0cf2b2b6" }, "trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" }, - "undotree": { "branch": "master", "commit": "0f1c9816975b5d7f87d5003a19c53c6fd2ff6f7f" }, - "vim-dadbod": { "branch": "master", "commit": "e95afed23712f969f83b4857a24cf9d59114c2e6" }, + "undotree": { "branch": "master", "commit": "6fa6b57cda8459e1e4b2ca34df702f55242f4e4d" }, + "vim-dadbod": { "branch": "master", "commit": "6d1d41da4873a445c5605f2005ad2c68c99d8770" }, "vim-dadbod-completion": { "branch": "master", "commit": "a8dac0b3cf6132c80dc9b18bef36d4cf7a9e1fe6" }, - "vim-dadbod-ui": { "branch": "master", "commit": "48c4f271da13d380592f4907e2d1d5558044e4e5" }, - "vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" }, + "vim-dadbod-ui": { "branch": "master", "commit": "07e92e22114cc5b1ba4938d99897d85b58e20475" }, + "vim-fugitive": { "branch": "master", "commit": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0" }, + "vimatrix.nvim": { "branch": "main", "commit": "eea0efca87dde2e83b9a744dc4f93a582586466c" }, "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }, - "yazi.nvim": { "branch": "main", "commit": "cda40833ab50de32a2fd10e29b0d745ecb8cd04d" }, - "zen-mode.nvim": { "branch": "main", "commit": "8564ce6d29ec7554eb9df578efa882d33b3c23a7" } + "yazi.nvim": { "branch": "main", "commit": "deae057a704163356534aec905c5dbd32f258dd2" } } diff --git a/lua/custom/plugins/ai.lua b/lua/custom/plugins/ai.lua index 68510e0..7e00767 100644 --- a/lua/custom/plugins/ai.lua +++ b/lua/custom/plugins/ai.lua @@ -13,24 +13,20 @@ return { color = { suggestion_color = "#ffffff", }, - disable_inline_completion = false, -- disables inline completion for use with cmp - disable_keymaps = false, -- disables built in keymaps for more manual control + disable_inline_completion = false, + disable_keymaps = false, }) end, }, - - -- { - -- "monkoose/neocodeium", - -- event = "VeryLazy", - -- config = function() - -- local neocodeium = require("neocodeium") - -- neocodeium.setup() - -- vim.keymap.set("i", "", neocodeium.accept) - -- vim.keymap.set("i", "", neocodeium.cycle) - -- vim.keymap.set("i", "", neocodeium.accept_word) - -- end, - -- }, - -- { "github/copilot.vim" }, + { + "sudo-tee/opencode.nvim", + config = function() + require("opencode").setup({}) + end, + dependencies = { + "nvim-lua/plenary.nvim", + "folke/snacks.nvim", + }, + }, } - --- vim: ts=4 sts=4 sw=4 et +-- vim: ts=4 sts=4 sw=4 et \ No newline at end of file diff --git a/lua/custom/plugins/fun.lua b/lua/custom/plugins/fun.lua new file mode 100644 index 0000000..ca960b1 --- /dev/null +++ b/lua/custom/plugins/fun.lua @@ -0,0 +1,40 @@ +return { + -- Cellular automaton - make your code melt/rain + { + "eandrju/cellular-automaton.nvim", + cmd = "CellularAutomaton", + keys = { + { "fml", "CellularAutomaton make_it_rain", desc = "Make it rain" }, + { "gol", "CellularAutomaton game_of_life", desc = "Game of Life" }, + }, + }, + + -- Matrix digital rain screensaver + { + "wolfwfr/vimatrix.nvim", + cmd = "VimatrixOpen", + keys = { + { "mx", "VimatrixOpen", desc = "Toggle Matrix rain" }, + }, + opts = { + alphabet = "katakana", + colourscheme = "matrix", + }, + }, + + -- Smooth animations for yank/paste/search/undo + { + "rachartier/tiny-glimmer.nvim", + event = "VeryLazy", + opts = { + enable = true, + animations = { + yank = { enabled = true, effect = "fade" }, + paste = { enabled = true, effect = "bounce" }, + search = { enabled = true, effect = "pulse" }, + undo = { enabled = true, effect = "reverse_fade" }, + redo = { enabled = true, effect = "fade" }, + }, + }, + }, +} diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index be0eb9d..302ffab 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -2,4 +2,6 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information -return {} +return { + { 'vyfor/cord.nvim', event = "VeryLazy" } +} diff --git a/lua/custom/plugins/languages/go.lua b/lua/custom/plugins/languages/go.lua index e5344e1..9170711 100644 --- a/lua/custom/plugins/languages/go.lua +++ b/lua/custom/plugins/languages/go.lua @@ -1,20 +1,28 @@ return { - -- Your other plugin configurations... - - { - "ray-x/go.nvim", - dependencies = { - "ray-x/guihua.lua", - "neovim/nvim-lspconfig", - "nvim-treesitter/nvim-treesitter", - }, - ft = { "go", "gomod" }, - config = function() - require("go").setup() - end, - build = ':lua require("go.install").update_all_sync()', -- Install/update binaries - }, - - -- Other plugins... -} --- vim: ts=4 sts=4 sw=4 et + { + "ray-x/go.nvim", + dependencies = { + "ray-x/guihua.lua", + "neovim/nvim-lspconfig", + "nvim-treesitter/nvim-treesitter", + }, + ft = { "go", "gomod" }, + config = function() + require("go").setup({ + goimport = "gopls", + gofmt = "gofmt", + max_line_len = 120, + tag_transform = false, + test_template = "", + test_template_dir = "", + verbose = false, + lsp_cfg = true, + lsp_gofumpt = true, + lsp_on_attach = true, + lsp_codelens = true, + dap_debug = true, + }) + end, + build = ':lua require("go.install").update_all_sync()', + }, +} \ No newline at end of file diff --git a/lua/custom/plugins/languages/markdown.lua b/lua/custom/plugins/languages/markdown.lua index 9d38a85..1184a44 100644 --- a/lua/custom/plugins/languages/markdown.lua +++ b/lua/custom/plugins/languages/markdown.lua @@ -18,6 +18,14 @@ return { -- }, -- }, -- }, + { + "iamcco/markdown-preview.nvim", + build = function() + vim.fn["mkdp#util#install"]() + end, + ft = { "markdown" }, + cmd = { "MarkdownPreview", "MarkdownPreviewStop", "MarkdownPreviewToggle" }, + }, { "tadmccorkle/markdown.nvim", ft = "markdown", -- or 'event = "VeryLazy"' @@ -27,7 +35,7 @@ return { }, { "MeanderingProgrammer/render-markdown.nvim", - ft = { "markdown", "mdx" }, + ft = { "markdown", "mdx", "opencode_output" }, opts = { checkbox = { unchecked = { diff --git a/lua/custom/plugins/nalin.lua b/lua/custom/plugins/nalin.lua index 1082f6a..c3dcb5e 100644 --- a/lua/custom/plugins/nalin.lua +++ b/lua/custom/plugins/nalin.lua @@ -1,13 +1,14 @@ return { { "barrett-ruth/live-server.nvim", - build = "pnpm add -g live-server", + build = "npm install -g live-server", cmd = { "LiveServerStart", "LiveServerStop" }, config = true, }, { "IogaMaster/neocord", event = "VeryLazy", + enabled = false, opts = { logo = "auto", logo_tooltip = nil, @@ -29,22 +30,6 @@ return { terminal_text = "Using Terminal", }, }, - { - "stsewd/spotify.nvim", - build = ":UpdateRemotePlugins", - cmd = { "Spotify" }, - config = function() - require("spotify").setup() - end, - init = function() - -- Optional mappings. - -- vim.keymap.set("n", "ss", ":Spotify play/pause", { silent = true }) - -- vim.keymap.set("n", "sj", ":Spotify next", { silent = true }) - -- vim.keymap.set("n", "sk", ":Spotify prev", { silent = true }) - -- vim.keymap.set("n", "so", ":Spotify show", { silent = true }) - -- vim.keymap.set("n", "sc", ":Spotify status", { silent = true }) - end, - }, } -- IMP: -- format to add plugins: diff --git a/lua/custom/plugins/ui.lua b/lua/custom/plugins/ui.lua index 8ccadbc..c5c5d28 100644 --- a/lua/custom/plugins/ui.lua +++ b/lua/custom/plugins/ui.lua @@ -1,6 +1,104 @@ return { + { + "folke/snacks.nvim", + priority = 1000, + lazy = false, + opts = { + terminal = {}, + picker = {}, + notifier = { enabled = true }, + dashboard = { + sections = { + { + section = "header", + text = [[ + ██╗ ██╗██╗███╗ ███╗███████╗ + ██║ ██║██║████╗ ████║██╔════╝ + ██║ ██║██║██╔████╔██║█████╗ + ╚██╗ ██╔╝██║██║╚██╔╝██║██╔══╝ + ╚████╔╝ ██║██║ ╚═╝ ██║███████╗ + ╚═══╝ ╚═╝╚═╝ ╚═╝╚══════╝]], + }, + { section = "terminal", command = "echo ' Welcome back, Nalin 🖖'", height = 1, padding = 1 }, + { section = "keys", gap = 1, padding = 1 }, + { section = "recent_files", cwd = true, limit = 5, padding = 1 }, + { section = "projects", padding = 1 }, + }, + }, + image = { + enable = true, + doc = { enable = true }, + }, + indent = { + enabled = true, + animate = { enabled = false }, + }, + scope = { enabled = true }, + zen = { enabled = true }, + lazygit = { configure = true }, + }, + keys = { + { + "gg", + function() + Snacks.lazygit() + end, + desc = "Lazygit", + }, + { + "gb", + function() + Snacks.lazygit.blame_line() + end, + desc = "Lazygit Blame Line", + }, + { + "", + function() + Snacks.terminal() + end, + desc = "Toggle terminal", + mode = { "n", "t" }, + }, + }, + }, - ---@type LazySpec + { + "rose-pine/neovim", + name = "rose-pine", + lazy = true, + }, + + { + "ellisonleao/gruvbox.nvim", + lazy = true, + }, + + { + "catppuccin/nvim", + name = "catppuccin", + lazy = true, + }, + + { + "rebelot/kanagawa.nvim", + lazy = true, + }, + + { + "Mofiqul/dracula.nvim", + lazy = true, + }, + + { + "EdenEast/nightfox.nvim", + lazy = true, + }, + + { + "scottmckendry/cyberdream.nvim", + lazy = true, + }, { "MysticalDevil/inlay-hints.nvim", @@ -303,59 +401,6 @@ return { }, }, }, - { - "folke/zen-mode.nvim", - cmd = "ZenMode", - opts = { - - window = { - backdrop = 1.2, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal - -- height and width can be: - -- * an absolute number of cells when > 1 - -- * a percentage of the width / height of the editor when <= 1 - -- * a function that returns the width or the height - width = 92, -- width of the Zen window - height = 1, -- height of the Zen window - -- by default, no options are changed for the Zen window - -- uncomment any of the options below, or add other vim.wo options you want to apply - options = { - -- signcolumn = "no", -- disable signcolumn - -- number = false, -- disable number column - -- relativenumber = false, -- disable relative numbers - -- cursorline = false, -- disable cursorline - -- cursorcolumn = false, -- disable cursor column - -- foldcolumn = "0", -- disable fold column - -- list = false, -- disable whitespace characters - }, - }, - plugins = { - options = { - enabled = true, - ruler = false, -- disables the ruler text in the cmd line area - showcmd = false, -- disables the command in the last line of the screen - -- you may turn on/off statusline in zen mode by setting 'laststatus' - -- statusline will be shown only if 'laststatus' == 3 - laststatus = 2, -- turn off the statusline in zen mode - }, - twilight = { enabled = false }, -- enable to start Twilight when zen mode opens - gitsigns = { enabled = false }, -- disables git signs - tmux = { enabled = false }, -- disables the tmux statusline - -- this will change the font size on kitty when in zen mode - -- to make this work, you need to set the following kitty options: - -- - allow_remote_control socket-only - -- - listen_on unix:/tmp/kitty - -- wezterm = { - -- enabled = false, - -- -- can be either an absolute font size or the number of incremental steps - -- font = '+4', -- (10% increase per step) - -- }, - }, - -- callback where you can add custom code when the Zen window opens - -- on_open = function(win) end, - -- callback where you can add custom code when the Zen window closes - -- on_close = function() end, - }, - }, { "folke/todo-comments.nvim", event = "BufReadPost", @@ -431,7 +476,7 @@ return { config = function() require("which-key").setup() local wk = require("which-key") - wk.add({ +wk.add({ { "f", group = " Find" }, { "s", group = " Search" }, { "g", group = " Git" }, @@ -442,10 +487,23 @@ return { { "d", group = " document" }, { "q", group = " diagnostics" }, { "c", group = " copilot" }, + { "o", group = " opencode" }, + { "k", group = " kilo" }, + { "r", group = " refactor" }, { "w", group = " Workspace" }, { "d", group = " search dir" }, }) end, }, + + { + "rmagatti/auto-session", + config = function() + require("auto-session").setup({ + log_level = "error", + auto_session_suppress_dirs = { "~/", "~/Downloads", "/" }, + }) + end, + }, } -- vim: ts=4 sts=4 sw=4 et diff --git a/lua/custom/plugins/utility.lua b/lua/custom/plugins/utility.lua index efe6ddc..1bc2d44 100644 --- a/lua/custom/plugins/utility.lua +++ b/lua/custom/plugins/utility.lua @@ -1,5 +1,4 @@ return { - { "mbbill/undotree", cmd = { "UndotreeToggle", "UndotreeShow", "UndotreeHide", "UndotreeFocus" }, @@ -26,22 +25,14 @@ return { "jake-stewart/auto-cmdheight.nvim", event = "CmdlineEnter", opts = { - -- max cmdheight before displaying hit enter prompt. max_lines = 5, - - -- number of seconds until the cmdheight can restore. duration = 2, - - -- whether key press is required to restore cmdheight. remove_on_key = true, - - -- always clear the cmdline after duration and key press. - -- by default it will only happen when cmdheight changed. clear_always = false, }, }, { - "lukas-reineke/indent-blankline.nvim", -- Add indentation guides even on blank lines + "lukas-reineke/indent-blankline.nvim", main = "ibl", event = "BufReadPost", opts = {}, @@ -53,20 +44,104 @@ return { { "numToStr/Comment.nvim", event = "VeryLazy", + opts = {}, + }, + { + "kylechui/nvim-surround", + version = "*", + event = "VeryLazy", + opts = {}, + }, + + { + "echasnovski/mini.ai", + version = "*", + event = "VeryLazy", + opts = {}, + }, + { + "echasnovski/mini.splitjoin", + version = "*", + event = "VeryLazy", opts = { - -- add any options here + mappings = { + toggle = "tj", + }, }, }, { - "kylechui/nvim-surround", - version = "*", -- Use for stability; omit to use `main` branch for the latest features + "folke/flash.nvim", event = "VeryLazy", - config = function() - require("nvim-surround").setup({ - keymaps = { - change = "cs", - }, - }) - end, + opts = { + modes = { + search = { enabled = false }, + }, + }, + keys = { + { + "s", + mode = { "n", "x", "o" }, + function() + require("flash").jump() + end, + desc = "Flash", + }, + { + "S", + mode = { "n", "x", "o" }, + function() + require("flash").treesitter() + end, + desc = "Flash Treesitter", + }, + { + "", + mode = { "c" }, + function() + require("flash").toggle() + end, + desc = "Toggle Flash Search", + }, + }, + }, + { + "ThePrimeagen/refactoring.nvim", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-treesitter/nvim-treesitter", + }, + event = "VeryLazy", + keys = { + { + "re", + function() + require("refactoring").refactor("Extract Function") + end, + desc = "Extract function", + mode = "v", + }, + { + "rv", + function() + require("refactoring").refactor("Extract Variable") + end, + desc = "Extract variable", + mode = "v", + }, + { + "ri", + function() + require("refactoring").refactor("Inline Variable") + end, + desc = "Inline variable", + }, + { + "rb", + function() + require("refactoring").refactor("Extract Block") + end, + desc = "Extract block", + }, + }, }, } diff --git a/lua/keymaps.lua b/lua/keymaps.lua index 47ed747..0a4625b 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -3,6 +3,10 @@ vim.keymap.set({ "i" }, "jj", "", { silent = true }) vim.keymap.set({ "i" }, "jj", "", { silent = true }) +vim.keymap.set({ "n", "v" }, "", '"+p', { silent = true }) +vim.keymap.set("i", "", '+', { silent = true }) +vim.keymap.set("c", "", '+', { silent = true }) + vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, { desc = "Go to previous [D]iagnostic message" }) vim.keymap.set("n", "]d", vim.diagnostic.goto_next, { desc = "Go to next [D]iagnostic message" }) @@ -42,6 +46,9 @@ vim.keymap.set("n", "]d", vim.diagnostic.goto_next, { desc = "Go to next [D]iagn -- toggle stuff vim.api.nvim_set_keymap("n", "ts", ":SupermavenToggle ", { noremap = true, silent = true }) +vim.keymap.set("n", "th", function() + require("snacks").picker.colorschemes() +end, { desc = "Browse themes" }) vim.keymap.set("n", "lw", ":LspStart tailwindcss", { desc = "Start Tailwind CSS LSP" }) vim.keymap.set("n", "lt", ":LspStart ts_ls", { desc = "Start TypeScript LSP" }) vim.keymap.set("n", "ld", ":LspStart denols", { desc = "Start Deno LSP" }) @@ -68,8 +75,13 @@ vim.api.nvim_set_keymap("n", "tc", ":TSContextToggle", { noremap = t vim.api.nvim_set_keymap("n", "e", ":NvimTreeToggle", { noremap = true, silent = true }) --- zen mode -vim.api.nvim_set_keymap("n", "z", ":ZenMode", { noremap = true, silent = true }) +-- markdown preview +vim.api.nvim_set_keymap("n", "mp", ":MarkdownPreview", { noremap = true, silent = true }) + +-- zen mode (snacks) +vim.keymap.set("n", "z", function() + Snacks.zen() +end, { desc = "Zen Mode" }) -- for trouble vim.api.nvim_set_keymap("n", "xx", ":Trouble", { noremap = true, silent = true }) @@ -80,8 +92,7 @@ vim.api.nvim_set_keymap("n", "xr", ":Trouble lsp_references", { nore -- for nvim-tree -- NOTE: for git -vim.api.nvim_set_keymap("n", "gg", ":Gitsigns ", { noremap = true, silent = true }) -vim.api.nvim_set_keymap("n", "lg", ":!tg ", { noremap = true }) +vim.keymap.set("n", "lg", ":!tg ", { noremap = true }) vim.api.nvim_create_autocmd("TextYankPost", { desc = "Highlight when yanking (copying) text", @@ -91,6 +102,16 @@ vim.api.nvim_create_autocmd("TextYankPost", { end, }) +vim.api.nvim_create_autocmd("BufReadPost", { + pattern = { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.bmp", "*.tiff", "*.webp", "*.svg", "*.ico" }, + group = vim.api.nvim_create_augroup("image-preview", { clear = true }), + callback = function() + vim.bo.buftype = "nowrite" + vim.bo.modifiable = false + vim.bo.readonly = true + end, +}) + local function toggle_boolean() local word = vim.fn.expand("") if word == "true" then @@ -106,4 +127,6 @@ local function toggle_boolean() end end +vim.api.nvim_set_keymap("n", "kk", ":vsplit | terminal kilo", { noremap = true, silent = true }) + -- Create a keymap for normal mode diff --git a/lua/kickstart/plugins/cmp.lua b/lua/kickstart/plugins/cmp.lua index 22087bf..b100f6f 100644 --- a/lua/kickstart/plugins/cmp.lua +++ b/lua/kickstart/plugins/cmp.lua @@ -66,21 +66,41 @@ return { -- -- No, but seriously. Please read `:help ins-completion`, it is really good! mapping = cmp.mapping.preset.insert({ - -- Select the [n]ext item [""] = cmp.mapping.select_next_item(), - -- Select the [p]revious item [""] = cmp.mapping.select_prev_item(), - -- scroll the documentation window [b]ack / [f]orward - -- [''] = cmp.mapping.scroll_docs(-4), - -- [''] = cmp.mapping.scroll_docs(4), + [""] = function(fallback) + if cmp.visible() then + cmp.mapping.confirm({ select = true })() + else + fallback() + end + end, + [""] = function(fallback) + if cmp.visible() then + cmp.select_prev_item() + else + fallback() + end + end, + + [""] = function(fallback) + if cmp.visible() then + cmp.select_next_item() + else + fallback() + end + end, - -- Accept ([y]es) the completion. - -- This will auto-import if your LSP supports it. - -- This will expand snippets if the LSP sent a snippet. - [""] = cmp.mapping.confirm({ select = true }), + [""] = function(fallback) + if cmp.visible() then + cmp.select_prev_item() + else + fallback() + end + end, - [""] = cmp.mapping.confirm({ select = true }), + [""] = cmp.mapping.confirm({ select = true }), -- Manually trigger a completion from nvim-cmp. -- Generally you don't need this, because nvim-cmp will display -- completions whenever it has completion options available. @@ -108,24 +128,43 @@ return { -- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps }), sources = { - -- { name = "copilot", group_index = 1 }, - -- { name = 'codeium', --[[ group_index = 1 ]] }, - -- { name = "supermaven", --[[ group_index = 1 ]] }, { - name = "nvim_lua", --[[ group_index = 2 ]] + name = "nvim_lua", }, { - name = "nvim_lsp", --[[ group_index = 2 ]] + name = "nvim_lsp", }, { - name = "luasnip", --[[ group_index = 3 ]] + name = "luasnip", }, { - name = "buffer", --[[ group_index = 2 ]] + name = "buffer", + keyword_length = 3, }, { - name = "path", --[[ group_index = 3 ]] + name = "path", + }, + }, + window = { + completion = { + border = "rounded", + winhighlight = "Normal:CmpPmenu,CursorLine:CmpSel,Search:None", }, + documentation = { + border = "rounded", + }, + }, + formatting = { + format = function(entry, item) + item.menu = ({ + nvim_lua = "[lua]", + nvim_lsp = "[lsp]", + luasnip = "[snip]", + buffer = "[buf]", + path = "[path]", + })[entry.source.name] + return item + end, }, }) end, diff --git a/lua/kickstart/plugins/lspconfig.lua b/lua/kickstart/plugins/lspconfig.lua index c479580..05bd8b8 100644 --- a/lua/kickstart/plugins/lspconfig.lua +++ b/lua/kickstart/plugins/lspconfig.lua @@ -46,14 +46,14 @@ return { vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = "LSP: " .. desc }) end - map("gd", require("telescope.builtin").lsp_definitions, "[G]oto [D]efinition") - map("gr", require("telescope.builtin").lsp_references, "[G]oto [R]eferences") - map("gI", require("telescope.builtin").lsp_implementations, "[G]oto [I]mplementation") - map("D", require("telescope.builtin").lsp_type_definitions, "Type [D]efinition") - map("ds", require("telescope.builtin").lsp_document_symbols, "[D]ocument [S]ymbols") + map("gd", function() Snacks.picker.lsp_definitions() end, "[G]oto [D]efinition") + map("gr", function() Snacks.picker.lsp_references() end, "[G]oto [R]eferences") + map("gI", function() Snacks.picker.lsp_implementations() end, "[G]oto [I]mplementation") + map("D", function() Snacks.picker.lsp_type_definitions() end, "Type [D]efinition") + map("ds", function() Snacks.picker.lsp_symbols() end, "[D]ocument [S]ymbols") map( "ws", - require("telescope.builtin").lsp_dynamic_workspace_symbols, + function() Snacks.picker.lsp_workspace_symbols() end, "[W]orkspace [S]ymbols" ) map("rn", vim.lsp.buf.rename, "[R]e[n]ame") @@ -139,7 +139,7 @@ return { "clangd", "denols", "tailwindcss", - -- "ts_ls", + "ts_ls", }, handlers = { -- Default handler @@ -215,21 +215,6 @@ return { }, }) - -- tsgo setup (not in mason registry, use new vim.lsp.config API) - vim.lsp.config("tsgo", { - capabilities = capabilities, - init_options = { - disablePushDiagnostics = true, - }, - handlers = { - ["textDocument/publishDiagnostics"] = function() end, - ["textDocument/diagnostic"] = function() - return { items = {} } - end, - }, - }) - vim.lsp.enable("tsgo") - -- Manual handling for Deno vs Node. js vim.api.nvim_create_autocmd({ "BufReadPost", "BufNewFile" }, { pattern = { "*.js", "*.jsx", "*.ts", "*.tsx" }, @@ -239,7 +224,7 @@ return { -- Check if LSP already attached to this buffer local clients = vim.lsp.get_clients({ bufnr = bufnr }) for _, client in ipairs(clients) do - if client.name == "denols" or client.name == "tsgo" then + if client.name == "denols" then return end end diff --git a/lua/kickstart/plugins/telescope.lua b/lua/kickstart/plugins/telescope.lua index 970bd24..ea99a16 100644 --- a/lua/kickstart/plugins/telescope.lua +++ b/lua/kickstart/plugins/telescope.lua @@ -1,237 +1,38 @@ --- NOTE: Plugins can specify dependencies. --- --- The dependencies are proper plugin specifications as well - anything --- you do for a plugin at the top level, you can do for a dependency. --- --- Use the `dependencies` key to specify the dependencies of a particular plugin - return { - { -- Fuzzy Finder (files, lsp, etc) - "nvim-telescope/telescope.nvim", - event = "VimEnter", - -- Remove branch specification temporarily - -- branch = '0.1.x', - dependencies = { - "nvim-lua/plenary.nvim", - { -- If encountering errors, see telescope-fzf-native README for installation instructions - "nvim-telescope/telescope-fzf-native.nvim", - build = "make", - cond = function() - return vim.fn.executable("make") == 1 - end, + { -- Fuzzy Finder via snacks picker + "folke/snacks.nvim", + priority = 1000, + lazy = false, + opts = { + picker = { + enabled = true, }, - { "nvim-telescope/telescope-ui-select.nvim" }, - -- Useful for getting pretty icons, but requires a Nerd Font. - { "nvim-tree/nvim-web-devicons", enabled = vim.g.have_nerd_font }, }, - config = function() - -- Setup with your custom defaults - require("telescope").setup({ - defaults = { - file_ignore_patterns = { - "node_modules", - "%.png", - "%.jpg", - "%.jpeg", - "%.gif", - "%.bmp", - "%.tiff", - "%.webp", - "%jfif", - -- Compiled files - "%.class", - "%.jar", - "%.pyc", - "%.o", - "%.obj", - "%.so", - "%.dll", - "%.a", - "%.lib", - "%.bin", - "%.exe", - "%.out", - "%.hex", - "%.elf", - "%.ko", - "%.mod", - -- Videos - "%.mp3", - "%.mp4", - "%.mkv", - "%.avi", - "%.mov", - "%.wmv", - "%.flv", - "%.webm", - -- PDFs - "%.pdf", - "%.PDF", - "__pycache__", - }, - layout_config = { - width = 0.9, - }, - }, - extensions = { - ["ui-select"] = { - require("telescope.themes").get_dropdown(), - }, - }, - }) - - -- Enable Telescope extensions if they are installed - pcall(require("telescope").load_extension, "fzf") - pcall(require("telescope").load_extension, "ui-select") - - -- All your keymaps - local builtin = require("telescope.builtin") - - -- File operations - vim.keymap.set("n", "o", builtin.oldfiles, { desc = "old opened files" }) - vim.keymap.set("n", "b", builtin.buffers, { desc = "search in buffers" }) - vim.keymap.set("n", "o", builtin.oldfiles, { desc = "old opened files" }) - vim.keymap.set("n", "fo", builtin.oldfiles, { desc = "search in buffers(the opened files rn)" }) - vim.keymap.set("n", "ff", builtin.find_files, { desc = "find files" }) - vim.keymap.set("n", "", builtin.find_files, { desc = "find files" }) - vim.keymap.set("n", "fc", builtin.colorscheme, { desc = "colorscheme" }) - - vim.api.nvim_set_keymap( - "n", - "fa", - [[lua require('telescope.builtin').find_files({ hidden = true })]], - { noremap = true, silent = true, desc = "find in all files" } - ) - - -- Navigation in code - vim.keymap.set("n", "sj", builtin.jumplist, { desc = "find in jumplist" }) - vim.keymap.set("n", "sq", builtin.quickfix, { desc = "find in quickfix" }) - vim.keymap.set("n", "ss", builtin.treesitter, { desc = "search symbol in the buffer" }) - vim.keymap.set("n", "sm", builtin.marks, { desc = "search marks" }) - vim.keymap.set("n", "sg", builtin.live_grep, { desc = "search by grep" }) - vim.keymap.set("n", "sw", builtin.grep_string, { desc = "search current Word" }) - - -- Extra telescope features - vim.keymap.set("n", "sh", builtin.help_tags, { desc = "Search Help" }) - vim.keymap.set("n", "sk", builtin.keymaps, { desc = "Search Keymaps" }) - vim.keymap.set("n", "st", builtin.builtin, { desc = "Search Telescope builtin" }) - vim.keymap.set("n", "sr", builtin.resume, { desc = "Search Resume" }) - - -- Git - vim.keymap.set("n", "gf", builtin.git_files, { desc = "Search git files" }) - - -- Custom themed pickers - vim.keymap.set("n", "sd", function() - builtin.diagnostics(require("telescope.themes").get_dropdown({ - winblend = 0, - previewer = true, - layout_config = { - width = 200, - height = 15, - prompt_position = "top", - mirror = true, - anchor = "N", - }, - })) - end, { desc = "diagnostics" }) - - vim.keymap.set("n", "/", function() - builtin.current_buffer_fuzzy_find(require("telescope.themes").get_dropdown({ - winblend = 1, - previewer = false, - layout_config = { - height = 20, - }, - })) - end, { desc = "Fuzzily search in current buffer" }) - - vim.keymap.set("n", "g", function() - builtin.current_buffer_fuzzy_find(require("telescope.themes").get_dropdown({ - winblend = 1, - previewer = false, - layout_config = { - height = 20, - }, - })) - end, { desc = "Fuzzily search in current buffer" }) - - vim.keymap.set("n", "wg", function() - builtin.live_grep(require("telescope.themes").get_dropdown({ - grep_open_files = true, - prompt_title = "Live Grep in Open Files", - winblend = 1, - previewer = false, - layout_config = { - height = 20, - }, - })) - end, { desc = "grep in file" }) - - vim.keymap.set("n", "c", function() - builtin.commands(require("telescope.themes").get_dropdown({ - prompt_title = "search commands", - winblend = 1, - previewer = false, - layout_config = { - height = 0, - width = 100, - }, - })) - end, { desc = "search commands" }) - - vim.keymap.set("n", "sc", function() - builtin.commands(require("telescope.themes").get_dropdown({ - grep_open_files = true, - prompt_title = "search commands", - winblend = 1, - previewer = false, - layout_config = { - height = 20, - width = 158, - }, - })) - end, { desc = "commands" }) - - vim.keymap.set("n", "gw", function() - builtin.grep_string(require("telescope.themes").get_cursor({ - winblend = 1, - previewer = true, - layout_config = { - height = 20, - width = 158, - }, - })) - end, { desc = "current word" }) - - vim.keymap.set("n", "sg", function() - builtin.live_grep(require("telescope.themes").get_dropdown({ - winblend = 0, - previewer = true, - layout_config = { - width = 120, - height = 15, - prompt_position = "top", - mirror = true, - anchor = "N", - }, - })) - end, { desc = "grep in directory" }) - - vim.keymap.set("n", "s", function() - builtin.spell_suggest(require("telescope.themes").get_cursor({ - winblend = 0, - previewer = true, - layout_config = { - width = 30, - height = 15, - }, - })) - end, { desc = "spell suggest" }) - - vim.keymap.set("n", "sn", function() - builtin.find_files({ cwd = vim.fn.stdpath("config") }) - end, { desc = "Neovim files" }) - end, + keys = { + { "", function() Snacks.picker.files() end, desc = "Find files" }, + { "fa", function() Snacks.picker.files({ hidden = true }) end, desc = "Find all files" }, + { "fo", function() Snacks.picker.recent() end, desc = "Recent files" }, + { "fb", function() Snacks.picker.buffers() end, desc = "Buffers" }, + { "fg", function() Snacks.picker.grep() end, desc = "Grep" }, + { "fw", function() Snacks.picker.grep_word() end, desc = "Grep word", mode = { "n", "x" } }, + { "sg", function() Snacks.picker.grep() end, desc = "Search by grep" }, + { "sw", function() Snacks.picker.grep_word() end, desc = "Search current word" }, + { "sj", function() Snacks.picker.jumps() end, desc = "Jumplist" }, + { "sq", function() Snacks.picker.qflist() end, desc = "Quickfix" }, + { "ss", function() Snacks.picker.symbols() end, desc = "Symbols" }, + { "sm", function() Snacks.picker.marks() end, desc = "Marks" }, + { "sh", function() Snacks.picker.help() end, desc = "Help" }, + { "sk", function() Snacks.picker.keymaps() end, desc = "Keymaps" }, + { "sd", function() Snacks.picker.diagnostics() end, desc = "Diagnostics" }, + { "sr", function() Snacks.picker.resume() end, desc = "Resume" }, + { "sn", function() Snacks.picker.files({ cwd = vim.fn.stdpath("config") }) end, desc = "Neovim files" }, + { "/", function() Snacks.picker.lines() end, desc = "Search in buffer" }, + { "g", function() Snacks.picker.lines() end, desc = "Search in buffer" }, + { "wg", function() Snacks.picker.grep({ need_search = false, filter = { cwd = vim.fn.getcwd() } }) end, desc = "Grep open files" }, + { "sc", function() Snacks.picker.command_history() end, desc = "Command history" }, + { "c", function() Snacks.picker.commands() end, desc = "Commands" }, + { "gf", function() Snacks.picker.git_files() end, desc = "Git files" }, + { "th", function() Snacks.picker.colorschemes() end, desc = "Themes" }, + }, }, -} --- vim: ts=4 sts=4 sw=4 et +} \ No newline at end of file diff --git a/lua/kickstart/plugins/treesitter.lua b/lua/kickstart/plugins/treesitter.lua index 972703b..7b62bf8 100644 --- a/lua/kickstart/plugins/treesitter.lua +++ b/lua/kickstart/plugins/treesitter.lua @@ -6,8 +6,6 @@ return { "nvim-treesitter/nvim-treesitter-textobjects", }, build = ":TSUpdate", - main = "nvim-treesitter.configs", -- Sets main module to use for opts - -- [[ Configure Treesitter ]] See `:help nvim-treesitter` opts = { ensure_installed = { "bash", @@ -23,13 +21,9 @@ return { "vim", "vimdoc", }, - -- Autoinstall languages that are not installed auto_install = true, highlight = { enable = true, - -- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules. - -- If you are experiencing weird indenting issues, add the language to - -- the list of additional_vim_regex_highlighting and disabled languages for indent. additional_vim_regex_highlighting = { "ruby" }, }, indent = { enable = true, disable = { "ruby" } }, @@ -45,9 +39,8 @@ return { textobjects = { select = { enable = true, - lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim + lookahead = true, keymaps = { - -- You can use the capture groups defined in textobjects.scm ["aa"] = "@parameter.outer", ["ia"] = "@parameter.inner", ["af"] = "@function.outer", @@ -58,7 +51,7 @@ return { }, move = { enable = false, - set_jumps = false, -- whether to set jumps in the jumplist + set_jumps = false, goto_next_start = { ["]m"] = "@function.outer", ["]o"] = "@class.outer", @@ -78,12 +71,8 @@ return { }, }, }, - -- There are additional nvim-treesitter modules that you can use to interact - -- with nvim-treesitter. You should go explore a few and see what interests you: - -- - -- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod` - -- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context - -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects + config = function(_, opts) + require("nvim-treesitter").setup(opts) + end, }, -} --- vim: ts=4 sts=4 sw=4 et +} \ No newline at end of file diff --git a/lua/options.lua b/lua/options.lua index 3dd6f1e..15bc020 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -88,6 +88,8 @@ vim.opt.linebreak = true vim.opt.conceallevel = 1 +vim.opt.backspace = "start,indent,eol" +vim.opt.autoread = true vim.opt.autoindent = true vim.opt.smartindent = true -- vim: ts=4 sts=4 sw=4 et