From e25ee3899cd3fd30febb6184fce1f4767d1c3461 Mon Sep 17 00:00:00 2001 From: omagdy Date: Fri, 22 Nov 2024 18:22:11 +0200 Subject: Organized the neovim config into a more sturctured file per plugin --- nvim/.config/nvim/lazy-lock.json | 60 +-- nvim/.config/nvim/lazyvim.json | 6 +- nvim/.config/nvim/lua/config/keymaps.lua | 22 +- nvim/.config/nvim/lua/plugins/catppuccin.lua | 359 ---------------- nvim/.config/nvim/lua/plugins/cmp.lua | 135 ++++++ nvim/.config/nvim/lua/plugins/colorschemes.lua | 45 ++ .../.config/nvim/lua/plugins/custom-catppuccin.lua | 359 ++++++++++++++++ nvim/.config/nvim/lua/plugins/disabled.lua | 8 - nvim/.config/nvim/lua/plugins/flash.lua | 16 + nvim/.config/nvim/lua/plugins/git.lua | 20 + nvim/.config/nvim/lua/plugins/harpoon.lua | 5 + nvim/.config/nvim/lua/plugins/lsp.lua | 58 +++ nvim/.config/nvim/lua/plugins/lualine.lua | 66 +++ nvim/.config/nvim/lua/plugins/luasnip.lua | 10 + nvim/.config/nvim/lua/plugins/main.lua | 468 +-------------------- nvim/.config/nvim/lua/plugins/markdown.lua | 11 + nvim/.config/nvim/lua/plugins/mason.lua | 17 + nvim/.config/nvim/lua/plugins/mini.lua | 41 ++ nvim/.config/nvim/lua/plugins/misc.lua | 69 +++ nvim/.config/nvim/lua/plugins/neo-tree.lua | 98 +++++ nvim/.config/nvim/lua/plugins/oil.lua | 9 + .../nvim/lua/plugins/reverse-engineering.lua | 12 + nvim/.config/nvim/lua/plugins/telescope.lua | 73 ++++ nvim/.config/nvim/lua/plugins/treesitter.lua | 30 ++ nvim/.config/nvim/lua/plugins/trouble.lua | 30 ++ 25 files changed, 1149 insertions(+), 878 deletions(-) delete mode 100644 nvim/.config/nvim/lua/plugins/catppuccin.lua create mode 100644 nvim/.config/nvim/lua/plugins/cmp.lua create mode 100644 nvim/.config/nvim/lua/plugins/colorschemes.lua create mode 100644 nvim/.config/nvim/lua/plugins/custom-catppuccin.lua create mode 100644 nvim/.config/nvim/lua/plugins/flash.lua create mode 100644 nvim/.config/nvim/lua/plugins/git.lua create mode 100644 nvim/.config/nvim/lua/plugins/harpoon.lua create mode 100644 nvim/.config/nvim/lua/plugins/lsp.lua create mode 100644 nvim/.config/nvim/lua/plugins/lualine.lua create mode 100644 nvim/.config/nvim/lua/plugins/luasnip.lua create mode 100644 nvim/.config/nvim/lua/plugins/markdown.lua create mode 100644 nvim/.config/nvim/lua/plugins/mason.lua create mode 100644 nvim/.config/nvim/lua/plugins/mini.lua create mode 100644 nvim/.config/nvim/lua/plugins/misc.lua create mode 100644 nvim/.config/nvim/lua/plugins/neo-tree.lua create mode 100644 nvim/.config/nvim/lua/plugins/oil.lua create mode 100644 nvim/.config/nvim/lua/plugins/reverse-engineering.lua create mode 100644 nvim/.config/nvim/lua/plugins/telescope.lua create mode 100644 nvim/.config/nvim/lua/plugins/treesitter.lua create mode 100644 nvim/.config/nvim/lua/plugins/trouble.lua (limited to 'nvim') 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", "", "zz", { desc = "better next jump", remap = true }) map("n", "", "zz", { desc = "better prev jump", remap = true }) -- plugin development -map("n", "t", ":lua require('dbgln').setup()", { desc = "dbgln" }) map("n", "d", "DbgLn", { desc = "Print Debgging Line" }) -- fix annoying typos when saving or quitting @@ -93,25 +92,20 @@ map("n", "w", function() require("harpoon.ui").nav_file(2) end, { desc = "navigate to second harpoon mark", remap = true }) -map("n", "e", function() - require("harpoon.ui").nav_file(3) -end, { desc = "navigate to third harpoon mark", remap = true }) - map("n", "h", "noh", { desc = "remove highlights", remap = true }) map("n", "j", "/<++>ciwO", { desc = "jump to <++>", remap = true }) map("n", "", "bprevious", { desc = "Jump to recently used buffer" }) map("n", "gl", "lua vim.diagnostic.open_float()", { desc = "Line diagnostics", remap = true }) -- oil.nvim keymaps -map("n", "o", "Oil", { desc = "Open Oil.nvim", remap = true }) -map("n", "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", "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", "-", "Oil", { desc = "Open Oil.nvim", remap = true }) -- competitest keymaps diff --git a/nvim/.config/nvim/lua/plugins/catppuccin.lua b/nvim/.config/nvim/lua/plugins/catppuccin.lua deleted file mode 100644 index 2d61905..0000000 --- a/nvim/.config/nvim/lua/plugins/catppuccin.lua +++ /dev/null @@ -1,359 +0,0 @@ -return { - "catppuccin/nvim", - name = "catppuccin", - lazy = false, - priority = 1000, - config = function() - require("catppuccin").setup({ - background = { - light = "latte", - dark = "mocha", - }, - color_overrides = { - latte = { - rosewater = "#c14a4a", - flamingo = "#c14a4a", - red = "#c14a4a", - maroon = "#c14a4a", - pink = "#945e80", - mauve = "#945e80", - peach = "#c35e0a", - yellow = "#b47109", - green = "#6c782e", - teal = "#4c7a5d", - sky = "#4c7a5d", - sapphire = "#4c7a5d", - blue = "#45707a", - lavender = "#45707a", - text = "#654735", - subtext1 = "#73503c", - subtext0 = "#805942", - overlay2 = "#8c6249", - overlay1 = "#8c856d", - overlay0 = "#a69d81", - surface2 = "#bfb695", - surface1 = "#d1c7a3", - surface0 = "#e3dec3", - base = "#f9f5d7", - mantle = "#f0ebce", - crust = "#e8e3c8", - }, - mocha = { - rosewater = "#ea6962", - flamingo = "#ea6962", - red = "#ea6962", - maroon = "#ea6962", - pink = "#d3869b", - mauve = "#d3869b", - peach = "#e78a4e", - yellow = "#d8a657", - green = "#a9b665", - teal = "#89b482", - sky = "#89b482", - sapphire = "#89b482", - blue = "#7daea3", - lavender = "#7daea3", - text = "#ebdbb2", - subtext1 = "#d5c4a1", - subtext0 = "#bdae93", - overlay2 = "#a89984", - overlay1 = "#928374", - overlay0 = "#595959", - surface2 = "#4d4d4d", - surface1 = "#404040", - surface0 = "#292929", - base = "#1d2021", - mantle = "#191b1c", - crust = "#141617", - }, - }, - transparent_background = false, - show_end_of_buffer = false, - integration_default = false, - integrations = { - barbecue = { dim_dirname = true, bold_basename = true, dim_context = false, alt_background = false }, - cmp = true, - gitsigns = true, - hop = true, - illuminate = { enabled = true }, - native_lsp = { enabled = true, inlay_hints = { background = true } }, - neogit = true, - neotree = true, - semantic_tokens = true, - treesitter = true, - treesitter_context = true, - vimwiki = true, - which_key = true, - }, - highlight_overrides = { - all = function(colors) - return { - CmpItemMenu = { fg = colors.surface2 }, - CursorLineNr = { fg = colors.text }, - FloatBorder = { bg = colors.base, fg = colors.surface0 }, - GitSignsChange = { fg = colors.peach }, - LineNr = { fg = colors.overlay0 }, - LspInfoBorder = { link = "FloatBorder" }, - NeoTreeDirectoryIcon = { fg = colors.subtext1 }, - NeoTreeDirectoryName = { fg = colors.subtext1 }, - NeoTreeFloatBorder = { link = "TelescopeResultsBorder" }, - NeoTreeGitConflict = { fg = colors.red }, - NeoTreeGitDeleted = { fg = colors.red }, - NeoTreeGitIgnored = { fg = colors.overlay0 }, - NeoTreeGitModified = { fg = colors.peach }, - NeoTreeGitStaged = { fg = colors.green }, - NeoTreeGitUnstaged = { fg = colors.red }, - NeoTreeGitUntracked = { fg = colors.green }, - NeoTreeIndent = { fg = colors.surface1 }, - NeoTreeNormal = { bg = colors.mantle }, - NeoTreeNormalNC = { bg = colors.mantle }, - NeoTreeRootName = { fg = colors.subtext1, style = { "bold" } }, - NeoTreeTabActive = { fg = colors.text, bg = colors.mantle }, - NeoTreeTabInactive = { fg = colors.surface2, bg = colors.crust }, - NeoTreeTabSeparatorActive = { fg = colors.mantle, bg = colors.mantle }, - NeoTreeTabSeparatorInactive = { fg = colors.crust, bg = colors.crust }, - NeoTreeWinSeparator = { fg = colors.base, bg = colors.base }, - NormalFloat = { bg = colors.base }, - Pmenu = { bg = colors.mantle, fg = "" }, - PmenuSel = { bg = colors.surface0, fg = "" }, - TelescopePreviewBorder = { bg = colors.crust, fg = colors.crust }, - TelescopePreviewNormal = { bg = colors.crust }, - TelescopePreviewTitle = { fg = colors.crust, bg = colors.crust }, - TelescopePromptBorder = { bg = colors.surface0, fg = colors.surface0 }, - TelescopePromptCounter = { fg = colors.mauve, style = { "bold" } }, - TelescopePromptNormal = { bg = colors.surface0 }, - TelescopePromptPrefix = { bg = colors.surface0 }, - TelescopePromptTitle = { fg = colors.surface0, bg = colors.surface0 }, - TelescopeResultsBorder = { bg = colors.mantle, fg = colors.mantle }, - TelescopeResultsNormal = { bg = colors.mantle }, - TelescopeResultsTitle = { fg = colors.mantle, bg = colors.mantle }, - TelescopeSelection = { bg = colors.surface0 }, - VertSplit = { bg = colors.base, fg = colors.surface0 }, - WhichKeyFloat = { bg = colors.mantle }, - YankHighlight = { bg = colors.surface2 }, - FidgetTask = { fg = colors.subtext2 }, - FidgetTitle = { fg = colors.peach }, - - IblIndent = { fg = colors.surface0 }, - IblScope = { fg = colors.overlay0 }, - - Boolean = { fg = colors.mauve }, - Number = { fg = colors.mauve }, - Float = { fg = colors.mauve }, - - PreProc = { fg = colors.mauve }, - PreCondit = { fg = colors.mauve }, - Include = { fg = colors.mauve }, - Define = { fg = colors.mauve }, - Conditional = { fg = colors.red }, - Repeat = { fg = colors.red }, - Keyword = { fg = colors.red }, - Typedef = { fg = colors.red }, - Exception = { fg = colors.red }, - Statement = { fg = colors.red }, - - Error = { fg = colors.red }, - StorageClass = { fg = colors.peach }, - Tag = { fg = colors.peach }, - Label = { fg = colors.peach }, - Structure = { fg = colors.peach }, - Operator = { fg = colors.peach }, - Title = { fg = colors.peach }, - Special = { fg = colors.yellow }, - SpecialChar = { fg = colors.yellow }, - Type = { fg = colors.yellow, style = { "bold" } }, - Function = { fg = colors.green, style = { "bold" } }, - Delimiter = { fg = colors.subtext2 }, - Ignore = { fg = colors.subtext2 }, - Macro = { fg = colors.teal }, - - TSAnnotation = { fg = colors.mauve }, - TSAttribute = { fg = colors.mauve }, - TSBoolean = { fg = colors.mauve }, - TSCharacter = { fg = colors.teal }, - TSCharacterSpecial = { link = "SpecialChar" }, - TSComment = { link = "Comment" }, - TSConditional = { fg = colors.red }, - TSConstBuiltin = { fg = colors.mauve }, - TSConstMacro = { fg = colors.mauve }, - TSConstant = { fg = colors.text }, - TSConstructor = { fg = colors.green }, - TSDebug = { link = "Debug" }, - TSDefine = { link = "Define" }, - TSEnvironment = { link = "Macro" }, - TSEnvironmentName = { link = "Type" }, - TSError = { link = "Error" }, - TSException = { fg = colors.red }, - TSField = { fg = colors.blue }, - TSFloat = { fg = colors.mauve }, - TSFuncBuiltin = { fg = colors.green }, - TSFuncMacro = { fg = colors.green }, - TSFunction = { fg = colors.green }, - TSFunctionCall = { fg = colors.green }, - TSInclude = { fg = colors.red }, - TSKeyword = { fg = colors.red }, - TSKeywordFunction = { fg = colors.red }, - TSKeywordOperator = { fg = colors.peach }, - TSKeywordReturn = { fg = colors.red }, - TSLabel = { fg = colors.peach }, - TSLiteral = { link = "String" }, - TSMath = { fg = colors.blue }, - TSMethod = { fg = colors.green }, - TSMethodCall = { fg = colors.green }, - TSNamespace = { fg = colors.yellow }, - TSNone = { fg = colors.text }, - TSNumber = { fg = colors.mauve }, - TSOperator = { fg = colors.peach }, - TSParameter = { fg = colors.text }, - TSParameterReference = { fg = colors.text }, - TSPreProc = { link = "PreProc" }, - TSProperty = { fg = colors.blue }, - TSPunctBracket = { fg = colors.text }, - TSPunctDelimiter = { link = "Delimiter" }, - TSPunctSpecial = { fg = colors.blue }, - TSRepeat = { fg = colors.red }, - TSStorageClass = { fg = colors.peach }, - TSStorageClassLifetime = { fg = colors.peach }, - TSStrike = { fg = colors.subtext2 }, - TSString = { fg = colors.teal }, - TSStringEscape = { fg = colors.green }, - TSStringRegex = { fg = colors.green }, - TSStringSpecial = { link = "SpecialChar" }, - TSSymbol = { fg = colors.text }, - TSTag = { fg = colors.peach }, - TSTagAttribute = { fg = colors.green }, - TSTagDelimiter = { fg = colors.green }, - TSText = { fg = colors.green }, - TSTextReference = { link = "Constant" }, - TSTitle = { link = "Title" }, - TSTodo = { link = "Todo" }, - TSType = { fg = colors.yellow, style = { "bold" } }, - TSTypeBuiltin = { fg = colors.yellow, style = { "bold" } }, - TSTypeDefinition = { fg = colors.yellow, style = { "bold" } }, - TSTypeQualifier = { fg = colors.peach, style = { "bold" } }, - TSURI = { fg = colors.blue }, - TSVariable = { fg = colors.text }, - TSVariableBuiltin = { fg = colors.mauve }, - - ["@annotation"] = { link = "TSAnnotation" }, - ["@attribute"] = { link = "TSAttribute" }, - ["@boolean"] = { link = "TSBoolean" }, - ["@character"] = { link = "TSCharacter" }, - ["@character.special"] = { link = "TSCharacterSpecial" }, - ["@comment"] = { link = "TSComment" }, - ["@conceal"] = { link = "Grey" }, - ["@conditional"] = { link = "TSConditional" }, - ["@constant"] = { link = "TSConstant" }, - ["@constant.builtin"] = { link = "TSConstBuiltin" }, - ["@constant.macro"] = { link = "TSConstMacro" }, - ["@constructor"] = { link = "TSConstructor" }, - ["@debug"] = { link = "TSDebug" }, - ["@define"] = { link = "TSDefine" }, - ["@error"] = { link = "TSError" }, - ["@exception"] = { link = "TSException" }, - ["@field"] = { link = "TSField" }, - ["@float"] = { link = "TSFloat" }, - ["@function"] = { link = "TSFunction" }, - ["@function.builtin"] = { link = "TSFuncBuiltin" }, - ["@function.call"] = { link = "TSFunctionCall" }, - ["@function.macro"] = { link = "TSFuncMacro" }, - ["@include"] = { link = "TSInclude" }, - ["@keyword"] = { link = "TSKeyword" }, - ["@keyword.function"] = { link = "TSKeywordFunction" }, - ["@keyword.operator"] = { link = "TSKeywordOperator" }, - ["@keyword.return"] = { link = "TSKeywordReturn" }, - ["@label"] = { link = "TSLabel" }, - ["@math"] = { link = "TSMath" }, - ["@method"] = { link = "TSMethod" }, - ["@method.call"] = { link = "TSMethodCall" }, - ["@namespace"] = { link = "TSNamespace" }, - ["@none"] = { link = "TSNone" }, - ["@number"] = { link = "TSNumber" }, - ["@operator"] = { link = "TSOperator" }, - ["@parameter"] = { link = "TSParameter" }, - ["@parameter.reference"] = { link = "TSParameterReference" }, - ["@preproc"] = { link = "TSPreProc" }, - ["@property"] = { link = "TSProperty" }, - ["@punctuation.bracket"] = { link = "TSPunctBracket" }, - ["@punctuation.delimiter"] = { link = "TSPunctDelimiter" }, - ["@punctuation.special"] = { link = "TSPunctSpecial" }, - ["@repeat"] = { link = "TSRepeat" }, - ["@storageclass"] = { link = "TSStorageClass" }, - ["@storageclass.lifetime"] = { link = "TSStorageClassLifetime" }, - ["@strike"] = { link = "TSStrike" }, - ["@string"] = { link = "TSString" }, - ["@string.escape"] = { link = "TSStringEscape" }, - ["@string.regex"] = { link = "TSStringRegex" }, - ["@string.special"] = { link = "TSStringSpecial" }, - ["@symbol"] = { link = "TSSymbol" }, - ["@tag"] = { link = "TSTag" }, - ["@tag.attribute"] = { link = "TSTagAttribute" }, - ["@tag.delimiter"] = { link = "TSTagDelimiter" }, - ["@text"] = { link = "TSText" }, - ["@text.danger"] = { link = "TSDanger" }, - ["@text.diff.add"] = { link = "diffAdded" }, - ["@text.diff.delete"] = { link = "diffRemoved" }, - ["@text.emphasis"] = { link = "TSEmphasis" }, - ["@text.environment"] = { link = "TSEnvironment" }, - ["@text.environment.name"] = { link = "TSEnvironmentName" }, - ["@text.literal"] = { link = "TSLiteral" }, - ["@text.math"] = { link = "TSMath" }, - ["@text.note"] = { link = "TSNote" }, - ["@text.reference"] = { link = "TSTextReference" }, - ["@text.strike"] = { link = "TSStrike" }, - ["@text.strong"] = { link = "TSStrong" }, - ["@text.title"] = { link = "TSTitle" }, - ["@text.todo"] = { link = "TSTodo" }, - ["@text.todo.checked"] = { link = "Green" }, - ["@text.todo.unchecked"] = { link = "Ignore" }, - ["@text.underline"] = { link = "TSUnderline" }, - ["@text.uri"] = { link = "TSURI" }, - ["@text.warning"] = { link = "TSWarning" }, - ["@todo"] = { link = "TSTodo" }, - ["@type"] = { link = "TSType" }, - ["@type.builtin"] = { link = "TSTypeBuiltin" }, - ["@type.definition"] = { link = "TSTypeDefinition" }, - ["@type.qualifier"] = { link = "TSTypeQualifier" }, - ["@uri"] = { link = "TSURI" }, - ["@variable"] = { link = "TSVariable" }, - ["@variable.builtin"] = { link = "TSVariableBuiltin" }, - - ["@lsp.type.class"] = { link = "TSType" }, - ["@lsp.type.comment"] = { link = "TSComment" }, - ["@lsp.type.decorator"] = { link = "TSFunction" }, - ["@lsp.type.enum"] = { link = "TSType" }, - ["@lsp.type.enumMember"] = { link = "TSProperty" }, - ["@lsp.type.events"] = { link = "TSLabel" }, - ["@lsp.type.function"] = { link = "TSFunction" }, - ["@lsp.type.interface"] = { link = "TSType" }, - ["@lsp.type.keyword"] = { link = "TSKeyword" }, - ["@lsp.type.macro"] = { link = "TSConstMacro" }, - ["@lsp.type.method"] = { link = "TSMethod" }, - ["@lsp.type.modifier"] = { link = "TSTypeQualifier" }, - ["@lsp.type.namespace"] = { link = "TSNamespace" }, - ["@lsp.type.number"] = { link = "TSNumber" }, - ["@lsp.type.operator"] = { link = "TSOperator" }, - ["@lsp.type.parameter"] = { link = "TSParameter" }, - ["@lsp.type.property"] = { link = "TSProperty" }, - ["@lsp.type.regexp"] = { link = "TSStringRegex" }, - ["@lsp.type.string"] = { link = "TSString" }, - ["@lsp.type.struct"] = { link = "TSType" }, - ["@lsp.type.type"] = { link = "TSType" }, - ["@lsp.type.typeParameter"] = { link = "TSTypeDefinition" }, - ["@lsp.type.variable"] = { link = "TSVariable" }, - } - end, - latte = function(colors) - return { - IblIndent = { fg = colors.mantle }, - IblScope = { fg = colors.surface1 }, - - LineNr = { fg = colors.surface1 }, - } - end, - }, - }) - - vim.api.nvim_command("colorscheme catppuccin") - end, -} 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({ + [""] = cmp.mapping.select_next_item(), + [""] = cmp.mapping.select_prev_item(), + [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.complete({}), + [""] = cmp.mapping.confirm({ select = true }), + [""] = cmp.mapping.confirm({ + behavior = cmp.ConfirmBehavior.Replace, + select = true, + }), + [""] = 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" }), + [""] = 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/custom-catppuccin.lua b/nvim/.config/nvim/lua/plugins/custom-catppuccin.lua new file mode 100644 index 0000000..1795273 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/custom-catppuccin.lua @@ -0,0 +1,359 @@ +return { + "catppuccin/nvim", + name = "catppuccin", + lazy = false, + priority = 1000, + config = function() + require("catppuccin").setup({ + background = { + light = "latte", + dark = "mocha", + }, + color_overrides = { + latte = { + rosewater = "#c14a4a", + flamingo = "#c14a4a", + red = "#c14a4a", + maroon = "#c14a4a", + pink = "#945e80", + mauve = "#945e80", + peach = "#c35e0a", + yellow = "#b47109", + green = "#6c782e", + teal = "#4c7a5d", + sky = "#4c7a5d", + sapphire = "#4c7a5d", + blue = "#45707a", + lavender = "#45707a", + text = "#654735", + subtext1 = "#73503c", + subtext0 = "#805942", + overlay2 = "#8c6249", + overlay1 = "#8c856d", + overlay0 = "#a69d81", + surface2 = "#bfb695", + surface1 = "#d1c7a3", + surface0 = "#e3dec3", + base = "#f9f5d7", + mantle = "#f0ebce", + crust = "#e8e3c8", + }, + mocha = { + rosewater = "#ea6962", + flamingo = "#ea6962", + red = "#ea6962", + maroon = "#ea6962", + pink = "#d3869b", + mauve = "#d3869b", + peach = "#e78a4e", + yellow = "#d8a657", + green = "#a9b665", + teal = "#89b482", + sky = "#89b482", + sapphire = "#89b482", + blue = "#7daea3", + lavender = "#7daea3", + text = "#ebdbb2", + subtext1 = "#d5c4a1", + subtext0 = "#bdae93", + overlay2 = "#a89984", + overlay1 = "#928374", + overlay0 = "#595959", + surface2 = "#4d4d4d", + surface1 = "#404040", + surface0 = "#292929", + base = "#1b1c1f", + mantle = "#191b1c", + crust = "#141617", + }, + }, + transparent_background = false, + show_end_of_buffer = false, + integration_default = false, + integrations = { + barbecue = { dim_dirname = true, bold_basename = true, dim_context = false, alt_background = false }, + cmp = true, + gitsigns = true, + hop = true, + illuminate = { enabled = true }, + native_lsp = { enabled = true, inlay_hints = { background = true } }, + neogit = true, + neotree = true, + semantic_tokens = true, + treesitter = true, + treesitter_context = true, + vimwiki = true, + which_key = true, + }, + highlight_overrides = { + all = function(colors) + return { + CmpItemMenu = { fg = colors.surface2 }, + CursorLineNr = { fg = colors.text }, + FloatBorder = { bg = colors.base, fg = colors.surface0 }, + GitSignsChange = { fg = colors.peach }, + LineNr = { fg = colors.overlay0 }, + LspInfoBorder = { link = "FloatBorder" }, + NeoTreeDirectoryIcon = { fg = colors.subtext1 }, + NeoTreeDirectoryName = { fg = colors.subtext1 }, + NeoTreeFloatBorder = { link = "TelescopeResultsBorder" }, + NeoTreeGitConflict = { fg = colors.red }, + NeoTreeGitDeleted = { fg = colors.red }, + NeoTreeGitIgnored = { fg = colors.overlay0 }, + NeoTreeGitModified = { fg = colors.peach }, + NeoTreeGitStaged = { fg = colors.green }, + NeoTreeGitUnstaged = { fg = colors.red }, + NeoTreeGitUntracked = { fg = colors.green }, + NeoTreeIndent = { fg = colors.surface1 }, + NeoTreeNormal = { bg = colors.mantle }, + NeoTreeNormalNC = { bg = colors.mantle }, + NeoTreeRootName = { fg = colors.subtext1, style = { "bold" } }, + NeoTreeTabActive = { fg = colors.text, bg = colors.mantle }, + NeoTreeTabInactive = { fg = colors.surface2, bg = colors.crust }, + NeoTreeTabSeparatorActive = { fg = colors.mantle, bg = colors.mantle }, + NeoTreeTabSeparatorInactive = { fg = colors.crust, bg = colors.crust }, + NeoTreeWinSeparator = { fg = colors.base, bg = colors.base }, + NormalFloat = { bg = colors.base }, + Pmenu = { bg = colors.mantle, fg = "" }, + PmenuSel = { bg = colors.surface0, fg = "" }, + TelescopePreviewBorder = { bg = colors.crust, fg = colors.crust }, + TelescopePreviewNormal = { bg = colors.crust }, + TelescopePreviewTitle = { fg = colors.crust, bg = colors.crust }, + TelescopePromptBorder = { bg = colors.surface0, fg = colors.surface0 }, + TelescopePromptCounter = { fg = colors.mauve, style = { "bold" } }, + TelescopePromptNormal = { bg = colors.surface0 }, + TelescopePromptPrefix = { bg = colors.surface0 }, + TelescopePromptTitle = { fg = colors.surface0, bg = colors.surface0 }, + TelescopeResultsBorder = { bg = colors.mantle, fg = colors.mantle }, + TelescopeResultsNormal = { bg = colors.mantle }, + TelescopeResultsTitle = { fg = colors.mantle, bg = colors.mantle }, + TelescopeSelection = { bg = colors.surface0 }, + VertSplit = { bg = colors.base, fg = colors.surface0 }, + WhichKeyFloat = { bg = colors.mantle }, + YankHighlight = { bg = colors.surface2 }, + FidgetTask = { fg = colors.subtext2 }, + FidgetTitle = { fg = colors.peach }, + + IblIndent = { fg = colors.surface0 }, + IblScope = { fg = colors.overlay0 }, + + Boolean = { fg = colors.mauve }, + Number = { fg = colors.mauve }, + Float = { fg = colors.mauve }, + + PreProc = { fg = colors.mauve }, + PreCondit = { fg = colors.mauve }, + Include = { fg = colors.mauve }, + Define = { fg = colors.mauve }, + Conditional = { fg = colors.red }, + Repeat = { fg = colors.red }, + Keyword = { fg = colors.red }, + Typedef = { fg = colors.red }, + Exception = { fg = colors.red }, + Statement = { fg = colors.red }, + + Error = { fg = colors.red }, + StorageClass = { fg = colors.peach }, + Tag = { fg = colors.peach }, + Label = { fg = colors.peach }, + Structure = { fg = colors.peach }, + Operator = { fg = colors.peach }, + Title = { fg = colors.peach }, + Special = { fg = colors.yellow }, + SpecialChar = { fg = colors.yellow }, + Type = { fg = colors.yellow, style = { "bold" } }, + Function = { fg = colors.green, style = { "bold" } }, + Delimiter = { fg = colors.subtext2 }, + Ignore = { fg = colors.subtext2 }, + Macro = { fg = colors.teal }, + + TSAnnotation = { fg = colors.mauve }, + TSAttribute = { fg = colors.mauve }, + TSBoolean = { fg = colors.mauve }, + TSCharacter = { fg = colors.teal }, + TSCharacterSpecial = { link = "SpecialChar" }, + TSComment = { link = "Comment" }, + TSConditional = { fg = colors.red }, + TSConstBuiltin = { fg = colors.mauve }, + TSConstMacro = { fg = colors.mauve }, + TSConstant = { fg = colors.text }, + TSConstructor = { fg = colors.green }, + TSDebug = { link = "Debug" }, + TSDefine = { link = "Define" }, + TSEnvironment = { link = "Macro" }, + TSEnvironmentName = { link = "Type" }, + TSError = { link = "Error" }, + TSException = { fg = colors.red }, + TSField = { fg = colors.blue }, + TSFloat = { fg = colors.mauve }, + TSFuncBuiltin = { fg = colors.green }, + TSFuncMacro = { fg = colors.green }, + TSFunction = { fg = colors.green }, + TSFunctionCall = { fg = colors.green }, + TSInclude = { fg = colors.red }, + TSKeyword = { fg = colors.red }, + TSKeywordFunction = { fg = colors.red }, + TSKeywordOperator = { fg = colors.peach }, + TSKeywordReturn = { fg = colors.red }, + TSLabel = { fg = colors.peach }, + TSLiteral = { link = "String" }, + TSMath = { fg = colors.blue }, + TSMethod = { fg = colors.green }, + TSMethodCall = { fg = colors.green }, + TSNamespace = { fg = colors.yellow }, + TSNone = { fg = colors.text }, + TSNumber = { fg = colors.mauve }, + TSOperator = { fg = colors.peach }, + TSParameter = { fg = colors.text }, + TSParameterReference = { fg = colors.text }, + TSPreProc = { link = "PreProc" }, + TSProperty = { fg = colors.blue }, + TSPunctBracket = { fg = colors.text }, + TSPunctDelimiter = { link = "Delimiter" }, + TSPunctSpecial = { fg = colors.blue }, + TSRepeat = { fg = colors.red }, + TSStorageClass = { fg = colors.peach }, + TSStorageClassLifetime = { fg = colors.peach }, + TSStrike = { fg = colors.subtext2 }, + TSString = { fg = colors.teal }, + TSStringEscape = { fg = colors.green }, + TSStringRegex = { fg = colors.green }, + TSStringSpecial = { link = "SpecialChar" }, + TSSymbol = { fg = colors.text }, + TSTag = { fg = colors.peach }, + TSTagAttribute = { fg = colors.green }, + TSTagDelimiter = { fg = colors.green }, + TSText = { fg = colors.green }, + TSTextReference = { link = "Constant" }, + TSTitle = { link = "Title" }, + TSTodo = { link = "Todo" }, + TSType = { fg = colors.yellow, style = { "bold" } }, + TSTypeBuiltin = { fg = colors.yellow, style = { "bold" } }, + TSTypeDefinition = { fg = colors.yellow, style = { "bold" } }, + TSTypeQualifier = { fg = colors.peach, style = { "bold" } }, + TSURI = { fg = colors.blue }, + TSVariable = { fg = colors.text }, + TSVariableBuiltin = { fg = colors.mauve }, + + ["@annotation"] = { link = "TSAnnotation" }, + ["@attribute"] = { link = "TSAttribute" }, + ["@boolean"] = { link = "TSBoolean" }, + ["@character"] = { link = "TSCharacter" }, + ["@character.special"] = { link = "TSCharacterSpecial" }, + ["@comment"] = { link = "TSComment" }, + ["@conceal"] = { link = "Grey" }, + ["@conditional"] = { link = "TSConditional" }, + ["@constant"] = { link = "TSConstant" }, + ["@constant.builtin"] = { link = "TSConstBuiltin" }, + ["@constant.macro"] = { link = "TSConstMacro" }, + ["@constructor"] = { link = "TSConstructor" }, + ["@debug"] = { link = "TSDebug" }, + ["@define"] = { link = "TSDefine" }, + ["@error"] = { link = "TSError" }, + ["@exception"] = { link = "TSException" }, + ["@field"] = { link = "TSField" }, + ["@float"] = { link = "TSFloat" }, + ["@function"] = { link = "TSFunction" }, + ["@function.builtin"] = { link = "TSFuncBuiltin" }, + ["@function.call"] = { link = "TSFunctionCall" }, + ["@function.macro"] = { link = "TSFuncMacro" }, + ["@include"] = { link = "TSInclude" }, + ["@keyword"] = { link = "TSKeyword" }, + ["@keyword.function"] = { link = "TSKeywordFunction" }, + ["@keyword.operator"] = { link = "TSKeywordOperator" }, + ["@keyword.return"] = { link = "TSKeywordReturn" }, + ["@label"] = { link = "TSLabel" }, + ["@math"] = { link = "TSMath" }, + ["@method"] = { link = "TSMethod" }, + ["@method.call"] = { link = "TSMethodCall" }, + ["@namespace"] = { link = "TSNamespace" }, + ["@none"] = { link = "TSNone" }, + ["@number"] = { link = "TSNumber" }, + ["@operator"] = { link = "TSOperator" }, + ["@parameter"] = { link = "TSParameter" }, + ["@parameter.reference"] = { link = "TSParameterReference" }, + ["@preproc"] = { link = "TSPreProc" }, + ["@property"] = { link = "TSProperty" }, + ["@punctuation.bracket"] = { link = "TSPunctBracket" }, + ["@punctuation.delimiter"] = { link = "TSPunctDelimiter" }, + ["@punctuation.special"] = { link = "TSPunctSpecial" }, + ["@repeat"] = { link = "TSRepeat" }, + ["@storageclass"] = { link = "TSStorageClass" }, + ["@storageclass.lifetime"] = { link = "TSStorageClassLifetime" }, + ["@strike"] = { link = "TSStrike" }, + ["@string"] = { link = "TSString" }, + ["@string.escape"] = { link = "TSStringEscape" }, + ["@string.regex"] = { link = "TSStringRegex" }, + ["@string.special"] = { link = "TSStringSpecial" }, + ["@symbol"] = { link = "TSSymbol" }, + ["@tag"] = { link = "TSTag" }, + ["@tag.attribute"] = { link = "TSTagAttribute" }, + ["@tag.delimiter"] = { link = "TSTagDelimiter" }, + ["@text"] = { link = "TSText" }, + ["@text.danger"] = { link = "TSDanger" }, + ["@text.diff.add"] = { link = "diffAdded" }, + ["@text.diff.delete"] = { link = "diffRemoved" }, + ["@text.emphasis"] = { link = "TSEmphasis" }, + ["@text.environment"] = { link = "TSEnvironment" }, + ["@text.environment.name"] = { link = "TSEnvironmentName" }, + ["@text.literal"] = { link = "TSLiteral" }, + ["@text.math"] = { link = "TSMath" }, + ["@text.note"] = { link = "TSNote" }, + ["@text.reference"] = { link = "TSTextReference" }, + ["@text.strike"] = { link = "TSStrike" }, + ["@text.strong"] = { link = "TSStrong" }, + ["@text.title"] = { link = "TSTitle" }, + ["@text.todo"] = { link = "TSTodo" }, + ["@text.todo.checked"] = { link = "Green" }, + ["@text.todo.unchecked"] = { link = "Ignore" }, + ["@text.underline"] = { link = "TSUnderline" }, + ["@text.uri"] = { link = "TSURI" }, + ["@text.warning"] = { link = "TSWarning" }, + ["@todo"] = { link = "TSTodo" }, + ["@type"] = { link = "TSType" }, + ["@type.builtin"] = { link = "TSTypeBuiltin" }, + ["@type.definition"] = { link = "TSTypeDefinition" }, + ["@type.qualifier"] = { link = "TSTypeQualifier" }, + ["@uri"] = { link = "TSURI" }, + ["@variable"] = { link = "TSVariable" }, + ["@variable.builtin"] = { link = "TSVariableBuiltin" }, + + ["@lsp.type.class"] = { link = "TSType" }, + ["@lsp.type.comment"] = { link = "TSComment" }, + ["@lsp.type.decorator"] = { link = "TSFunction" }, + ["@lsp.type.enum"] = { link = "TSType" }, + ["@lsp.type.enumMember"] = { link = "TSProperty" }, + ["@lsp.type.events"] = { link = "TSLabel" }, + ["@lsp.type.function"] = { link = "TSFunction" }, + ["@lsp.type.interface"] = { link = "TSType" }, + ["@lsp.type.keyword"] = { link = "TSKeyword" }, + ["@lsp.type.macro"] = { link = "TSConstMacro" }, + ["@lsp.type.method"] = { link = "TSMethod" }, + ["@lsp.type.modifier"] = { link = "TSTypeQualifier" }, + ["@lsp.type.namespace"] = { link = "TSNamespace" }, + ["@lsp.type.number"] = { link = "TSNumber" }, + ["@lsp.type.operator"] = { link = "TSOperator" }, + ["@lsp.type.parameter"] = { link = "TSParameter" }, + ["@lsp.type.property"] = { link = "TSProperty" }, + ["@lsp.type.regexp"] = { link = "TSStringRegex" }, + ["@lsp.type.string"] = { link = "TSString" }, + ["@lsp.type.struct"] = { link = "TSType" }, + ["@lsp.type.type"] = { link = "TSType" }, + ["@lsp.type.typeParameter"] = { link = "TSTypeDefinition" }, + ["@lsp.type.variable"] = { link = "TSVariable" }, + } + end, + latte = function(colors) + return { + IblIndent = { fg = colors.mantle }, + IblScope = { fg = colors.surface1 }, + + LineNr = { fg = colors.surface1 }, + } + end, + }, + }) + + vim.api.nvim_command("colorscheme catppuccin") + end, +} 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" }, + { "", 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 = { + { + "g;", + "Neogit", + }, + }, + }, +} 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] = { "ca", false } + keys[#keys + 1] = { "c", false } + keys[#keys + 1] = { "cc", false } + keys[#keys + 1] = { "c", false } + keys[#keys + 1] = { "cd", false } + keys[#keys + 1] = { "cf", false } + keys[#keys + 1] = { "c", false } + keys[#keys + 1] = { "cl", false } + keys[#keys + 1] = { "cm", false } + keys[#keys + 1] = { "co", false } + keys[#keys + 1] = { "cr", false } + keys[#keys + 1] = { "c", false } + keys[#keys + 1] = { "cs", false } + + keys[#keys + 1] = { "lr", "lua vim.lsp.buf.rename()", desc = "Rename variable" } + keys[#keys + 1] = { "la", "lua vim.lsp.buf.code_action()", 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", "co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" }) + -- vim.keymap.set("n", "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 + 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 for completion and snippets (supertab) + -- first: disable default and 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 = { - { "", "TmuxNavigateLeft" }, - { "", "TmuxNavigateDown" }, - { "", "TmuxNavigateUp" }, - { "", "TmuxNavigateRight" }, - { "", "TmuxNavigatePrevious" }, - }, - }, - - - { - "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 = { - { - "g;", - "Neogit" - } - } - - }, - - { - '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 = { - { - "xx", function() require("trouble").toggle() end - }, - { - "xw", function() require("trouble").toggle("workspace_diagnostics") end - }, - { - "xd", function() require("trouble").toggle("document_diagnostics") end - }, - { - "xq", function() require("trouble").toggle("quickfix") end - }, - { - "xl", function() require("trouble").toggle("loclist") end - }, - { - "gR", function() require("trouble").toggle("lsp_references") end - }, - }, - }, - - -- add symbols-outline - { - "simrat39/symbols-outline.nvim", - cmd = "SymbolsOutline", - conf