diff options
24 files changed, 791 insertions, 520 deletions
diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index a8d56fe..cc47f97 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -1,65 +1,69 @@ { - "LazyVim": { "branch": "main", "commit": "f57944f926176a9782c5e3f2804bec0132195d77" }, - "LuaSnip": { "branch": "master", "commit": "2737edc9e674e537dc0a97e3405658d57d2d31ed" }, - "SchemaStore.nvim": { "branch": "main", "commit": "5f0639d68cbea3ab8a9a24a51a5f984d86ea8438" }, + "LazyVim": { "branch": "main", "commit": "adcbfc72fd8d0808d78bdfe0940d98c6432c4ef0" }, + "LuaSnip": { "branch": "master", "commit": "0f7bbce41ea152a94d12aea286f2ce98e63c0f58" }, + "SchemaStore.nvim": { "branch": "main", "commit": "291b15c6a03d8f859da8d83f46ed41ae6bb0ea8d" }, "catppuccin": { "branch": "main", "commit": "637d99e638bc6f1efedac582f6ccab08badac0c6" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-emoji": { "branch": "main", "commit": "e8398e2adf512a03bb4e1728ca017ffeac670a9f" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "competitest.nvim": { "branch": "master", "commit": "20ce9ba1b2f7502291a23ad06096e6650917f0c2" }, + "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, + "competitest.nvim": { "branch": "master", "commit": "e397635d212605a3fa0e2d06f3e6209085189e3f" }, "compiler-explorer.nvim": { "branch": "master", "commit": "ee8e7a2808bdad67cd2acb61b5c9ffa7735c7ec9" }, - "conform.nvim": { "branch": "master", "commit": "e3263eabbfc1bdbc5b6a60ba8431b64e8dca0a79" }, - "dashboard-nvim": { "branch": "master", "commit": "ae309606940d26d8c9df8b048a6e136b6bbec478" }, + "conform.nvim": { "branch": "master", "commit": "62d5accad8b29d6ba9b58d3dff90c43a55621c60" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, - "dressing.nvim": { "branch": "master", "commit": "6ef1ca479d37d4ff66f13eed44d08912caff483a" }, + "dressing.nvim": { "branch": "master", "commit": "fc78a3ca96f4db9f8893bb7e2fd9823e0780451b" }, + "flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" }, "friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, - "fzf-lua": { "branch": "main", "commit": "ce1e24f2a48089b65deefcb0a71a9856839002b5" }, - "gitsigns.nvim": { "branch": "main", "commit": "4daf7022f1481edf1e8fb9947df13bb07c18e89a" }, - "grug-far.nvim": { "branch": "main", "commit": "26415d3cc2fef99ccefa019cbc3969f404a83e70" }, + "fzf-lua": { "branch": "main", "commit": "9427dc65afaa7972fb20fc52280cd1449f691928" }, + "gitsigns.nvim": { "branch": "main", "commit": "ac5aba6dce8c06ea22bea2c9016f51a2dbf90dc7" }, + "grug-far.nvim": { "branch": "main", "commit": "9a2f78219390b47d67795ab09390d7f092e23976" }, "gruvbox.nvim": { "branch": "main", "commit": "49d9c0b150ba70efcd831ec7b3cb8ee740067045" }, "harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" }, "hex.nvim": { "branch": "master", "commit": "fcff75fcf43b5a6c5b471eed65b3a06c412d6020" }, - "indent-blankline.nvim": { "branch": "master", "commit": "e51b651ca26cba250ef3a1150c8d35045eee2a84" }, - "lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" }, + "indent-blankline.nvim": { "branch": "master", "commit": "7871a88056f7144defca9c931e311a3134c5d509" }, + "lazy.nvim": { "branch": "main", "commit": "7967abe55752aa90532e6bb4bd4663fe27a264cb" }, "lazydev.nvim": { "branch": "main", "commit": "d5800897d9180cea800023f2429bce0a94ed6064" }, "litee-calltree.nvim": { "branch": "main", "commit": "b50c809d136ad479caf761a7f030da98c56c7976" }, "litee.nvim": { "branch": "main", "commit": "4efaf373322d9e71eaff31164abb393417cc6f6a" }, + "lspkind.nvim": { "branch": "master", "commit": "a700f1436d4a938b1a1a93c9962dc796afbaef4d" }, + "lualine-so-fancy.nvim": { "branch": "main", "commit": "45197358e5274d301d98638bf079f3437d6eacf8" }, "lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" }, - "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "4d0e5b49363cac187326998b96aa6a2884e0e89b" }, + "luvit-meta": { "branch": "main", "commit": "57d464c4acb5c2e66bd4145060f5dc9e96a7bbb7" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "43894adcf10bb1190c2184bd7c1750e8ea2b3dce" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, - "material.nvim": { "branch": "main", "commit": "0bcabb582c31b750428af9dbb0d146c1c2d75d4c" }, + "material.nvim": { "branch": "main", "commit": "31429eef4b7233ebdae3ddb57b7165ee4f1bd653" }, "mini.icons": { "branch": "main", "commit": "54686be7d58807906cb2c8c2216e0bf9c044f19a" }, "mini.move": { "branch": "main", "commit": "4caa1c212f5ca3d1633d21cfb184808090ed74b1" }, + "mini.nvim": { "branch": "main", "commit": "ccfc6300a5c17387f2899f979ecc04f942bee2a0" }, "mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" }, "mini.surround": { "branch": "main", "commit": "48a9795c9d352c771e1ab5dedab6063c0a2df037" }, "neo-tree.nvim": { "branch": "main", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" }, - "neogit": { "branch": "master", "commit": "8e1e301c2e33c60375850bcf22ba1fb77b684b97" }, + "neogit": { "branch": "master", "commit": "efd2a182024e422a4c4061683b9264c782eb684a" }, "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, - "nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" }, - "nvim-cmp": { "branch": "main", "commit": "f17d9b4394027ff4442b298398dfcaab97e40c4f" }, - "nvim-lint": { "branch": "master", "commit": "36da8dd0ddc4f88e0beae234c20e75397326f143" }, - "nvim-lspconfig": { "branch": "master", "commit": "4cb925e96288a71409a86c84fd97f4434a95453e" }, + "nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" }, + "nvim-cmp": { "branch": "main", "commit": "be7bd4c5f860c79da97af3a26d489af50babfd4b" }, + "nvim-lint": { "branch": "master", "commit": "8e9562de7261e5b862c631958df616e1a65552cd" }, + "nvim-lspconfig": { "branch": "master", "commit": "c646154d6e4db9b2979eeb517d0b817ad00c9c47" }, "nvim-snippets": { "branch": "main", "commit": "56b4052f71220144689caaa2e5b66222ba5661eb" }, - "nvim-treesitter": { "branch": "master", "commit": "8e40904e49bbad5812798eb54be8c00d77cdd301" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "3e450cd85243da99dc23ebbf14f9c70e9a0c26a4" }, + "nvim-treesitter": { "branch": "master", "commit": "fcd2a5fea91deac818f26a6412a624798af45033" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" }, "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" }, - "nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" }, - "oil.nvim": { "branch": "master", "commit": "621f8ba4fa821724e9b646732a26fb2e795fe008" }, + "nvim-web-devicons": { "branch": "master", "commit": "f09be61d05bebcba85bb47be1931322d51b95644" }, + "oil.nvim": { "branch": "master", "commit": "5fa528f5528bf04a2d255108e59ed9cf53e85ae6" }, "onedark": { "branch": "master", "commit": "67a74c275d1116d575ab25485d1bfa6b2a9c38a6" }, "persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, + "render-markdown.nvim": { "branch": "main", "commit": "d6a82d70765aa238b7ea48d257a1d57a92501423" }, "rose-pine": { "branch": "main", "commit": "07a887a7bef4aacea8c7caebaf8cbf808cdc7a8e" }, - "snacks.nvim": { "branch": "main", "commit": "166aed6c5d9b94a1989db1625f4893b2110a8be1" }, + "snacks.nvim": { "branch": "main", "commit": "9462273bf7c0e627da0f412c02daee907947078d" }, "symbols-outline.nvim": { "branch": "master", "commit": "564ee65dfc9024bdde73a6621820866987cbb256" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "telescope.nvim": { "branch": "master", "commit": "85922dde3767e01d42a08e750a773effbffaea3e" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, - "tokyonight.nvim": { "branch": "main", "commit": "ce91ba480070c95f40753e4663e32b4632ac6db3" }, + "tokyonight.nvim": { "branch": "main", "commit": "c2725eb6d086c8c9624456d734bd365194660017" }, "trouble.nvim": { "branch": "main", "commit": "3dc00c0447c016cd43e03054c3d49436a1f2076d" }, "ts-comments.nvim": { "branch": "main", "commit": "2002692ad1d3f6518d016550c20c2a890f0cbf0e" }, "typescript.nvim": { "branch": "main", "commit": "4de85ef699d7e6010528dcfbddc2ed4c2c421467" }, "vim-tmux-navigator": { "branch": "master", "commit": "424b5caa154bff34dc258ee53cec5a8e36cf7ea8" }, - "vimtex": { "branch": "master", "commit": "251615c0624b820e2245c4ad20a70f0002e596a0" } + "vimtex": { "branch": "master", "commit": "879f8906a677e2ee77f62f3b66ce7b86aafb0cec" } } diff --git a/nvim/.config/nvim/lazyvim.json b/nvim/.config/nvim/lazyvim.json index c8c0d4c..96ee7f7 100644 --- a/nvim/.config/nvim/lazyvim.json +++ b/nvim/.config/nvim/lazyvim.json @@ -1,9 +1,9 @@ { "extras": [ - + "lazyvim.plugins.extras.lang.tex" ], "news": { - "NEWS.md": "7107" + "NEWS.md": "7429" }, - "version": 6 + "version": 7 }
\ No newline at end of file diff --git a/nvim/.config/nvim/lua/config/keymaps.lua b/nvim/.config/nvim/lua/config/keymaps.lua index b2296ab..0f2944d 100644 --- a/nvim/.config/nvim/lua/config/keymaps.lua +++ b/nvim/.config/nvim/lua/config/keymaps.lua @@ -44,7 +44,6 @@ map("n", "<C-o>", "<C-o>zz", { desc = "better next jump", remap = true }) map("n", "<C-i>", "<C-i>zz", { desc = "better prev jump", remap = true }) -- plugin development -map("n", "<leader>t", ":lua require('dbgln').setup()<CR>", { desc = "dbgln" }) map("n", "<leader>d", "<cmd>DbgLn<CR>", { desc = "Print Debgging Line" }) -- fix annoying typos when saving or quitting @@ -93,25 +92,20 @@ map("n", "<leader>w", function() require("harpoon.ui").nav_file(2) end, { desc = "navigate to second harpoon mark", remap = true }) -map("n", "<leader>e", function() - require("harpoon.ui").nav_file(3) -end, { desc = "navigate to third harpoon mark", remap = true }) - map("n", "<leader>h", "<Cmd>noh<CR>", { desc = "remove highlights", remap = true }) map("n", "<leader>j", "/<++><CR>ciw<CR><C-o>O", { desc = "jump to <++>", remap = true }) map("n", "<leader><space>", "<Cmd>bprevious<CR>", { desc = "Jump to recently used buffer" }) map("n", "gl", "<cmd>lua vim.diagnostic.open_float()<CR>", { desc = "Line diagnostics", remap = true }) -- oil.nvim keymaps -map("n", "<leader>o", "<cmd>Oil<CR>", { desc = "Open Oil.nvim", remap = true }) -map("n", "<leader>e", function() - if vim.o.filetype == "oil" then - vim.cmd("bd") - else - vim.cmd("vsplit | vertical resize -60 | wincmd r") - require("oil").open() - end -end, { desc = "Open Oil.nvim ins split mode", remap = true }) +-- map("n", "<leader>e", function() +-- if vim.o.filetype == "oil" then +-- vim.cmd("bd") +-- else +-- vim.cmd("vsplit | vertical resize -60 | wincmd r") +-- require("oil").open() +-- end +-- end, { desc = "Open Oil.nvim ins split mode", remap = true }) map("n", "-", "<cmd>Oil<CR>", { desc = "Open Oil.nvim", remap = true }) -- competitest keymaps diff --git a/nvim/.config/nvim/lua/plugins/cmp.lua b/nvim/.config/nvim/lua/plugins/cmp.lua new file mode 100644 index 0000000..a6a446c --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/cmp.lua @@ -0,0 +1,135 @@ +return { + -- Autocompletion + "hrsh7th/nvim-cmp", + event = "InsertEnter", + dependencies = { + -- Snippet Engine & its associated nvim-cmp source + "L3MON4D3/LuaSnip", + "saadparwaiz1/cmp_luasnip", + + -- Adds LSP completion capabilities + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-path", + + -- Adds a number of user-friendly snippets + "rafamadriz/friendly-snippets", + + -- Adds vscode-like pictograms + "onsails/lspkind.nvim", + }, + config = function() + local cmp = require("cmp") + local luasnip = require("luasnip") + -- local lspkind = require("lspkind") + + local kind_icons = { + Text = "", + Method = "", + Function = "", + Constructor = "", + Field = "", + Variable = "", + Class = "", + Interface = "", + Module = "", + Property = "", + Unit = "", + Value = "", + Enum = "", + Keyword = "", + Snippet = "", + Color = "", + File = "", + Reference = "", + Folder = "", + EnumMember = "", + Constant = "", + Struct = "", + Event = "", + Operator = "", + TypeParameter = "", + } + require("luasnip.loaders.from_vscode").lazy_load() + luasnip.config.setup({}) + + cmp.setup({ + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + completion = { + completeopt = "menu,menuone,noinsert", + }, + mapping = cmp.mapping.preset.insert({ + ["<C-n>"] = cmp.mapping.select_next_item(), + ["<C-p>"] = cmp.mapping.select_prev_item(), + ["<C-b>"] = cmp.mapping.scroll_docs(-4), + ["<C-f>"] = cmp.mapping.scroll_docs(4), + ["<C-Space>"] = cmp.mapping.complete({}), + ["<C-y>"] = cmp.mapping.confirm({ select = true }), + ["<CR>"] = cmp.mapping.confirm({ + behavior = cmp.ConfirmBehavior.Replace, + select = true, + }), + ["<Tab>"] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expand_or_locally_jumpable() then + luasnip.expand_or_jump() + else + fallback() + end + end, { "i", "s" }), + ["<S-Tab>"] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.locally_jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { "i", "s" }), + }), + window = { + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), + }, + sources = { + { name = "copilot" }, + { name = "nvim_lsp" }, + { name = "nvim_lua" }, + { name = "luasnip" }, + { name = "buffer" }, + { name = "path" }, + { name = "calc" }, + { name = "emoji" }, + { name = "treesitter" }, + { name = "crates" }, + { name = "tmux" }, + }, + formatting = { + format = function(entry, vim_item) + local lspkind_ok, lspkind = pcall(require, "lspkind") + if not lspkind_ok then + -- From kind_icons array + vim_item.kind = string.format("%s %s", kind_icons[vim_item.kind], vim_item.kind) + -- Source + vim_item.menu = ({ + copilot = "[Copilot]", + nvim_lsp = "[LSP]", + nvim_lua = "[Lua]", + luasnip = "[LuaSnip]", + buffer = "[Buffer]", + latex_symbols = "[LaTeX]", + })[entry.source.name] + return vim_item + else + -- From lspkind + return lspkind.cmp_format()(entry, vim_item) + end + end, + }, + }) + end, +} diff --git a/nvim/.config/nvim/lua/plugins/colorschemes.lua b/nvim/.config/nvim/lua/plugins/colorschemes.lua new file mode 100644 index 0000000..8c3126b --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/colorschemes.lua @@ -0,0 +1,45 @@ +return { + { + "ellisonleao/gruvbox.nvim", + config = true, + opts = { + transparent_mode = true, + }, + }, + + { + "navarasu/onedark.nvim", + name = "onedark", + opts = { + style = "deep", + transparent = true, + }, + }, + + { + "rose-pine/neovim", + name = "rose-pine", + opts = { + disable_background = true, + }, + }, + + { + "folke/tokyonight.nvim", + priority = 1000, + opts = { + style = "night", + transparent = true, + }, + }, + { + "marko-cerovac/material.nvim", + priority = 1000, + opts = { --Lua: + lualine_style = "default", + disable = { + background = true, + }, + }, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/catppuccin.lua b/nvim/.config/nvim/lua/plugins/custom-catppuccin.lua index 2d61905..1795273 100644 --- a/nvim/.config/nvim/lua/plugins/catppuccin.lua +++ b/nvim/.config/nvim/lua/plugins/custom-catppuccin.lua @@ -62,7 +62,7 @@ return { surface2 = "#4d4d4d", surface1 = "#404040", surface0 = "#292929", - base = "#1d2021", + base = "#1b1c1f", mantle = "#191b1c", crust = "#141617", }, diff --git a/nvim/.config/nvim/lua/plugins/disabled.lua b/nvim/.config/nvim/lua/plugins/disabled.lua index 3bf1b51..effd24e 100644 --- a/nvim/.config/nvim/lua/plugins/disabled.lua +++ b/nvim/.config/nvim/lua/plugins/disabled.lua @@ -15,14 +15,6 @@ return { "akinsho/bufferline.nvim", enabled = false, }, - -- { - -- "nvim-neo-tree/neo-tree.nvim", - -- enabled = false, - -- }, - { - "folke/flash.nvim", - enabled = false, - }, { "echasnovski/mini.ai", enabled = false, diff --git a/nvim/.config/nvim/lua/plugins/flash.lua b/nvim/.config/nvim/lua/plugins/flash.lua new file mode 100644 index 0000000..1aa67e3 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/flash.lua @@ -0,0 +1,16 @@ +return { + { + "folke/flash.nvim", + event = "VeryLazy", + ---@type Flash.Config + opts = {}, + -- stylua: ignore + 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" }, + { "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" }, + { "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" }, + { "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" }, + }, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/git.lua b/nvim/.config/nvim/lua/plugins/git.lua new file mode 100644 index 0000000..50a15a0 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/git.lua @@ -0,0 +1,20 @@ +return { + { + "NeogitOrg/neogit", + dependencies = { + "nvim-lua/plenary.nvim", -- required + "sindrets/diffview.nvim", -- optional - Diff integration + + -- Only one of these is needed, not both. + "nvim-telescope/telescope.nvim", -- optional + "ibhagwan/fzf-lua", -- optional + }, + config = true, + keys = { + { + "<leader>g;", + "<Cmd>Neogit<CR>", + }, + }, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/harpoon.lua b/nvim/.config/nvim/lua/plugins/harpoon.lua new file mode 100644 index 0000000..d6ab5d6 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/harpoon.lua @@ -0,0 +1,5 @@ +return { + { + "ThePrimeagen/harpoon", + }, +} diff --git a/nvim/.config/nvim/lua/plugins/lsp.lua b/nvim/.config/nvim/lua/plugins/lsp.lua new file mode 100644 index 0000000..e71ceb0 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/lsp.lua @@ -0,0 +1,58 @@ +return { + -- add tsserver and setup with typescript.nvim instead of lspconfig + { + "neovim/nvim-lspconfig", + init = function() + local keys = require("lazyvim.plugins.lsp.keymaps").get() + -- disable default lazy keymaps for lsp + keys[#keys + 1] = { "<leader>ca", false } + keys[#keys + 1] = { "<leader>c<S-A>", false } + keys[#keys + 1] = { "<leader>cc", false } + keys[#keys + 1] = { "<leader>c<S-C>", false } + keys[#keys + 1] = { "<leader>cd", false } + keys[#keys + 1] = { "<leader>cf", false } + keys[#keys + 1] = { "<leader>c<S-F>", false } + keys[#keys + 1] = { "<leader>cl", false } + keys[#keys + 1] = { "<leader>cm", false } + keys[#keys + 1] = { "<leader>co", false } + keys[#keys + 1] = { "<leader>cr", false } + keys[#keys + 1] = { "<leader>c<S-R>", false } + keys[#keys + 1] = { "<leader>cs", false } + + keys[#keys + 1] = { "<leader>lr", "<cmd>lua vim.lsp.buf.rename()<CR>", desc = "Rename variable" } + keys[#keys + 1] = { "<leader>la", "<cmd>lua vim.lsp.buf.code_action()<CR>", desc = "code actions" } + end, + + dependencies = { + "jose-elias-alvarez/typescript.nvim", + init = function() + require("lazyvim.util").lsp.on_attach(function(_, buffer) + -- stylua: ignore + -- vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" }) + -- vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer }) + end) + end, + }, + ---@class PluginLspOpts + opts = { + inlay_hints = { enabled = false }, + ---@type lspconfig.options + servers = { + -- tsserver will be automatically installed with mason and loaded with lspconfig + tsserver = {}, + }, + -- you can do any additional lsp server setup here + -- return true if you don't want this server to be setup with lspconfig + ---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?> + setup = { + -- example to setup with typescript.nvim + tsserver = function(_, opts) + require("typescript").setup({ server = opts }) + return true + end, + -- Specify * to use this function as a fallback for any server + -- ["*"] = function(server, opts) end, + }, + }, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/lualine.lua b/nvim/.config/nvim/lua/plugins/lualine.lua new file mode 100644 index 0000000..638e9d3 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/lualine.lua @@ -0,0 +1,66 @@ +return { + "nvim-lualine/lualine.nvim", + requiers = "meuter/lualine-so-fancy.nvim", + -- enabled = false, + lazy = false, + event = { "BufReadPost", "BufNewFile", "VeryLazy" }, + config = function() + -- local icons = require("config.icons") + require("lualine").setup({ + options = { + theme = "auto", + -- theme = "github_dark", + -- theme = "catppuccin", + globalstatus = true, + icons_enabled = true, + -- component_separators = { left = "│", right = "│" }, + component_separators = { left = "|", right = "|" }, + section_separators = { left = "", right = "" }, + disabled_filetypes = { + statusline = { + "help", + "neo-tree", + "Trouble", + }, + winbar = {}, + }, + }, + sections = { + lualine_a = {}, + lualine_b = { + "fancy_branch", + }, + lualine_c = { + { + "filename", + path = 1, -- 2 for full path + symbols = { + modified = " ", + -- readonly = " ", + -- unnamed = " ", + }, + }, + { "fancy_diagnostics", sources = { "nvim_lsp" }, symbols = { error = " ", warn = " ", info = " " } }, + { "fancy_searchcount" }, + }, + lualine_x = { + "fancy_lsp_servers", + "fancy_diff", + "progress", + }, + lualine_y = {}, + lualine_z = {}, + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { "filename" }, + -- lualine_x = { "location" }, + lualine_y = {}, + lualine_z = {}, + }, + tabline = {}, + extensions = { "neo-tree", "lazy" }, + }) + end, +} diff --git a/nvim/.config/nvim/lua/plugins/luasnip.lua b/nvim/.config/nvim/lua/plugins/luasnip.lua new file mode 100644 index 0000000..55ec04e --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/luasnip.lua @@ -0,0 +1,10 @@ +return { + -- Use <tab> for completion and snippets (supertab) + -- first: disable default <tab> and <s-tab> behavior in LuaSnip + { + "L3MON4D3/LuaSnip", + keys = function() + return {} + end, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/main.lua b/nvim/.config/nvim/lua/plugins/main.lua index 701dbe8..1204e8f 100644 --- a/nvim/.config/nvim/lua/plugins/main.lua +++ b/nvim/.config/nvim/lua/plugins/main.lua @@ -9,115 +9,6 @@ -- * disable/enabled LazyVim plugins -- * override the configuration of LazyVim plugins return { - -- add gruvbox - { "ellisonleao/gruvbox.nvim", - config = true, - opts = { - transparent_mode = true, - } - }, - -- Using Packer - { 'navarasu/onedark.nvim' , name = 'onedark', - opts = { - style = 'deep', transparent= true - } - }, - - { 'rose-pine/neovim', name = 'rose-pine', - opts = { - disable_background = true - } - }, - - { - lazy = false, - "windwp/nvim-ts-autotag", - per_filetype = { - ["astro"] = { - enable_close = true, - enable_rename = true - } - } - }, - - -- tmux navigator -{ - "christoomey/vim-tmux-navigator", - lazy = true, - cmd = { - "TmuxNavigateLeft", - "TmuxNavigateDown", - "TmuxNavigateUp", - "TmuxNavigateRight", - "TmuxNavigatePrevious", - }, - keys = { - { "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" }, - { "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" }, - { "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" }, - { "<c-;>", "<cmd><C-U>TmuxNavigateRight<cr>" }, - { "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" }, - }, - }, - - - { - "NeogitOrg/neogit", - lazy = false, - dependencies = { - "nvim-lua/plenary.nvim", -- required - "sindrets/diffview.nvim", -- optional - Diff integration - - -- Only one of these is needed, not both. - "nvim-telescope/telescope.nvim", -- optional - "ibhagwan/fzf-lua", -- optional - }, - config = true, - keys = { - { - "<leader>g;", - "<Cmd>Neogit<CR>" - } - } - - }, - - { - 'stevearc/oil.nvim', - opts = {}, - lazy = false, - -- Optional dependencies - dependencies = { "nvim-tree/nvim-web-devicons" }, - }, - - { - "lervag/vimtex", - lazy = false, - init = function() - -- VimTeX configuration goes here - vim.g.vimtex_view_method = 'zathura' - end - }, - - { - 'RaafatTurki/hex.nvim' , - config = true, - lazy = false, - }, - - -- If you are using Packer - { "folke/tokyonight.nvim", priority = 1000, - opts = { - style = "night", - transparent = true, - } - }, - - - { - 'krady21/compiler-explorer.nvim', - lazy = false, - }, -- Configure LazyVim to load gruvbox { "LazyVim/LazyVim", @@ -130,116 +21,6 @@ return { }, }, - - { - "ThePrimeagen/harpoon", - }, - - - -- change trouble config - { - "folke/trouble.nvim", - -- opts will be merged with the parent spec - opts = { use_diagnostic_signs = true }, - keys = { - { - "<leader>xx", function() require("trouble").toggle() end - }, - { - "<leader>xw", function() require("trouble").toggle("workspace_diagnostics") end - }, - { - "<leader>xd", function() require("trouble").toggle("document_diagnostics") end - }, - { - "<leader>xq", function() require("trouble").toggle("quickfix") end - }, - { - "<leader>xl", function() require("trouble").toggle("loclist") end - }, - { - "gR", function() require("trouble").toggle("lsp_references") end - }, - }, - }, - - -- add symbols-outline - { - "simrat39/symbols-outline.nvim", - cmd = "SymbolsOutline", - config = true, - }, - - -- override nvim-cmp and add cmp-emoji - { - "hrsh7th/nvim-cmp", - dependencies = { "hrsh7th/cmp-emoji" }, - ---@param opts cmp.ConfigSchema - opts = function(_, opts) - local cmp = require("cmp") - opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "emoji" } })) - end, - }, - - -- change some telescope options and a keymap to browse plugin files - { - "nvim-telescope/telescope.nvim", - keys = { - -- add a keymap to browse plugin files - -- stylua: ignore - { - "<leader>f<S-R>", - false - }, - { - "<leader>fe", - false - }, - { - "<leader>f<S-E>", - false - }, - { - "<leader>fp", - function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end, - desc = "Find Plugin File", - }, - { - "<leader>fw", - function() require("telescope.builtin").live_grep() end, - desc = "Find words in project", - }, - { - "<leader>f/", - function |
