Remove duplicate config
This commit is contained in:
		| @@ -1,19 +0,0 @@ | ||||
| return { | ||||
| 	"aznhe21/actions-preview.nvim", | ||||
| 	config = function() | ||||
| 		-- Configure actions-preview.nvim | ||||
| 		require("actions-preview").setup({ | ||||
| 			-- Floating window configuration (optional) | ||||
| 			max_width = 80, -- Max width of the preview window | ||||
| 			max_height = 12, -- Max height of the preview window | ||||
| 			min_width = 20, -- Minimum width for the preview window | ||||
| 			min_height = 4, -- Minimum height for the preview window | ||||
|  | ||||
| 			-- Keymaps (optional) | ||||
| 			keymaps = { | ||||
| 				-- Trigger code action preview with a keybinding (example using <leader>a) | ||||
| 				{ "n", "<leader>ca", vim.lsp.buf.code_action }, | ||||
| 			}, | ||||
| 		}) | ||||
| 	end, | ||||
| } | ||||
| @@ -1,65 +0,0 @@ | ||||
| return { | ||||
| 	-- autoclose brackets and quotes | ||||
| 	"windwp/nvim-autopairs", | ||||
| 	event = "InsertEnter", | ||||
| 	config = function() | ||||
| 		require("nvim-autopairs").setup({ | ||||
| 			fast_wrap = { | ||||
| 				map = "<C-e>", | ||||
| 				chars = { "{", "[", "(", '"', "'", "`" }, | ||||
| 			}, | ||||
| 		}) | ||||
|  | ||||
| 		-- add spaces between parentheses | ||||
| 		local npairs = require("nvim-autopairs") | ||||
| 		local Rule = require("nvim-autopairs.rule") | ||||
| 		local cond = require("nvim-autopairs.conds") | ||||
|  | ||||
| 		local brackets = { { "(", ")" }, { "[", "]" }, { "{", "}" } } | ||||
| 		npairs.add_rules({ | ||||
| 			-- Rule for a pair with left-side ' ' and right side ' ' | ||||
| 			Rule(" ", " ") | ||||
| 				-- Pair will only occur if the conditional function returns true | ||||
| 				:with_pair(function(opts) | ||||
| 					-- We are checking if we are inserting a space in (), [], or {} | ||||
| 					local pair = opts.line:sub(opts.col - 1, opts.col) | ||||
| 					return vim.tbl_contains({ | ||||
| 						brackets[1][1] .. brackets[1][2], | ||||
| 						brackets[2][1] .. brackets[2][2], | ||||
| 						brackets[3][1] .. brackets[3][2], | ||||
| 					}, pair) | ||||
| 				end) | ||||
| 				:with_move(cond.none()) | ||||
| 				:with_cr(cond.none()) | ||||
| 				-- We only want to delete the pair of spaces when the cursor is as such: ( | ) | ||||
| 				:with_del( | ||||
| 					function(opts) | ||||
| 						local col = vim.api.nvim_win_get_cursor(0)[2] | ||||
| 						local context = opts.line:sub(col - 1, col + 2) | ||||
| 						return vim.tbl_contains({ | ||||
| 							brackets[1][1] .. "  " .. brackets[1][2], | ||||
| 							brackets[2][1] .. "  " .. brackets[2][2], | ||||
| 							brackets[3][1] .. "  " .. brackets[3][2], | ||||
| 						}, context) | ||||
| 					end | ||||
| 				), | ||||
| 		}) | ||||
| 		-- For each pair of brackets we will add another rule | ||||
| 		for _, bracket in pairs(brackets) do | ||||
| 			npairs.add_rules({ | ||||
| 				-- Each of these rules is for a pair with left-side '( ' and right-side ' )' for each bracket type | ||||
| 				Rule(bracket[1] .. " ", " " .. bracket[2]) | ||||
| 					:with_pair(cond.none()) | ||||
| 					:with_move(function(opts) | ||||
| 						return opts.char == bracket[2] | ||||
| 					end) | ||||
| 					:with_del(cond.none()) | ||||
| 					:use_key(bracket[2]) | ||||
| 					-- Removes the trailing whitespace that can occur without this | ||||
| 					:replace_map_cr(function(_) | ||||
| 						return "<C-c>2xi<CR><C-c>O" | ||||
| 					end), | ||||
| 			}) | ||||
| 		end | ||||
| 	end, | ||||
| } | ||||
| @@ -1,13 +0,0 @@ | ||||
| return { | ||||
|     "windwp/nvim-ts-autotag", | ||||
|     config = function () | ||||
|         require('nvim-ts-autotag').setup({ | ||||
|             opts = { | ||||
|                 -- Defaults | ||||
|                 enable_close = true, -- Auto close tags | ||||
|                 enable_rename = true, -- Auto rename pairs of tags | ||||
|                 enable_close_on_slash = true -- Auto close on trailing </ | ||||
|             }, | ||||
|         } ) | ||||
|     end | ||||
| } | ||||
| @@ -1,9 +0,0 @@ | ||||
| return { | ||||
|     -- delete a buffer | ||||
|     'famiu/bufdelete.nvim', | ||||
|     config = function() | ||||
|         local map = vim.api.nvim_set_keymap | ||||
|         map('n', '<C-w>', '<cmd>Bdelete<CR>', { silent = true, desc = "close current buffer" }) | ||||
|     end | ||||
| } | ||||
|  | ||||
| @@ -1,64 +0,0 @@ | ||||
| return { | ||||
|     -- tab line | ||||
|     "akinsho/bufferline.nvim", | ||||
|     version = "*", | ||||
|     dependencies = "nvim-tree/nvim-web-devicons", | ||||
|     config = function() | ||||
|         local bufferline = require("bufferline") | ||||
|         bufferline.setup({ | ||||
|             options = { | ||||
|                 mode = "buffers", | ||||
|                 show_buffer_close_icons = false, | ||||
|                 middle_mouse_command = "bdelete! %d", | ||||
|                 indicator = { style = "underline" }, | ||||
|                 offsets = { | ||||
|                     { | ||||
|                         filetype = "NvimTree", | ||||
|                         text = " ", | ||||
|                         text_align = "center", | ||||
|                         separator = true, | ||||
|                     }, | ||||
|                 }, | ||||
|  | ||||
|                 separator_style = { " ", " " }, | ||||
|                 diagnostics = "nvim_lsp", | ||||
|                 diagnostics_indicator = function(count, level, diagnostics_dict, context) | ||||
|                     local icon = level:match("error") and " " or " " | ||||
|                     return icon .. count | ||||
|                 end, | ||||
|             }, | ||||
|         }) | ||||
|  | ||||
|         local opts = { silent = true } | ||||
|         -- go to buffer | ||||
|         opts.desc = "go to buffer 1" | ||||
|         vim.keymap.set("n", "g1", "<Cmd>BufferLineGoToBuffer 1<CR>", opts) | ||||
|         opts.desc = "go to buffer 2" | ||||
|         vim.keymap.set("n", "g2", "<Cmd>BufferLineGoToBuffer 2<CR>", opts) | ||||
|         opts.desc = "go to buffer 3" | ||||
|         vim.keymap.set("n", "g3", "<Cmd>BufferLineGoToBuffer 3<CR>", opts) | ||||
|         opts.desc = "go to buffer 4" | ||||
|         vim.keymap.set("n", "g4", "<Cmd>BufferLineGoToBuffer 4<CR>", opts) | ||||
|         opts.desc = "go to buffer 5" | ||||
|         vim.keymap.set("n", "g5", "<Cmd>BufferLineGoToBuffer 5<CR>", opts) | ||||
|         opts.desc = "go to buffer 6" | ||||
|         vim.keymap.set("n", "g6", "<Cmd>BufferLineGoToBuffer 6<CR>", opts) | ||||
|         opts.desc = "go to buffer 7" | ||||
|         vim.keymap.set("n", "g7", "<Cmd>BufferLineGoToBuffer 7<CR>", opts) | ||||
|         opts.desc = "go to buffer 8" | ||||
|         vim.keymap.set("n", "g8", "<Cmd>BufferLineGoToBuffer 8<CR>", opts) | ||||
|         opts.desc = "go to buffer 9" | ||||
|         vim.keymap.set("n", "g9", "<Cmd>BufferLineGoToBuffer 9<CR>", opts) | ||||
|         opts.desc = "go to buffer 10" | ||||
|         vim.keymap.set("n", "g0", "<Cmd>BufferLineGoToBuffer 10<CR>", opts) | ||||
|         opts.desc = nil | ||||
|         -- cycle between buffers | ||||
|         vim.keymap.set("n", "J", "<cmd>BufferLineCyclePrev<CR>", opts) | ||||
|         vim.keymap.set("n", "K", "<cmd>BufferLineCycleNext<CR>", opts) | ||||
|         -- move buffers | ||||
|         vim.keymap.set("n", "<C-S-J>", "<cmd>BufferLineMovePrev<CR>", opts) | ||||
|         vim.keymap.set("n", "<C-S-K>", "<cmd>BufferLineMoveNext<CR>", opts) | ||||
|         -- go to previous buffer | ||||
|         vim.keymap.set({ "n", "i" }, "<C-Tab>", "<cmd>b#<CR>", opts) | ||||
|     end, | ||||
| } | ||||
| @@ -1,131 +0,0 @@ | ||||
| return { | ||||
| 	-- competion | ||||
| 	"hrsh7th/nvim-cmp", | ||||
| 	event = "InsertEnter", | ||||
| 	dependencies = { | ||||
|         { "hrsh7th/cmp-buffer" }, -- source for text in buffer | ||||
|         { "hrsh7th/cmp-path" }, -- source for file system paths | ||||
|         { "L3MON4D3/LuaSnip" }, -- snippet engine | ||||
|         { "saadparwaiz1/cmp_luasnip" }, -- for autocompletion | ||||
|         { "rafamadriz/friendly-snippets" }, -- useful snippets | ||||
|         { "onsails/lspkind.nvim" }, -- icons for cmp | ||||
|         { "hrsh7th/cmp-nvim-lsp-signature-help" }, -- signature help | ||||
| 	}, | ||||
|  | ||||
| 	config = function() | ||||
| 		local cmp = require("cmp") | ||||
| 		local lspkind = require("lspkind") | ||||
| 		local luasnip = require("luasnip") | ||||
|  | ||||
| 		-- loads vscode style snippets from installed plugins (e.g. friendly-snippets) | ||||
| 		require("luasnip.loaders.from_vscode").lazy_load() | ||||
| 		require("luasnip.loaders.from_vscode").load({paths = { "~/.config/nvim/my_snippets" }}) | ||||
|         luasnip.setup({ | ||||
|             region_check_events = { "CursorMoved" }, | ||||
|             delete_check_events = { "TextChanged" }, | ||||
|         }) | ||||
|  | ||||
|         -- luasnip.filetype_extend("htmldjango", { "html" }) | ||||
|  | ||||
| 		cmp.setup({ | ||||
| 			completion = { | ||||
| 				completeopt = "menu,menuone,preview,noselect", | ||||
| 			}, | ||||
|  | ||||
| 			window = { | ||||
| 				documentation = cmp.config.window.bordered(), | ||||
| 				completion = cmp.config.window.bordered({ | ||||
| 					winhighlight = "Normal:CmpPmenu,CursorLine:PmenuSel,Search:None", | ||||
| 				}), | ||||
| 			}, | ||||
|  | ||||
| 			snippet = { -- configure how nvim-cmp interacts with snippet engine | ||||
| 				expand = function(args) | ||||
| 					luasnip.lsp_expand(args.body) | ||||
| 				end, | ||||
| 			}, | ||||
|  | ||||
| 			mapping = cmp.mapping.preset.insert({ | ||||
| 				["<C-j>"] = cmp.mapping.select_next_item({ behavior = cmp.ConfirmBehavior.Select }), -- next suggestion | ||||
| 				["<C-k>"] = cmp.mapping.select_prev_item({ behavior = cmp.ConfirmBehavior.Select }), -- prev suggestion | ||||
| 				["<C-S-J>"] = cmp.mapping.scroll_docs(4, { behavior = cmp.ConfirmBehavior.Select }), -- docs forward | ||||
| 				["<C-S-K>"] = cmp.mapping.scroll_docs(-4, { behavior = cmp.ConfirmBehavior.Select }), -- docs back | ||||
| 				["<C-Space>"] = cmp.mapping.complete(), -- show completion suggestions | ||||
| 				["<C-q>"] = cmp.mapping.abort(), -- close completion window | ||||
| 				["<CR>"] = cmp.mapping.confirm({ select = false }), -- autocomplete if selected | ||||
|                 -- Mapping for Tab key | ||||
|                 ["<Tab>"] = cmp.mapping(function(fallback) | ||||
|                     if cmp.visible() then | ||||
|                         cmp.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = true }) | ||||
|                     elseif require("luasnip").expandable() then | ||||
|                         -- Expands snippet if possible | ||||
|                         require("luasnip").expand() | ||||
|                     else | ||||
|                         -- Otherwise, fallback (insert a tab character) | ||||
|                         fallback() | ||||
|                     end | ||||
|                 end, { "i", "s" }), | ||||
|  | ||||
|                 -- Mapping for jumping in snippets | ||||
|                 ["<C-p>"] = cmp.mapping(function(fallback) | ||||
|                     if require("luasnip").jumpable() then | ||||
|                         -- Jump backwards if inside a snippet | ||||
|                         require("luasnip").jump() | ||||
|                     else | ||||
|                         -- Otherwise, fallback (insert a tab character) | ||||
|                         fallback() | ||||
|                     end | ||||
|                 end, { "i", "s" }), | ||||
|  | ||||
|                 -- Mapping for jumping backwards in snippets | ||||
|                 ["<C-S-p>"] = cmp.mapping(function(fallback) | ||||
|                     if require("luasnip").jumpable() then | ||||
|                         -- Jump backwards if inside a snippet | ||||
|                         require("luasnip").jump() | ||||
|                     else | ||||
|                         -- Otherwise, fallback (insert a tab character) | ||||
|                         fallback() | ||||
|                     end | ||||
|                 end, { "i", "s" }) | ||||
| 			}), | ||||
|  | ||||
| 			-- sources for autocompletion | ||||
| 			sources = cmp.config.sources({ | ||||
| 				{ name = "nvim_lsp" }, -- lsp | ||||
| 				{ name = "luasnip" }, -- snippets | ||||
| 				{ name = "buffer" }, -- text within current buffer | ||||
| 				{ name = "path" }, -- file system paths | ||||
|                 { name = 'nvim_lsp_signature_help' }, -- signature help | ||||
| 			}), | ||||
|  | ||||
| 			formatting = { | ||||
| 				fields = { "kind", "abbr", "menu" }, | ||||
| 				format = lspkind.cmp_format({ | ||||
| 					mode = "symbol", -- show only symbol annotations | ||||
| 					maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters) | ||||
| 					-- can also be a function to dynamically calculate max width such as | ||||
| 					-- maxwidth = function() return math.floor(0.45 * vim.o.columns) end, | ||||
| 					ellipsis_char = "…", -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first) | ||||
| 					show_labelDetails = true, -- show labelDetails in menu. Disabled by default | ||||
|  | ||||
| 					-- The function below will be called before any actual modifications from lspkind | ||||
| 					-- so that you can provide more controls on popup customization. (See [#30](https://github.com/onsails/lspkind-nvim/pull/30)) | ||||
| 					before = function(entry, vim_item) | ||||
| 						return vim_item | ||||
| 					end, | ||||
| 				}), | ||||
| 			}, | ||||
| 		}) | ||||
|  | ||||
| 		local opts = { silent = true } | ||||
| 		opts.desc = "next snippet placeholder" | ||||
| 		vim.keymap.set({ "i", "s" }, "<C-w>", function() | ||||
| 			luasnip.jump(1) | ||||
| 		end, opts) | ||||
|  | ||||
| 		opts.desc = "previous snippet placeholder" | ||||
| 		vim.keymap.set({ "i", "s" }, "<C-b>", function() | ||||
| 			luasnip.jump(-1) | ||||
| 		end, opts) | ||||
| 	end, | ||||
| } | ||||
| @@ -1,34 +0,0 @@ | ||||
| return { | ||||
|     -- colorizes colors in code | ||||
|     'NvChad/nvim-colorizer.lua' , | ||||
|     --cmd = 'ColorizerToggle', | ||||
|     config = function () | ||||
|         require("colorizer").setup { | ||||
|             filetypes = { "*" }, | ||||
|             user_default_options = { | ||||
|                 RGB = true, -- #RGB hex codes - #FCE | ||||
|                 RRGGBB = true, -- #RRGGBB hex codes - #F5C2E7 | ||||
|                 names = true, -- "Name" codes - lightpink | ||||
|                 RRGGBBAA = true, -- #RRGGBBAA hex codes - #F5C2E7CC | ||||
|                 AARRGGBB = true, -- 0xAARRGGBB hex codes - 0xCCF5C2E7 | ||||
|                 rgb_fn = true, -- CSS rgb() and rgba() functions - rgba(245,194,231,0.8) | ||||
|                 hsl_fn = true, -- CSS hsl() and hsla() functions - hsl(0.88,0.72,0.86) | ||||
|                 css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB | ||||
|                 css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn | ||||
|                 -- Available modes for `mode`: foreground, background,  virtualtext | ||||
|                 mode = "background", -- Set the display mode. | ||||
|                 -- Available methods are false / true / "normal" / "lsp" / "both" | ||||
|                 -- True is same as normal | ||||
|                 tailwind = false, -- Enable tailwind colors | ||||
|                 -- parsers can contain values used in |user_default_options| | ||||
|                 sass = { enable = false, parsers = { "css" }, }, -- Enable sass colors | ||||
|                 virtualtext = "■", | ||||
|                 -- update color values even if buffer is not focused | ||||
|                 -- example use: cmp_menu, cmp_docs | ||||
|                 always_update = false | ||||
|             }, | ||||
|             -- all the sub-options of filetypes apply to buftypes | ||||
|             buftypes = {}, | ||||
|         } | ||||
|     end, | ||||
| } | ||||
| @@ -1,139 +0,0 @@ | ||||
| return { | ||||
|     -- color theme | ||||
|     "EdenEast/nightfox.nvim", | ||||
|     lazy = false, | ||||
|     priority = 1000, | ||||
|     config = function() | ||||
|         local Shade = require("nightfox.lib.shade") | ||||
|         require("nightfox").setup({ | ||||
|             options = { | ||||
|                 transparent = true, | ||||
|                 styles = { | ||||
|                     comments = "italic", | ||||
|                     functions = "italic", | ||||
|                     keywords = "italic", | ||||
|                     types = "italic", | ||||
|                 } | ||||
|             }, | ||||
|             palettes = { | ||||
|                 all = { | ||||
|                     black   = Shade.new("#404944", 0.15, -0.15), | ||||
|                     gray    = Shade.new("#505050", 0.15, -0.15), | ||||
|                     white   = Shade.new("#dee4df", 0.15, -0.15), | ||||
|                     red     = Shade.new("#ff6060", 0.15, -0.15), | ||||
|                     darkred = Shade.new("#903030", 0.15, -0.15), | ||||
|                     strongred = Shade.new("#bb0000", 0.15, -0.15), | ||||
|                     orange  = Shade.new("#ce8c14", 0.15, -0.15), | ||||
|                     green   = Shade.new("#a3d397", 0.10, -0.15), | ||||
|                     darkgreen = Shade.new("#005602", 0.10, -0.15), | ||||
|                     darkyellow = Shade.new("#dfd100", 0.10, -0.15), | ||||
|                     yellow  = Shade.new("#e3c46d", 0.15, -0.15), | ||||
|                     darkblue = Shade.new("#1010aa", 0.15, -0.15), | ||||
|                     blue    = Shade.new("#7070dd", 0.15, -0.15), | ||||
|                     magenta = Shade.new("#C02490", 0.30, -0.15), | ||||
|                     pink    = Shade.new("#ff82c2", 0.15, -0.15), | ||||
|                     purple  = Shade.new("#761464", 0.15, -0.15), | ||||
|                     cyan    = Shade.new("#7ac9ff", 0.15, -0.15), | ||||
|                     lightblue = Shade.new("#5c77ff", 0.15, -0.15), | ||||
|                     softblue = Shade.new("#10ddff", 0.15, -0.15), | ||||
|                     brown = Shade.new("#553200", 0.15, -0.15), | ||||
|  | ||||
|                     bg0     = "#0f1512",                 -- Dark bg (status line and float) | ||||
|                     bg1     = "#0f1512",                 -- Default bg | ||||
|                     bg2     = "#1b211e",        -- Lighter bg (colorcolm folds) | ||||
|                     bg3     = "#252b28",    -- Lighter bg (cursor line) | ||||
|                     bg4     = "#303633", -- Conceal, border fg | ||||
|  | ||||
|                     fg0     = "#dee4df",               -- Lighter fg | ||||
|                     fg1     = "#dee4df",               -- Default fg | ||||
|                     fg2     = "#dee4df",               -- Darker fg (status line) | ||||
|                     fg3     = "#89938d",                 -- Darker fg (line numbers, fold colums) | ||||
|  | ||||
|                     sel0    = "#404944",          -- Popup bg, visual selection | ||||
|                     sel1    = "#00513b",        -- Popup sel bg, search bg | ||||
|  | ||||
|                     comment = "#89938d", | ||||
|                 }, | ||||
|             }, | ||||
|             specs = { | ||||
|                 carbonfox = { | ||||
|                     syntax = { | ||||
|                         comment = "comment", | ||||
|                         bracket = "darkyellow", | ||||
|                         builtin0 = "softblue", | ||||
|                         builtin1 = "sel0", | ||||
|                         builtin2 = "sel1", | ||||
|                         conditional = "darkblue", | ||||
|                         const = "gray", | ||||
|                         dep = "darkred", | ||||
|                         field = "green", | ||||
|                         func = "pink", | ||||
|                         ident = "darkgreen", | ||||
|                         keyword = "blue", | ||||
|                         number = "yellow", | ||||
|                         operator = "white", | ||||
|                         preproc = "strongred", | ||||
|                         regex = "purple", | ||||
|                         statement = "magenta", | ||||
|                         string = "cyan", | ||||
|                         type = "red", | ||||
|                         variable = "orange" | ||||
|                     }, | ||||
|                     diag = { | ||||
|                         error = "darkred", | ||||
|                         warn = "yellow", | ||||
|                         info = "lightblue", | ||||
|                         hint = "fg3", | ||||
|                         ok = "darkgreen", | ||||
|                     }, | ||||
|                     diag_bg = { | ||||
|                         error = "red", | ||||
|                         warn = "#a16b00", | ||||
|                         info = "cyan", | ||||
|                         hint = "bg3", | ||||
|                         ok = "green"; | ||||
|                     }, | ||||
|                     diff = { | ||||
|                         add = "darkgreen", | ||||
|                         delete = "darkred", | ||||
|                         changed = "lightblue", | ||||
|                         text = "fg0" | ||||
|                     }, | ||||
|                     git = { | ||||
|                         add = "darkgreen", | ||||
|                         removed = "darkred", | ||||
|                         changed = "lightblue", | ||||
|                         conflict = "orange", | ||||
|                         ignored = "gray" | ||||
|                     } | ||||
|                 } | ||||
|             }, | ||||
|             groups = { | ||||
|                 all = { | ||||
|                     Cursor                    = { fg = "palette.white", bg = "palette.lightblue" },                  -- character under the cursor | ||||
|                     WinSeparator              = { fg = "palette.bg2" },                                          -- the column separating vertically split windows | ||||
|                     EndOfBuffer               = { link = "WinSeparator" },                                       -- filler lines (~) after the end of the buffer.  By default, this is highlighted like |hl-NonText|. | ||||
|                     CursorLine                = { bg = "palette.bg1" }, | ||||
|                     CursorLineNr              = { fg = "palette.cyan", style = "bold" },                         -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line. | ||||
|                     Search                    = { fg = "palette.lightblue", bg = "#00513b" }, -- Last search pattern highlighting (see 'hlsearch').  Also used for similar items that need to stand out. | ||||
|                     IncSearch                 = { fg = "palette.lightblue", bg = "#1a6b51" },                  -- 'incsearch' highlighting; also used for the text replaced with ":s///c" | ||||
|                     ModeMsg                   = { fg = "palette.fg3", style = "bold" },                          -- 'showmode' message (e.g., "-- INSERT --") | ||||
|  | ||||
|                     NvimTreeRootFolder        = { fg = "palette.lightblue", style = "bold" }, | ||||
|                     NvimTreeFolderName        = { fg = "palette.lightblue" }, | ||||
|                     NvimTreeFolderIcon        = { fg = "palette.lightblue" }, | ||||
|                     NvimTreeOpenedFolderName  = { fg = "palette.lightblue" }, | ||||
|                     NvimTreeSymlinkFolderName = { fg = "palette.magenta" }, | ||||
|  | ||||
|                     NvimTreeExecFile          = { fg = "palette.red" }, | ||||
|                     NvimTreeImageFile         = { fg = "palette.white" }, | ||||
|                     NvimTreeSpecialFile       = { fg = "palette.yellow" }, | ||||
|                     NvimTreeSymlink           = { fg = "palette.magenta" }, | ||||
|                 }, | ||||
|             }, | ||||
|         }) | ||||
|         if not vim.g.vscode then | ||||
|             vim.cmd([[colorscheme carbonfox]]) | ||||
|         end | ||||
|     end, | ||||
| } | ||||
| @@ -1,61 +0,0 @@ | ||||
| return { | ||||
|     "LudoPinelli/comment-box.nvim", | ||||
|     config = function() | ||||
|         -- add custom commentstring to plugin source, since configuration is not yet supported | ||||
|         local function insertlang(lang, commentstring) | ||||
|             local filename = os.getenv("HOME") | ||||
|                 .. "/.local/share/nvim/lazy/comment-box.nvim/lua/comment-box/commentstrings.lua" | ||||
|             local file = io.open(filename, "r") | ||||
|             if not file then | ||||
|                 return | ||||
|             end | ||||
|  | ||||
|             local content = file:read("a") | ||||
|             if string.match(content, lang) then | ||||
|                 return | ||||
|             end | ||||
|  | ||||
|             local lines = {} | ||||
|             for line in content:gmatch("[^\r\n]+") do | ||||
|                 table.insert(lines, line) | ||||
|             end | ||||
|             file:close() | ||||
|  | ||||
|             table.insert(lines, 24, "  " .. lang .. ' = { "' .. commentstring .. '", "" },') | ||||
|  | ||||
|             file = io.open(filename, "w") | ||||
|             if not file then | ||||
|                 return | ||||
|             end | ||||
|  | ||||
|             file:write(table.concat(lines, "\n")) | ||||
|  | ||||
|             file:close() | ||||
|         end | ||||
|  | ||||
|         insertlang("hyprlang", "#%s") | ||||
|  | ||||
|         require("comment-box").setup({ | ||||
|             comment_style = "line", | ||||
|             doc_width = 70, | ||||
|             box_width = 50, | ||||
|             line_width = 70, | ||||
|         }) | ||||
|  | ||||
|         local opts = { silent = true } | ||||
|  | ||||
|         opts.desc = "comment text box" | ||||
|         vim.keymap.set({"n", "v"}, "<leader>cb", ":CBccbox<CR>", opts) | ||||
|         opts.desc = "comment text line" | ||||
|         vim.keymap.set({"n", "v"}, "<leader>cl", ":CBllline<CR>", opts) | ||||
|         opts.desc = "comment line" | ||||
|         vim.keymap.set({"n", "v"}, "<leader>ce", ":CBline<CR>", opts) | ||||
|         opts.desc = "comment highlight" | ||||
|         vim.keymap.set({"n", "v"}, "<leader>ch", ":CBlcbox18<CR>", opts) | ||||
|  | ||||
|         opts.desc = "delete comment box" | ||||
|         vim.keymap.set({"n", "v"}, "<leader>cd", ":CBd<CR>", opts) | ||||
|         opts.desc = "yank comment box contents" | ||||
|         vim.keymap.set({"n", "v"}, "<leader>cy", ":CBy<CR>", opts) | ||||
|     end, | ||||
| } | ||||
| @@ -1,10 +0,0 @@ | ||||
| return { | ||||
|     -- add comment keybinds | ||||
|     'numToStr/Comment.nvim', | ||||
|     opts = {}, | ||||
|     lazy = false, | ||||
|     config = function() | ||||
|         require('Comment').setup() | ||||
|         require('Comment.ft').set('hyprlang', '#%s') | ||||
|     end | ||||
| } | ||||
| @@ -1,4 +0,0 @@ | ||||
| return { | ||||
|     -- similar to sticky scroll in vscode | ||||
|     "nvim-treesitter/nvim-treesitter-context", | ||||
| } | ||||
| @@ -1,103 +0,0 @@ | ||||
| return { | ||||
|     "mfussenegger/nvim-dap", | ||||
|     dependencies = { | ||||
|         { "nvim-neotest/nvim-nio" }, | ||||
|         { "rcarriga/nvim-dap-ui" }, | ||||
|         { "theHamsta/nvim-dap-virtual-text" }, | ||||
|         { "nvim-telescope/telescope-dap.nvim" }, | ||||
|     }, | ||||
|     -- stylua: ignore | ||||
|     keys = { | ||||
|         { "<leader>bR", function() require("dap").run_to_cursor() end,                               desc = "Run to Cursor", }, | ||||
|         { "<leader>bE", function() require("dapui").eval(vim.fn.input "[Expression] > ") end,        desc = "Evaluate Input", }, | ||||
|         { "<leader>bC", function() require("dap").set_breakpoint(vim.fn.input "[Condition] > ") end, desc = "Conditional Breakpoint", }, | ||||
|         { "<leader>bU", function() require("dapui").toggle() end,                                    desc = "Toggle UI", }, | ||||
|         { "<leader>bb", function() require("dap").step_back() end,                                   desc = "Step Back", }, | ||||
|         { "<leader>bc", function() require("dap").continue() end,                                    desc = "Continue", }, | ||||
|         { "<leader>bd", function() require("dap").disconnect() end,                                  desc = "Disconnect", }, | ||||
|         { "<leader>be", function() require("dapui").eval() end,                                      desc = "Evaluate", }, | ||||
|         { "<leader>bg", function() require("dap").session() end,                                     desc = "Get Session", }, | ||||
|         { "<leader>bh", function() require("dap.ui.widgets").hover() end,                            desc = "Hover Variables", }, | ||||
|         { "<leader>bS", function() require("dap.ui.widgets").scopes() end,                           desc = "Scopes", }, | ||||
|         { "<leader>bi", function() require("dap").step_into() end,                                   desc = "Step Into", }, | ||||
|         { "<leader>bo", function() require("dap").step_over() end,                                   desc = "Step Over", }, | ||||
|         { "<leader>bp", function() require("dap").pause.toggle() end,                                desc = "Pause", }, | ||||
|         { "<leader>bq", function() require("dap").close() end,                                       desc = "Quit", }, | ||||
|         { "<leader>br", function() require("dap").repl.toggle() end,                                 desc = "Toggle REPL", }, | ||||
|         { "<leader>bs", function() require("dap").continue() end,                                    desc = "Start", }, | ||||
|         { "<leader>bt", function() require("dap").toggle_breakpoint() end,                           desc = "Toggle Breakpoint", }, | ||||
|         { "<leader>bx", function() require("dap").terminate() end,                                   desc = "Terminate", }, | ||||
|         { "<leader>bu", function() require("dap").step_out() end,                                    desc = "Step Out", }, | ||||
|     }, | ||||
|     config = function() | ||||
|         require("nvim-dap-virtual-text").setup({ | ||||
|             commented = true, | ||||
|         }) | ||||
|  | ||||
|         local dap, dapui = require("dap"), require("dapui") | ||||
|         dapui.setup({}) | ||||
|  | ||||
|         dap.listeners.after.event_initialized["dapui_config"] = function() | ||||
|             dapui.open() | ||||
|         end | ||||
|         dap.listeners.before.event_terminated["dapui_config"] = function() | ||||
|             dapui.close() | ||||
|         end | ||||
|         dap.listeners.before.event_exited["dapui_config"] = function() | ||||
|             dapui.close() | ||||
|         end | ||||
|  | ||||
|         vim.fn.sign_define("DapBreakpoint", { text = "●", texthl = "DapBreakpoint", linehl = "", numhl = ""}) | ||||
|         vim.fn.sign_define("DapBreakpointCondition", { text = "●", texthl = "DapBreakpointCondition", linehl = "", numhl = ""}) | ||||
|         vim.fn.sign_define("DapLogPoint", { text = "◆", texthl = "DapLogPoint", linehl = "", numhl = ""}) | ||||
|         vim.fn.sign_define('DapStopped', { text='', texthl='DapStopped', linehl='DapStopped', numhl= 'DapStopped' }) | ||||
|  | ||||
|         dap.configurations.python = { | ||||
|             { | ||||
|                 type = "python", | ||||
|                 request = "launch", | ||||
|                 name = "Launch file", | ||||
|  | ||||
|                 -- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options | ||||
|  | ||||
|                 program = "${file}", -- This configuration will launch the current file if used. | ||||
|                 pythonPath = function() | ||||
|                     local cwd = vim.fn.getcwd() | ||||
|                     if vim.fn.executable(cwd .. "/venv/bin/python") == 1 then | ||||
|                         return cwd .. "/venv/bin/python" | ||||
|                     elseif vim.fn.executable(cwd .. "/.venv/bin/python") == 1 then | ||||
|                         return cwd .. "/.venv/bin/python" | ||||
|                     else | ||||
|                         return "/usr/bin/python" | ||||
|                     end | ||||
|                 end, | ||||
|             }, | ||||
|         } | ||||
|  | ||||
|         dap.adapters.python = function(cb, config) | ||||
|             if config.request == "attach" then | ||||
|                 ---@diagnostic disable-next-line: undefined-field | ||||
|                 local port = (config.connect or config).port | ||||
|                 ---@diagnostic disable-next-line: undefined-field | ||||
|                 local host = (config.connect or config).host or "127.0.0.1" | ||||
|                 cb({ | ||||
|                     type = "server", | ||||
|                     port = assert(port, "`connect.port` is required for a python `attach` configuration"), | ||||
|                     host = host, | ||||
|                     options = { | ||||
|                         source_filetype = "python", | ||||
|                     }, | ||||
|                 }) | ||||
|             else | ||||
|                 cb({ | ||||
|                     type = "executable", | ||||
|                     command = vim.fn.stdpath("data") .. '/mason/packages/debugpy/venv/bin/python', | ||||
|                     args = { "-m", "debugpy.adapter" }, | ||||
|                     options = { | ||||
|                         source_filetype = "python", | ||||
|                     }, | ||||
|                 }) | ||||
|             end | ||||
|         end | ||||
|     end, | ||||
| } | ||||
| @@ -1,5 +0,0 @@ | ||||
| return { | ||||
|     -- prettier prompts | ||||
|     'stevearc/dressing.nvim', | ||||
|     event = 'VeryLazy', | ||||
| } | ||||
| @@ -1,14 +0,0 @@ | ||||
| return { | ||||
|     -- notifications && lsp progress msgs | ||||
|     "j-hui/fidget.nvim", | ||||
|     config = function() | ||||
|         require("fidget").setup({ | ||||
|             notification = { | ||||
|                 window = { | ||||
|                     winblend = 0, | ||||
|                 } | ||||
|             } | ||||
|         }) | ||||
|     end | ||||
|  | ||||
| } | ||||
| @@ -1,12 +0,0 @@ | ||||
| return { | ||||
|     "kikofmas/grammarous.nvim", | ||||
|     config = function () | ||||
|         local keymap = vim.keymap | ||||
|         local opts = require('utils').opts | ||||
|  | ||||
|         keymap.set('n', '<leader>sl', ':GrammarousCheck<CR>', opts('LanguageTool Spell Checker')) | ||||
|         keymap.set('n', '<leader>sc', ':GrammarousCheck --comments-only<CR>', opts('LanguageTool Spell Checker, only comments')) | ||||
|         keymap.set('n', '<leader>ss', ':set spell<CR>', opts('Start built-in spell checker')) | ||||
|         keymap.set('n', '<leader>sn', ':set nospell<CR>', opts('Stop spell checker')) | ||||
|     end | ||||
| } | ||||
| @@ -1,9 +0,0 @@ | ||||
| return { | ||||
|     -- indent lines | ||||
|     'lukas-reineke/indent-blankline.nvim', | ||||
|     opts = {}, | ||||
|     main = 'ibl', | ||||
|     config = function() | ||||
|         require('ibl').setup() | ||||
|     end | ||||
| } | ||||
| @@ -1,7 +0,0 @@ | ||||
| return { | ||||
|     -- open file at previous position | ||||
|     'ethanholz/nvim-lastplace', | ||||
|     config = function() | ||||
|         require('nvim-lastplace').setup{} | ||||
|     end, | ||||
| } | ||||
| @@ -1,16 +0,0 @@ | ||||
| return { | ||||
| 	---------- for lsp diagnostic lines ---------- | ||||
| 	"https://git.sr.ht/~whynothugo/lsp_lines.nvim", | ||||
| 	event = "LspAttach", | ||||
| 	config = function() | ||||
| 		require("lsp_lines").setup() | ||||
| 		vim.diagnostic.config({ virtual_lines = false }) | ||||
|  | ||||
|         local lsplines = false | ||||
| 		vim.keymap.set("n", "<Leader>L", function () | ||||
|             lsplines = not lsplines | ||||
|             vim.diagnostic.config({ virtual_text = not lsplines }) | ||||
|             vim.diagnostic.config({ virtual_lines = lsplines }) | ||||
| 		end, { desc = "Toggle lsp_lines" }) | ||||
| 	end, | ||||
| } | ||||
| @@ -1,189 +0,0 @@ | ||||
| return { | ||||
|     -- lsp configuration | ||||
|     "neovim/nvim-lspconfig", | ||||
|     event = { "BufReadPre", "BufNewFile" }, | ||||
|     dependencies = { | ||||
|         "hrsh7th/cmp-nvim-lsp", | ||||
|         { "antosha417/nvim-lsp-file-operations", config = true }, | ||||
|         -- "mfussenegger/nvim-jdtls", | ||||
|         "nvim-java/nvim-java" | ||||
|     }, | ||||
|     config = function() | ||||
|         require('java').setup() | ||||
|         -- import lspconfig plugin | ||||
|         local lspconfig = require("lspconfig") | ||||
|  | ||||
|         -- import cmp-nvim-lsp plugin | ||||
|         local cmp_nvim_lsp = require("cmp_nvim_lsp") | ||||
|  | ||||
|         local keymap = vim.keymap | ||||
|  | ||||
|         local opts = { silent = true } | ||||
|  | ||||
|         local on_attach = function(client, bufnr) | ||||
|             opts.buffer = bufnr | ||||
|  | ||||
|             -- set keybinds | ||||
|             opts.desc = "Show LSP references" | ||||
|             keymap.set("n", "gR", "<cmd>Telescope lsp_references<CR>", opts) | ||||
|  | ||||
|             opts.desc = "Go to declaration" | ||||
|             keymap.set("n", "gD", ":lua vim.lsp.buf.declaration", opts) | ||||
|  | ||||
|             opts.desc = "Show LSP definitions" | ||||
|             keymap.set("n", "gd", "<cmd>Telescope lsp_definitions<CR>", opts) | ||||
|  | ||||
|             opts.desc = "Show LSP implementations" | ||||
|             keymap.set("n", "gi", "<cmd>Telescope lsp_implementations<CR>", opts) | ||||
|  | ||||
|             opts.desc = "Show LSP type definitions" | ||||
|             keymap.set("n", "gt", "<cmd>Telescope lsp_type_definitions<CR>", opts) | ||||
|  | ||||
|             opts.desc = "See available code actions" | ||||
|             keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, opts) | ||||
|  | ||||
|             opts.desc = "Format current file" | ||||
|             keymap.set("n", "<leader>gf", vim.lsp.buf.format, opts) | ||||
|  | ||||
|             opts.desc = "Smart rename" | ||||
|             keymap.set("n", "<leader>n", vim.lsp.buf.rename, opts) | ||||
|  | ||||
|             opts.desc = "Show buffer diagnostics" | ||||
|             keymap.set("n", "ga", "<cmd>Telescope diagnostics bufnr=0<CR>", opts) | ||||
|  | ||||
|             opts.desc = "Show line diagnostics" | ||||
|             keymap.set("n", "gA", ":lua vim.diagnostic.open_float()<CR>", opts) | ||||
|  | ||||
|             opts.desc = "Go to previous diagnostic" | ||||
|             keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) | ||||
|  | ||||
|             opts.desc = "Go to next diagnostic" | ||||
|             keymap.set("n", "]d", vim.diagnostic.goto_next, opts) | ||||
|  | ||||
|             opts.desc = "Show documentation for what is under cursor" | ||||
|             keymap.set("n", "<leader>k", vim.lsp.buf.hover, opts) | ||||
|  | ||||
|             opts.desc = "Restart LSP" | ||||
|             keymap.set("n", "<leader>rs", ":LspRestart<CR>", opts) | ||||
|  | ||||
|             vim.opt.signcolumn = "yes" -- reserve space for diagnostics | ||||
|         end | ||||
|  | ||||
|         -- used to enable autocompletion (assign to every lsp server config) | ||||
|         -- local capabilities = cmp_nvim_lsp.default_capabilities() | ||||
|         local capabilities = vim.lsp.protocol.make_client_capabilities() | ||||
|         capabilities.textDocument.completion.completionItem.snippetSupport = true | ||||
|  | ||||
|         -- Change the Diagnostic symbols in the sign column (gutter) | ||||
|         local signs = { Error = " ", Warn = " ", Hint = "", Info = " " } | ||||
|         for type, icon in pairs(signs) do | ||||
|             local hl = "DiagnosticSign" .. type | ||||
|             vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" }) | ||||
|         end | ||||
|  | ||||
|         lspconfig.bashls.setup({ | ||||
|             capabilities = capabilities, | ||||
|             on_attach = on_attach, | ||||
|         }) | ||||
|  | ||||
|         lspconfig.clangd.setup({ | ||||
|             cmd = { | ||||
|                 "clangd", | ||||
|                 "--suggest-missing-includes", | ||||
|                 "--clang-tidy", | ||||
|             }, | ||||
|             filetypes = { "c", "cpp", "objc", "objcpp", "cuda", "proto", "ino" }, | ||||
|             capabilities = capabilities, | ||||
|             on_attach = on_attach, | ||||
|         }) | ||||
|  | ||||
|         lspconfig.cssls.setup({ | ||||
|             capabilities = capabilities, | ||||
|             on_attach = on_attach, | ||||
|         }) | ||||
|  | ||||
|         lspconfig.html.setup({ | ||||
|             capabilities = capabilities, | ||||
|             on_attach = on_attach, | ||||
|         }) | ||||
|  | ||||
|         lspconfig.lua_ls.setup({ | ||||
|             capabilities = capabilities, | ||||
|             on_attach = on_attach, | ||||
|             settings = { | ||||
|                 Lua = { | ||||
|                     -- make the language server recognize "vim" global | ||||
|                     diagnostics = { | ||||
|                         globals = { "vim" }, | ||||
|                     }, | ||||
|                     workspace = { | ||||
|                         -- make language server aware of runtime files | ||||
|                         library = { | ||||
|                             [vim.fn.expand("$VIMRUNTIME/lua")] = true, | ||||
|                             [vim.fn.stdpath("config") .. "/lua"] = true, | ||||
|                         }, | ||||
|                     }, | ||||
|                 }, | ||||
|             }, | ||||
|         }) | ||||
|  | ||||
|         lspconfig.pyright.setup({ | ||||
|             capabilities = capabilities, | ||||
|             on_attach = on_attach, | ||||
|         }) | ||||
|  | ||||
|         local java_on_attach = function(client, bufnr) | ||||
|             on_attach(client, bufnr) | ||||
|  | ||||
|             opts.buffer = bufnr | ||||
|             -- Keybinds for testing, refactoring, java specific | ||||
|             opts.desc = "Java profiling" | ||||
|             keymap.set("n", "<leader>jp", ":JavaProfile<CR>", opts) | ||||
|  | ||||
|             opts.desc = "Java Refactor: Extract Variable (create variable from cursor)" | ||||
|             keymap.set("n", "<leader>jev", ":JavaExtractVariable<CR>", opts) | ||||
|  | ||||
|             opts.desc = "Java Refactor: Extract Variable all occurrences (create variable from cursor)" | ||||
|             keymap.set("n", "<leader>jea", ":JavaExtractVariableAllOccurrence<CR>", opts) | ||||
|  | ||||
|             opts.desc = "Java Refactor: Extract Const (create const from cursor)" | ||||
|             keymap.set("n", "<leader>jec", ":JavaExtractConst<CR>", opts) | ||||
|  | ||||
|             opts.desc = "Java Refactor: Extract Method (create method from cursor)" | ||||
|             keymap.set("n", "<leader>jev", ":JavaExtractMethod<CR>", opts) | ||||
|  | ||||
|             opts.desc = "Java Refactor: Extract Field (create field from cursor)" | ||||
|             keymap.set("n", "<leader>jev", ":JavaExtractField<CR>", opts) | ||||
|  | ||||
|             -- Java testing, Debugging | ||||
|             opts.desc = "Java Testing: Run test class in buffer" | ||||
|             keymap.set("n", "<leader>jtc", ":JavaTestRunCurrentClass<CR>", opts) | ||||
|  | ||||
|             opts.desc = "Java Testing: Debug test class in buffer" | ||||
|             keymap.set("n", "<leader>jdc", ":JavaTestDebugCurrentClass<CR>", opts) | ||||
|  | ||||
|             opts.desc = "Java Testing: Run current method in buffer" | ||||
|             keymap.set("n", "<leader>jtm", ":JavaTestRunCurrentMethod<CR>", opts) | ||||
|  | ||||
|             opts.desc = "Java Testing: Debug current method in buffer" | ||||
|             keymap.set("n", "<leader>jdm", ":JavaTestDebugCurrentMethod<CR>", opts) | ||||
|  | ||||
|             opts.desc = "Java Testing: View last report" | ||||
|             keymap.set("n", "<leader>jtv", ":JavaTestViewLastReport<CR>", opts) | ||||
|         end | ||||
|  | ||||
|         lspconfig.jdtls.setup({ | ||||
|             capabilities = capabilities, | ||||
|             on_attach = java_on_attach, | ||||
|         }) | ||||
|  | ||||
|         lspconfig.texlab.setup{ | ||||
|             cmd = { "texlab" }, | ||||
|             filetypes = { "tex", "latex", "bib" }, | ||||
|             root_dir = function(fname) | ||||
|                 return vim.loop.cwd() | ||||
|             end, | ||||
|         } | ||||
|  | ||||
|     end, | ||||
| } | ||||
| @@ -1,55 +0,0 @@ | ||||
| return { | ||||
|     -- status line | ||||
|     'nvim-lualine/lualine.nvim', | ||||
|     dependencies = { 'nvim-tree/nvim-web-devicons' }, | ||||
|     config = function() | ||||
|         local function getWords() | ||||
|             local wc = vim.api.nvim_eval("wordcount()") | ||||
|             if wc["visual_words"] then | ||||
|                 return wc["visual_words"] | ||||
|             else | ||||
|                 return wc["words"] | ||||
|             end | ||||
|         end | ||||
|         require('lualine').setup { | ||||
|             options = { | ||||
|                 icons_enabled = true, | ||||
|                 theme = "auto", | ||||
|                 component_separators = { left = '', right = ''}, | ||||
|                 section_separators = { left = '', right = ''}, | ||||
|                 disabled_filetypes = { | ||||
|                     statusline = {}, | ||||
|                     winbar = {}, | ||||
|                 }, | ||||
|                 ignore_focus = { 'NvimTree' }, | ||||
|                 always_divide_middle = true, | ||||
|                 globalstatus = false, | ||||
|                 refresh = { | ||||
|                     statusline = 1000, | ||||
|                     tabline = 1000, | ||||
|                     winbar = 1000, | ||||
|                 } | ||||
|             }, | ||||
|             sections = { | ||||
|                 lualine_a = { { 'mode', separator = { left = '', right = '' }, } }, | ||||
|                 lualine_b = {'branch', 'diff', 'diagnostics'}, | ||||
|                 lualine_c = {'filename'}, | ||||
|                 lualine_x = { getWords, 'encoding', 'fileformat', 'filetype'}, | ||||
|                 lualine_y = { { 'progress', left_padding=0 } }, | ||||
|                 lualine_z = { { 'location', separator = { left = '', right = '' }, padding=0} } | ||||
|             }, | ||||
|             inactive_sections = { | ||||
|                 lualine_a = {}, | ||||
|                 lualine_b = {}, | ||||
|                 lualine_c = {'filename'}, | ||||
|                 lualine_x = {'location'}, | ||||
|                 lualine_y = {}, | ||||
|                 lualine_z = {} | ||||
|             }, | ||||
|             tabline = {}, | ||||
|             winbar = {}, | ||||
|             inactive_winbar = {}, | ||||
|             extensions = {} | ||||
|         } | ||||
|     end, | ||||
| } | ||||
| @@ -1,12 +0,0 @@ | ||||
| return { | ||||
|     'L3MON4D3/LuaSnip', | ||||
|     -- config = function() | ||||
|     --     local luasnip = require('luasnip') | ||||
|     --     -- luasnip.setup({ | ||||
|     --     --     region_check_events = "CursorMoved", | ||||
|     --     --     delete_check_events = "TextChanged", | ||||
|     --     -- }) | ||||
|     -- | ||||
|     --     require("luasnip.loaders.from_vscode").load({paths = "~/.config/nvim/my_snippets"}) | ||||
|     -- end | ||||
| } | ||||
| @@ -1,17 +0,0 @@ | ||||
| return { | ||||
|     -- literally the name, previews md in browser | ||||
|     "iamcco/markdown-preview.nvim", | ||||
|     cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" }, | ||||
|     ft = { "markdown" }, | ||||
|     build = function(plugin) | ||||
|       if vim.fn.executable "npx" then | ||||
|         vim.cmd("!cd " .. plugin.dir .. " && cd app && npx --yes yarn install") | ||||
|       else | ||||
|         vim.cmd [[Lazy load markdown-preview.nvim]] | ||||
|         vim.fn["mkdp#util#install"]() | ||||
|       end | ||||
|     end, | ||||
|     init = function() | ||||
|       if vim.fn.executable "npx" then vim.g.mkdp_filetypes = { "markdown" } end | ||||
|     end, | ||||
| } | ||||
| @@ -1,41 +0,0 @@ | ||||
| return { | ||||
|     -- lsp package manager | ||||
|     "williamboman/mason.nvim", | ||||
|     dependencies = { | ||||
|         "williamboman/mason-lspconfig.nvim", | ||||
|     }, | ||||
|     config = function() | ||||
|         -- import mason | ||||
|         local mason = require("mason") | ||||
|  | ||||
|         -- import mason-lspconfig | ||||
|         local mason_lspconfig = require("mason-lspconfig") | ||||
|  | ||||
|         -- enable mason and configure icons | ||||
|         mason.setup({ | ||||
|             ui = { | ||||
|                 icons = { | ||||
|                     package_installed = "✔", | ||||
|                     package_pending = "➜", | ||||
|                     package_uninstalled = "✗", | ||||
|                 }, | ||||
|             }, | ||||
|         }) | ||||
|  | ||||
|         mason_lspconfig.setup({ | ||||
|             -- list of servers for mason to install | ||||
|             ensure_installed = { | ||||
|                 -- "bashls", | ||||
|                 -- "clangd", | ||||
|                 -- "cssls", | ||||
|                 -- "jdtls", | ||||
|                 -- "lua_ls", | ||||
|                 -- "pyright", | ||||
|                 -- "tsserver", | ||||
|                 "volar" | ||||
|             }, | ||||
|             -- auto-install configured servers (with lspconfig) | ||||
|             automatic_installation = true, | ||||
|         }) | ||||
|     end, | ||||
| } | ||||
| @@ -1,17 +0,0 @@ | ||||
| return { | ||||
|     "smoka7/multicursors.nvim", | ||||
|     event = "VeryLazy", | ||||
|     dependencies = { | ||||
|         'nvimtools/hydra.nvim', | ||||
|     }, | ||||
|     opts = {}, | ||||
|     cmd = { 'MCstart', 'MCvisual', 'MCclear', 'MCpattern', 'MCvisualPattern', 'MCunderCursor' }, | ||||
|     keys = { | ||||
|             { | ||||
|                 mode = { 'v', 'n' }, | ||||
|                 '<leader><leader>c', | ||||
|                 '<cmd>MCstart<cr>', | ||||
|                 desc = 'Create a selection for selected text or word under the cursor', | ||||
|             }, | ||||
|         }, | ||||
| } | ||||
| @@ -1,146 +0,0 @@ | ||||
| return { | ||||
|     "SmiteshP/nvim-navbuddy", | ||||
|     dependencies = { | ||||
|         "SmiteshP/nvim-navic", | ||||
|         "MunifTanjim/nui.nvim", | ||||
|     }, | ||||
|     opts = { lsp = { auto_attach = true } }, | ||||
|     config = function() | ||||
|         local actions = require("nvim-navbuddy.actions") | ||||
|         require("nvim-navbuddy").setup({ | ||||
|             window = { | ||||
|                 border = "rounded", -- "rounded", "double", "solid", "none" | ||||
|                 -- or an array with eight chars building up the border in a clockwise fashion | ||||
|                 -- starting with the top-left corner. eg: { "╔", "═" ,"╗", "║", "╝", "═", "╚", "║" }. | ||||
|                 size = "60%", -- Or table format example: { height = "40%", width = "100%"} | ||||
|                 position = "50%", -- Or table format example: { row = "100%", col = "0%"} | ||||
|                 scrolloff = nil, -- scrolloff value within navbuddy window | ||||
|                 sections = { | ||||
|                     left = { | ||||
|                         size = "20%", | ||||
|                         border = nil, -- You can set border style for each section individually as well. | ||||
|                     }, | ||||
|                     mid = { | ||||
|                         size = "40%", | ||||
|                         border = nil, | ||||
|                     }, | ||||
|                     right = { | ||||
|                         -- No size option for right most section. It fills to | ||||
|                         -- remaining area. | ||||
|                         border = nil, | ||||
|                         preview = "leaf", -- Right section can show previews too. | ||||
|                         -- Options: "leaf", "always" or "never" | ||||
|                     }, | ||||
|                 }, | ||||
|             }, | ||||
|             node_markers = { | ||||
|                 enabled = true, | ||||
|                 icons = { | ||||
|                     leaf = "  ", | ||||
|                     leaf_selected = " → ", | ||||
|                     branch = " ", | ||||
|                 }, | ||||
|             }, | ||||
|             icons = { | ||||
|                 File = " ", | ||||
|                 Module = " ", | ||||
|                 Namespace = " ", | ||||
|                 Package = " ", | ||||
|                 Class = " ", | ||||
|                 Method = " ", | ||||
|                 Property = " ", | ||||
|                 Field = " ", | ||||
|                 Constructor = " ", | ||||
|                 Enum = "", | ||||
|                 Interface = "", | ||||
|                 Function = " ", | ||||
|                 Variable = " ", | ||||
|                 Constant = " ", | ||||
|                 String = " ", | ||||
|                 Number = " ", | ||||
|                 Boolean = "◩ ", | ||||
|                 Array = " ", | ||||
|                 Object = " ", | ||||
|                 Key = " ", | ||||
|                 Null = " ", | ||||
|                 EnumMember = " ", | ||||
|                 Struct = " ", | ||||
|                 Event = " ", | ||||
|                 Operator = " ", | ||||
|                 TypeParameter = " ", | ||||
|             }, | ||||
|             use_default_mappings = true, -- If set to false, only mappings set | ||||
|             -- by user are set. Else default | ||||
|             -- mappings are used for keys | ||||
|             -- that are not set by user | ||||
|             mappings = { | ||||
|                 ["<esc>"] = actions.close(), -- Close and cursor to original location | ||||
|                 ["q"] = actions.close(), | ||||
|  | ||||
|                 ["j"] = actions.next_sibling(), -- down | ||||
|                 ["k"] = actions.previous_sibling(), -- up | ||||
|  | ||||
|                 ["h"] = actions.parent(), -- Move to left panel | ||||
|                 ["l"] = actions.children(), -- Move to right panel | ||||
|                 ["0"] = actions.root(), -- Move to first panel | ||||
|  | ||||
|                 ["<C-S-v>"] = actions.visual_name(), -- Visual selection of name | ||||
|                 ["<C-S-V>"] = actions.visual_scope(), -- Visual selection of scope | ||||
|  | ||||
|                 ["y"] = actions.yank_name(), -- Yank the name to system clipboard "+ | ||||
|                 ["Y"] = actions.yank_scope(), -- Yank the scope to system clipboard "+ | ||||
|  | ||||
|                 ["i"] = actions.insert_name(), -- Insert at start of name | ||||
|                 ["I"] = actions.insert_scope(), -- Insert at start of scope | ||||
|  | ||||
|                 ["a"] = actions.append_name(), -- Insert at end of name | ||||
|                 ["A"] = actions.append_scope(), -- Insert at end of scope | ||||
|  | ||||
|                 ["r"] = actions.rename(), -- Rename currently focused symbol | ||||
|  | ||||
|                 ["d"] = actions.delete(), -- Delete scope | ||||
|  | ||||
|                 ["f"] = actions.fold_create(), -- Create fold of current scope | ||||
|                 ["F"] = actions.fold_delete(), -- Delete fold of current scope | ||||
|  | ||||
|                 ["c"] = actions.comment(), -- Comment out current scope | ||||
|  | ||||
|                 ["<enter>"] = actions.select(), -- Goto selected symbol | ||||
|                 ["o"] = actions.select(), | ||||
|  | ||||
|                 ["J"] = actions.move_down(), -- Move focused node down | ||||
|                 ["K"] = actions.move_up(), -- Move focused node up | ||||
|  | ||||
|                 ["s"] = actions.toggle_preview(), -- Show preview of current node | ||||
|  | ||||
|                 ["<C-v>"] = actions.vsplit(), -- Open selected node in a vertical split | ||||
|                 ["<C-s>"] = actions.hsplit(), -- Open selected node in a horizontal split | ||||
|  | ||||
|                 ["t"] = actions.telescope({ -- Fuzzy finder at current level. | ||||
|                     layout_config = { -- All options that can be | ||||
|                         height = 0.60, -- passed to telescope.nvim's | ||||
|                         width = 0.60, -- default can be passed here. | ||||
|                         prompt_position = "top", | ||||
|                         preview_width = 0.50, | ||||
|                     }, | ||||
|                     layout_strategy = "horizontal", | ||||
|                 }), | ||||
|  | ||||
|                 ["g?"] = actions.help(), -- Open mappings help window | ||||
|             }, | ||||
|             lsp = { | ||||
|                 auto_attach = true, -- If set to true, you don't need to manually use attach function | ||||
|                 preference = nil, -- list of lsp server names in order of preference | ||||
|             }, | ||||
|             source_buffer = { | ||||
|                 follow_node = true, -- Keep the current node in focus on the source buffer | ||||
|                 highlight = true, -- Highlight the currently focused node | ||||
|                 reorient = "smart", -- "smart", "top", "mid" or "none" | ||||
|                 scrolloff = nil, -- scrolloff value when navbuddy is open | ||||
|             }, | ||||
|             custom_hl_group = nil, -- "Visual" or any other hl group to use instead of inverted colors | ||||
|         }) | ||||
|  | ||||
|         vim.keymap.set("n", "<leader>n", ":Navbuddy<CR>", { silent = true, desc = "open navbuddy menu" }) | ||||
|     end, | ||||
| } | ||||
| @@ -1,70 +0,0 @@ | ||||
| -- plugins/neotest_config.lua | ||||
| return { | ||||
| 	-- Load neotest | ||||
| 	{ | ||||
| 		"nvim-neotest/neotest", | ||||
| 		dependencies = { | ||||
| 			-- For JavaScript, TypeScript (Vite) | ||||
| 			"marilari88/neotest-vitest", | ||||
| 			-- For Python | ||||
| 			"nvim-neotest/neotest-python", | ||||
| 			-- For C, C++, Rust | ||||
| 			"orjangj/neotest-ctest", | ||||
| 			"rouge8/neotest-rust", | ||||
| 		}, | ||||
| 		config = function() | ||||
| 			local neotest = require("neotest") | ||||
| 			local keymap = vim.keymap.set | ||||
|  | ||||
| 			-- General setup for neotest | ||||
| 			neotest.setup({ | ||||
| 				adapters = { | ||||
| 					-- Vite Adapter for JavaScript/TypeScript | ||||
| 					require("neotest-vitest"), | ||||
| 					-- Python Adapter | ||||
| 					require("neotest-python"), | ||||
| 					-- C/C++ Adapter | ||||
| 					require("neotest-ctest"), | ||||
| 					-- Rust Adapter | ||||
| 					require("neotest-rust"), | ||||
| 				}, | ||||
| 			}) | ||||
|  | ||||
| 			-- Keybinding Setup | ||||
| 			local opts = { noremap = true, silent = true } | ||||
|  | ||||
| 			-- Run nearest test | ||||
|             opts.desc = "Run nearest test" | ||||
| 			keymap("n", "<leader><leader>tr", '<cmd>lua require("neotest").run.run()<cr>', opts) | ||||
|  | ||||
| 			-- Run all tests in the current file | ||||
|             opts.desc = "Run all tests in current file" | ||||
| 			keymap("n", "<leader><leader>tf", '<cmd>lua require("neotest").run.run(vim.fn.expand("%"))', opts) | ||||
|  | ||||
| 			-- Run all tests in the entire project | ||||
|             opts.desc = "Run all tests in project" | ||||
| 			keymap("n", "<leader><leader>ta", "<cmd>Neotest run<cr>", opts) | ||||
|  | ||||
| 			-- Stop running tests | ||||
|             opts.desc = "Stop tests" | ||||
| 			keymap("n", "<leader><leader>ts", "<cmd>Neotest stop<cr>", opts) | ||||
|  | ||||
|             opts.desc = "Jump to next test" | ||||
| 			keymap("n", "<leader><leader>tn", "<cmd>Neotest jump next<cr>", opts) | ||||
|  | ||||
|             opts.desc = "Jump to previous test" | ||||
| 			keymap("n", "<leader><leader>tp", "<cmd>Neotest jump prev<cr>", opts) | ||||
|  | ||||
| 			-- Show test summary | ||||
|             opts.desc = "Show neotest test summary" | ||||
| 			keymap("n", "<leader><leader>tv", "<cmd>Neotest summary<cr>", opts) | ||||
|  | ||||
| 			-- Toggle the Neotest panel | ||||
|             opts.desc = "Show neotest output" | ||||
| 			keymap("n", "<leader><leader>to", "<cmd>Neotest output<cr>", opts) | ||||
|  | ||||
|             opts.desc = "Show neotest output as panel" | ||||
| 			keymap("n", "<leader><leader>tn", "<cmd>Neotest output-panel<cr>", opts) | ||||
| 		end, | ||||
| 	}, | ||||
| } | ||||
| @@ -1,15 +0,0 @@ | ||||
| return { | ||||
|     "nvimtools/none-ls.nvim", | ||||
|     config = function() | ||||
|         local null_ls = require("null-ls") | ||||
|  | ||||
|         null_ls.setup({ | ||||
|             sources = { | ||||
|                 null_ls.builtins.formatting.stylua, | ||||
|                 null_ls.builtins.formatting.prettier, | ||||
|                 null_ls.builtins.formatting.shfmt, | ||||
|                 null_ls.builtins.formatting.black, | ||||
|             }, | ||||
|         }) | ||||
|     end, | ||||
| } | ||||
| @@ -1,24 +0,0 @@ | ||||
| return { | ||||
|     "nvim-tree/nvim-tree.lua", | ||||
|     version = "*", | ||||
|     lazy = false, | ||||
|     dependencies = { | ||||
|         "nvim-tree/nvim-web-devicons", | ||||
|     }, | ||||
|     config = function() | ||||
|         vim.g.loaded_netrw = 1 | ||||
|         vim.g.loaded_netrwPlugin = 1 | ||||
|  | ||||
|         require("nvim-tree").setup { | ||||
|             sort = { | ||||
|                 folders_first = true, | ||||
|                 sorter = "name" | ||||
|             }, | ||||
|             filters = { custom = { "^.git$" } } | ||||
|         } | ||||
|  | ||||
|         vim.keymap.set('n', '<leader>e', ":NvimTreeToggle<CR>", {silent = true, desc = "Open nvim-tree"}) | ||||
|         vim.keymap.set('n', '<leader><leader>h', ":NvimTreeCollapseKeepBuffers<CR>", { silent = true, desc = "Collapse nvim-tree keeping open buffers" }) | ||||
|         vim.keymap.set('n', '<leader><leader>e', ":NvimTreeFindFile<CR>", {silent = true, desc = "Go to currently open file in buffer or close"}) | ||||
|     end, | ||||
| } | ||||
| @@ -1,77 +0,0 @@ | ||||
| return { | ||||
|     "startup-nvim/startup.nvim", | ||||
|     dependencies = { | ||||
|         "nvim-telescope/telescope.nvim", | ||||
|         "nvim-lua/plenary.nvim", | ||||
|         "nvim-telescope/telescope-file-browser.nvim", | ||||
|     }, | ||||
|     config = function() | ||||
|         require("startup").setup({ | ||||
|             title = { | ||||
|                 type = "text", | ||||
|                 align = "center", | ||||
|                 content = { | ||||
|     [[]], | ||||
|     [[]], | ||||
|     [[]], | ||||
| 	[[                                                                       ]], | ||||
| 	[[  ██████   █████                   █████   █████  ███                  ]], | ||||
| 	[[ ░░██████ ░░███                   ░░███   ░░███  ░░░                   ]], | ||||
| 	[[  ░███░███ ░███   ██████   ██████  ░███    ░███  ████  █████████████   ]], | ||||
| 	[[  ░███░░███░███  ███░░███ ███░░███ ░███    ░███ ░░███ ░░███░░███░░███  ]], | ||||
| 	[[  ░███ ░░██████ ░███████ ░███ ░███ ░░███   ███   ░███  ░███ ░███ ░███  ]], | ||||
| 	[[  ░███  ░░█████ ░███░░░  ░███ ░███  ░░░█████░    ░███  ░███ ░███ ░███  ]], | ||||
| 	[[  █████  ░░█████░░██████ ░░██████     ░░███      █████ █████░███ █████ ]], | ||||
| 	[[ ░░░░░    ░░░░░  ░░░░░░   ░░░░░░       ░░░      ░░░░░ ░░░░░ ░░░ ░░░░░  ]], | ||||
| 	[[                                                                       ]], | ||||
| }, | ||||
|                 highlight = "String", | ||||
|                 default_color = "#010155" | ||||
|             }, | ||||
|  | ||||
|             quotes = { | ||||
|                 type = "text", | ||||
|                 align = "center", | ||||
|                 content = function () | ||||
|                     local handle = io.popen("pwd") | ||||
|                     if handle then | ||||
|                         local cwd = handle:read("*l") | ||||
|                         handle:close() | ||||
|                         return {"Currently in " .. cwd} | ||||
|                     else | ||||
|                         return {"Error running command"} | ||||
|                     end | ||||
|                 end, | ||||
|                 highlight = "String", | ||||
|                 default_color = "#FFFFFF" | ||||
|             }, | ||||
|  | ||||
|             old = { | ||||
|                 type = "oldfiles", | ||||
|                 oldfiles_directory = true, | ||||
|                 align = "center", | ||||
|                 title = "Old files", | ||||
|                 oldfiles_amount = 10, | ||||
|                 highlight = "String", | ||||
|                 default_color = "#FFFFFF", | ||||
|                 content = "", | ||||
|             }, | ||||
|  | ||||
|             options = { | ||||
|                 mapping_keys = false; | ||||
|             }, | ||||
|  | ||||
|             colors = { | ||||
|                 background = "#000000", | ||||
|                 folded_section = "#100000" | ||||
|             }, | ||||
|  | ||||
|             mappings = { | ||||
|                 execute_command = "<C-r>", | ||||
|                 open_file = "<CR>", | ||||
|             }, | ||||
|  | ||||
|             parts = {"title", "quotes", "old"} | ||||
|         }) | ||||
|     end, | ||||
| } | ||||
| @@ -1,8 +0,0 @@ | ||||
| return { | ||||
|     "kylechui/nvim-surround", | ||||
|     version = "*", | ||||
|     event = "VeryLazy", | ||||
|     config = function() | ||||
|         require("nvim-surround").setup() | ||||
|     end | ||||
| } | ||||
| @@ -1,87 +0,0 @@ | ||||
| local actions = require('telescope.actions') | ||||
| local action_state = require('telescope.actions.state') | ||||
|  | ||||
| -- Custom function for search and replace using Telescope | ||||
| -- test | ||||
| function _G.search_and_replace() | ||||
|   local current_file = vim.fn.expand('%:p') | ||||
|   local query = vim.fn.input('Enter search pattern: ') | ||||
|  | ||||
|   -- Create the Telescope prompt with custom mappings | ||||
|   require('telescope.builtin').find_files({ | ||||
|     prompt_title = 'Search and Replace', | ||||
|     cwd = vim.loop.cwd(), | ||||
|     hidden = true, | ||||
|     attach_mappings = function(prompt_bufnr, map) | ||||
|       actions.select_default:replace(function() | ||||
|         local selection = action_state.get_selected_entry() | ||||
|          | ||||
|         -- Get the replace pattern from user | ||||
|         local replace_query = vim.fn.input('Replace with: ', '') | ||||
|          | ||||
|         if not replace_query == '' then | ||||
|           local args = { query, replace_query } | ||||
|            | ||||
|           -- Open a terminal buffer to run the search and replace command | ||||
|           require('telescope.builtin').terminal_job({ | ||||
|             cmd = { | ||||
|               'sh', '-c', | ||||
|               string.format( | ||||
|                 "grep -rl '%s' . | xargs sed -i 's/%s/%s/g'", | ||||
|                 table.concat(args, "'"), | ||||
|                 query, | ||||
|                 replace_query | ||||
|               ) | ||||
|             }, | ||||
|             cwd = vim.fn.expand('%:p:h'), | ||||
|           }) | ||||
|         end | ||||
|  | ||||
|         return true | ||||
|       end) | ||||
|        | ||||
|       return true | ||||
|     end | ||||
|   }) | ||||
| end | ||||
|  | ||||
| return { | ||||
| 	-- fuzzy finder | ||||
| 	"nvim-telescope/telescope.nvim", | ||||
| 	dependencies = { | ||||
| 		"nvim-lua/plenary.nvim", | ||||
| 	}, | ||||
| 	config = function() | ||||
| 		local builtin = require("telescope.builtin") | ||||
| 		local actions = require("telescope.actions") | ||||
| 		local opts = { silent = true } | ||||
|  | ||||
| 		require("telescope").setup({ | ||||
| 			defaults = { | ||||
| 				mappings = { | ||||
| 					i = { | ||||
| 						["<C-j>"] = actions.move_selection_next, | ||||
| 						["<C-k>"] = actions.move_selection_previous, | ||||
| 						["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist, -- TODO investigate | ||||
| 					}, | ||||
| 				}, | ||||
| 			}, | ||||
| 		}) | ||||
|  | ||||
| 		opts.desc = "telescope find files" | ||||
| 		vim.keymap.set("n", "<leader>ff", builtin.find_files, opts) | ||||
|  | ||||
| 		opts.desc = "telescope live grep" | ||||
| 		vim.keymap.set("n", "<leader>fg", builtin.live_grep, opts) | ||||
|  | ||||
| 		opts.desc = "telescope buffers" | ||||
| 		vim.keymap.set("n", "<leader>fb", builtin.buffers, opts) | ||||
|  | ||||
| 		opts.desc = "telescope nvim functions" | ||||
| 		vim.keymap.set("n", "<leader>fh", builtin.help_tags, opts) | ||||
|  | ||||
|  | ||||
| 		-- Search and replace | ||||
| 		 | ||||
| 	end, | ||||
| } | ||||
| @@ -1,17 +0,0 @@ | ||||
| return { | ||||
| 	-- literally the name, quick term toggle | ||||
| 	"akinsho/toggleterm.nvim", | ||||
| 	version = "*", | ||||
| 	config = function() | ||||
| 		require("toggleterm").setup({ | ||||
| 			insert_mappings = false, | ||||
| 			terminal_mappings = false, | ||||
| 			open_mapping = "<leader>t", | ||||
| 			direction = "float", | ||||
| 			float_opts = { | ||||
| 				border = "curved", | ||||
| 			}, | ||||
| 		}) | ||||
| 		vim.keymap.set("t", "<S-Esc>", [[<cmd>ToggleTerm<CR>]], {}) -- close terminal wih esc | ||||
| 	end, | ||||
| } | ||||
| @@ -1,26 +0,0 @@ | ||||
| return { | ||||
| 	-- syntax highlighting | ||||
| 	"nvim-treesitter/nvim-treesitter", | ||||
| 	build = ":TSUpdate", | ||||
| 	config = function() | ||||
| 		require("nvim-treesitter.configs").setup({ | ||||
| 			ensure_installed = { | ||||
| 				"bash", | ||||
| 				"c", | ||||
| 				"cpp", | ||||
| 				"hyprlang", | ||||
| 				"javascript", | ||||
| 				"json", | ||||
| 				"lua", | ||||
| 				"python", | ||||
| 				"typescript", | ||||
| 			}, | ||||
| 			sync_install = false, | ||||
|  | ||||
| 			highlight = { | ||||
| 				enable = true, | ||||
|                 disable = { "tex" } | ||||
| 			}, | ||||
| 		}) | ||||
| 	end, | ||||
| } | ||||
| @@ -1,30 +0,0 @@ | ||||
| return { | ||||
|   'pmizio/typescript-tools.nvim', | ||||
|   dependencies = { 'nvim-lua/plenary.nvim', 'neovim/nvim-lspconfig' }, | ||||
|   opts = {}, | ||||
|   ft = { 'javascript', 'javascriptreact', 'typescript', 'typescriptreact', 'vue' }, | ||||
|   config = function() | ||||
|     require('typescript-tools').setup { | ||||
|       on_attach = function(client, bufnr) | ||||
|         client.server_capabilities.documentFormattingProvider = false | ||||
|         client.server_capabilities.documentRangeFormattingProvider = false | ||||
|       end, | ||||
|       filetypes = { | ||||
|         'javascript', | ||||
|         'javascriptreact', | ||||
|         'typescript', | ||||
|         'typescriptreact', | ||||
|         'vue', | ||||
|       }, | ||||
|       settings = { | ||||
|         tsserver_plugins = { | ||||
|           '@vue/typescript-plugin', | ||||
|         }, | ||||
|         jsx_close_tag = { | ||||
|           enable = true, | ||||
|           filetypes = { 'javascriptreact', 'typescriptreact' }, | ||||
|         }, | ||||
|       }, | ||||
|     } | ||||
|   end, | ||||
| } | ||||
| @@ -1,15 +0,0 @@ | ||||
| return { | ||||
|     "lervag/vimtex", | ||||
|     config = function() | ||||
|       -- vimtex settings | ||||
|       -- vim.g.vimtex_view_method = 'startup'    -- PDF viewer (example: zathura, or use 'skim' for macOS) | ||||
|       vim.g.vimtex_compiler_method = 'latexmk' -- Use latexmk for compilation | ||||
|       vim.g.vimtex_fold_enabled = 1           -- Enable folding for LaTeX sections | ||||
|       vim.g.vimtex_quickfix_mode = 0          -- Disable quickfix mode for compilation errors | ||||
|         -- Key Mappings for LaTeX workflow | ||||
|       vim.api.nvim_set_keymap('n', '<leader>lc', ':VimtexCompile<CR>', {})  -- Compile LaTeX file | ||||
|       vim.api.nvim_set_keymap('n', '<leader>lv', ':VimtexView<CR>', {})    -- View compiled PDF | ||||
|       vim.api.nvim_set_keymap('n', '<leader>lq', ':VimtexStop<CR>', {})    -- Stop compilation | ||||
|  | ||||
|     end | ||||
| } | ||||
| @@ -1,12 +0,0 @@ | ||||
| return { | ||||
|     -- keybinds popup | ||||
|     "folke/which-key.nvim", | ||||
|     event = "VeryLazy", | ||||
|     init = function() | ||||
|         vim.o.timeout = true | ||||
|         vim.o.timeoutlen = 500 | ||||
|     end, | ||||
|     opts = { | ||||
|  | ||||
|     } | ||||
| } | ||||
| @@ -1,14 +0,0 @@ | ||||
| return { | ||||
|     -- view buffer w/o distractions | ||||
|     "folke/zen-mode.nvim", | ||||
|     config = function() | ||||
|         require("zen-mode").setup({ | ||||
|             window = { | ||||
|                 width = 1, | ||||
|                 height = 1, | ||||
|             }, | ||||
|         }) | ||||
|  | ||||
|         vim.keymap.set("n", "<leader>z", ":ZenMode<CR>", { silent = true, desc = "open current buffer in zen mode" }) | ||||
|     end, | ||||
| } | ||||
		Reference in New Issue
	
	Block a user