diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 8920ac3..7fbbd1b 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -1,4 +1,4 @@ -require("options") -require("autocmds") -require("plugins") -require("keymaps") +require("config.options") +require("config.autocmds") +require("config.lazy") +require("config.keymaps") diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index cbc534e..f947069 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -1,65 +1,71 @@ { "42header_codam": { "branch": "master", "commit": "727e299117075f87b154a40f2e4ec8a48594d7de" }, - "barbar.nvim": { "branch": "master", "commit": "53b5a2f34b68875898f0531032fbf090e3952ad7" }, + "LuaSnip": { "branch": "master", "commit": "7ad2eaeaca56d6ed63acacbfc114b99f1f67b982" }, + "barbar.nvim": { "branch": "master", "commit": "c20691d686addb0d6ea87896d186c082324b01f8" }, "c_formatter_42.vim": { "branch": "master", "commit": "7a2d50f6683d6f58a2c95375524b4406d6bdc2c3" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, - "conform.nvim": { "branch": "master", "commit": "25d48271e3d4404ba017cb92a37d3a681c1ad149" }, + "conform.nvim": { "branch": "master", "commit": "62eba813b7501b39612146cbf29cd07f1d4ac29c" }, "dial.nvim": { "branch": "master", "commit": "ed4d6a5bbd5e479b4c4a3019d148561a2e6c1490" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, - "dressing.nvim": { "branch": "master", "commit": "6741f1062d3dc6e4755367a7e9b347b553623f04" }, - "dropbar.nvim": { "branch": "master", "commit": "aa4c0ab1ade45ff9a3c5d4c06365c9b119f32d36" }, - "eyeliner.nvim": { "branch": "main", "commit": "828da1c18de397f7bf8fd4fff1daa1c4352b28cf" }, + "dressing.nvim": { "branch": "master", "commit": "c5775a888adbc50652cb370073fcfec963eca93e" }, + "dropbar.nvim": { "branch": "master", "commit": "d26bf92161cd70e049dc138b44ffa0246dbf7178" }, + "eyeliner.nvim": { "branch": "main", "commit": "85e5a5a815651a434f327d0da3c2a33b9aa4f9ec" }, "fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" }, - "gitsigns.nvim": { "branch": "main", "commit": "58bd9e98d8e3c5a1c98af312e85247ee1afd3ed2" }, + "gitsigns.nvim": { "branch": "main", "commit": "562dc47189ad3c8696dbf460d38603a74d544849" }, "guess-indent.nvim": { "branch": "main", "commit": "6cd61f7a600bb756e558627cd2e740302c58e32d" }, "highlight-undo.nvim": { "branch": "main", "commit": "1ea1c79372d7d93c88fd97543880927b7635e3d2" }, "inc-rename.nvim": { "branch": "main", "commit": "8ba77017ca468f3029bf88ef409c2d20476ea66b" }, + "indent-blankline.nvim": { "branch": "master", "commit": "dddb5d21811c319eb6e51a993d8fb44b193aae3f" }, + "indentmini.nvim": { "branch": "main", "commit": "147374581eab6cb5c0ce2027312738d6a84413c8" }, "lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" }, "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" }, - "lsp-zero.nvim": { "branch": "v3.x", "commit": "56db3d5ce5476b183783160e6045f7337ba12b83" }, + "lsp-zero.nvim": { "branch": "v4.x", "commit": "0161aeab61d407aa1d43326a5dfc33479f4c53f6" }, + "lsp_lines.nvim": { "branch": "main", "commit": "7d9e2748b61bff6ebba6e30adbc7173ccf21c055" }, "lspkind.nvim": { "branch": "master", "commit": "cff4ae321a91ee3473a92ea1a8c637e3a9510aec" }, - "lualine.nvim": { "branch": "master", "commit": "544dd1583f9bb27b393f598475c89809c4d5e86b" }, - "luasnip": { "branch": "master", "commit": "7552e6504ee95a9c8cfc6db53e389122ded46cd4" }, + "lualine-macro-recording.nvim": { "branch": "main", "commit": "e2dcf63ba74e6111b53e1520a4f8a17a3d7427a1" }, + "lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" }, "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, "marks.nvim": { "branch": "master", "commit": "74e8d01b2a2131b6e46354cffc553aa7f81bcf5b" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "62360f061d45177dda8afc1b0fd1327328540301" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "482350b050bd413931c2cdd4857443c3da7d57cb" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, "mini.files": { "branch": "main", "commit": "99aef1d68a01dd8fd8d37bbf62d67766f97311e3" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "29f7c215332ba95e470811c380ddbce2cebe2af4" }, - "neogit": { "branch": "master", "commit": "2b74a777b963dfdeeabfabf84d5ba611666adab4" }, + "neoconf.nvim": { "branch": "main", "commit": "e7bb3b5aba2101c72608f94f6b5f5e0c0c987dbc" }, + "neogit": { "branch": "master", "commit": "6af8fc6b03210d0ac99398f8eff27c5be7b2ba8a" }, "neoscroll.nvim": { "branch": "master", "commit": "532dcc8cea4287c4cad6bb77532989a8217cfc7b" }, "neovim-session-manager": { "branch": "master", "commit": "cbaebd92dce84e9ba63cb07d3199e5a19b204c1a" }, "noice.nvim": { "branch": "main", "commit": "448bb9c524a7601035449210838e374a30153172" }, - "nord.nvim": { "branch": "master", "commit": "80c1e5321505aeb22b7a9f23eb82f1e193c12470" }, + "nord.nvim": { "branch": "main", "commit": "6d6bae56a002a4da507ba263776e9691f47deb5f" }, "nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" }, "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, "nvim-colorizer.lua": { "branch": "master", "commit": "194ec600488f7c7229668d0e80bd197f3a2b84ff" }, - "nvim-dap": { "branch": "master", "commit": "dcc85d12d6e2c18c5fa0f9a304d9f5e767e1401a" }, + "nvim-dap": { "branch": "master", "commit": "281a2e4cd1e7a17cea7ecb1745d84a8ab1249925" }, "nvim-dap-projects": { "branch": "main", "commit": "f319ffd99c6c8a0b930bcfc4bee0c751ffbf5808" }, "nvim-dap-ui": { "branch": "master", "commit": "a5606bc5958db86f8d92803bea7400ee26a8d7e4" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "484995d573c0f0563f6a66ebdd6c67b649489615" }, "nvim-highlight-colors": { "branch": "main", "commit": "a411550ef85cae467b889ba7d1a96bd78332d90e" }, "nvim-lastplace": { "branch": "main", "commit": "0bb6103c506315044872e0f84b1f736c4172bb20" }, "nvim-lsp-file-operations": { "branch": "master", "commit": "92a673de7ecaa157dd230d0128def10beb56d103" }, - "nvim-lspconfig": { "branch": "master", "commit": "6c505d4220b521f3b0e7b645f6ce45fa914d0eed" }, + "nvim-lspconfig": { "branch": "master", "commit": "a7f0f9c18baa70a3970ea18f9984e03b6f6c2e8a" }, "nvim-luadev": { "branch": "master", "commit": "3ba0c02c378503739f1fdb95cff3ea2aad48db3e" }, "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, "nvim-pqf": { "branch": "main", "commit": "148ee2ca8b06d83fd9bf6f9b9497724ad39a07d6" }, "nvim-scrollbar": { "branch": "main", "commit": "d09f14aa16c9f2748e77008f9da7b1f76e4e7b85" }, "nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" }, - "nvim-treesitter": { "branch": "master", "commit": "c79b068f395817c39ed147d4ee76855c36b846e6" }, + "nvim-treesitter": { "branch": "master", "commit": "8724e7d028ba11604dde94dc4be63f70cccf16e0" }, "nvim-treesitter-endwise": { "branch": "master", "commit": "8b34305ffc28bd75a22f5a0a9928ee726a85c9a6" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "33a17515b79ddb10d750320fa994098bdc3e93ef" }, - "nvim-ts-autotag": { "branch": "main", "commit": "dc5e1687ab76ee02e0f11c5ce137f530b36e98b3" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "41e3abf6bfd9a9a681eb1f788bdeba91c9004b2b" }, + "nvim-ts-autotag": { "branch": "main", "commit": "0cb76eea80e9c73b88880f0ca78fbd04c5bdcac7" }, "nvim-vtsls": { "branch": "main", "commit": "45c6dfea9f83a126e9bfc5dd63430562b3f8af16" }, "nvim-web-devicons": { "branch": "master", "commit": "3722e3d1fb5fe1896a104eb489e8f8651260b520" }, - "oil.nvim": { "branch": "master", "commit": "fcca212c2e966fc3dec1d4baf888e670631d25d1" }, - "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, + "oil.nvim": { "branch": "master", "commit": "a632c898fbe0e363ef89b9577f1a7714ab67d682" }, + "plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" }, "presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" }, "qf_helper.nvim": { "branch": "master", "commit": "fa3c2f3f2706e2c9984409c9c14b5993302ddfa7" }, - "schemastore.nvim": { "branch": "main", "commit": "218a9887085b81b3eb0ee8f1e2d20c4a7fd7b1c9" }, + "render-markdown.nvim": { "branch": "main", "commit": "c4eb6bf30525fdc7efaf5f33bcb0fa9491ace245" }, + "schemastore.nvim": { "branch": "main", "commit": "2ff2063191144005eb754356517de65ae45f2e41" }, "suda.vim": { "branch": "master", "commit": "b97fab52f9cdeabe2bbb5eb98d82356899f30829" }, "supermaven-nvim": { "branch": "main", "commit": "d71257f431e190d9236d7f30da4c2d659389e91f" }, "swap-split.nvim": { "branch": "main", "commit": "d2c705d279b384a6b47a67f85a6dc8569c4d775d" }, @@ -71,6 +77,7 @@ "toggleterm.nvim": { "branch": "main", "commit": "48be57eaba817f038d61bbf64d2c597f578c0827" }, "treesj": { "branch": "main", "commit": "0d81326b5afd36babe7dd480aabbb0b05f33e688" }, "trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" }, - "ultimate-autopair.nvim": { "branch": "v0.6", "commit": "1420fb9e07b1d80cc6d87e7d90827fb2c1109cb3" }, + "ts-error-translator.nvim": { "branch": "main", "commit": "11ae55b28bde02663b5f983f59b0e3fd9c4e845b" }, + "ultimate-autopair.nvim": { "branch": "v0.6", "commit": "53ed7c65e466963c916251f9ce6df7dd3685dc36" }, "which-key.nvim": { "branch": "main", "commit": "6c1584eb76b55629702716995cca4ae2798a9cca" } } diff --git a/nvim/.config/nvim/lua/autocmds.lua b/nvim/.config/nvim/lua/config/autocmds.lua similarity index 100% rename from nvim/.config/nvim/lua/autocmds.lua rename to nvim/.config/nvim/lua/config/autocmds.lua diff --git a/nvim/.config/nvim/lua/keymaps.lua b/nvim/.config/nvim/lua/config/keymaps.lua similarity index 97% rename from nvim/.config/nvim/lua/keymaps.lua rename to nvim/.config/nvim/lua/config/keymaps.lua index 451fe26..1ddec19 100644 --- a/nvim/.config/nvim/lua/keymaps.lua +++ b/nvim/.config/nvim/lua/config/keymaps.lua @@ -35,3 +35,5 @@ map("n", "", function() require("noice").cmd("dismiss") end end, silent) + +map("n", "", "Lazy", silent) diff --git a/nvim/.config/nvim/lua/config/lazy.lua b/nvim/.config/nvim/lua/config/lazy.lua new file mode 100644 index 0000000..0ee3c79 --- /dev/null +++ b/nvim/.config/nvim/lua/config/lazy.lua @@ -0,0 +1,30 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + +if not vim.loop.fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) +end + +vim.opt.rtp:prepend(lazypath) + +vim.g.nord_borders = true -- border between splits +vim.g.nord_italic = false +vim.g.nord_bold = false + +require("lazy").setup({ + spec = { + { import = "plugins" }, + }, + install = { + colorscheme = { "nord" }, + }, + checker = { + enabled = true, + }, +}) diff --git a/nvim/.config/nvim/lua/options.lua b/nvim/.config/nvim/lua/config/options.lua similarity index 100% rename from nvim/.config/nvim/lua/options.lua rename to nvim/.config/nvim/lua/config/options.lua diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index 181c3e4..4d0f9b9 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -1,49 +1,44 @@ -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" - -if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) -end - -vim.opt.rtp:prepend(lazypath) - -vim.g.nord_borders = true -- border between splits -vim.g.nord_italic = false -vim.g.nord_bold = false - -require("lazy").setup({ - install = { - colorscheme = "nord", - }, - +---@type LazySpec +return { { - "shaunsingh/nord.nvim", + "gbprod/nord.nvim", priority = 1000, + lazy = false, config = function() - require("nord").set() + require("nord").setup({ + diff = { + mode = "fg", + }, + errors = { + mode = "none", -- doesn't seem to do anything? + }, + on_highlights = function(hi, c) + hi.DiffAdd = vim.tbl_extend("force", hi.DiffAdd, { bg = "" }) + hi.DiffDelete = vim.tbl_extend("force", hi.DiffDelete, { bg = "" }) + hi.DiffChange = vim.tbl_extend("force", hi.DiffChange, { bg = "" }) + hi.DiffText = vim.tbl_extend("force", hi.DiffText, { bg = "" }) + end, + }) + vim.cmd.colorscheme("nord") end, }, { "folke/which-key.nvim", - event = "VeryLazy", - opts = { - preset = "modern", - }, + config = function() + require("which-key").setup({ + preset = "modern", + }) + end, }, { "nvim-lualine/lualine.nvim", dependencies = { "nvim-tree/nvim-web-devicons", + "yavorski/lualine-macro-recording.nvim", }, - config = function(plugin) + config = function() local lualine = require("lualine") local startuptime_visible = true -- hide startup time after 3 seconds @@ -74,7 +69,9 @@ require("lazy").setup({ { "diff" }, { "diagnostics" }, }, - lualine_c = {}, + lualine_c = { + "macro_recording", + }, lualine_x = { { function() @@ -112,77 +109,82 @@ require("lazy").setup({ dependencies = { "nvim-treesitter/nvim-treesitter-textobjects", "RRethy/nvim-treesitter-endwise", - "windwp/nvim-ts-autotag", - }, - opts = { - ensure_installed = { - "lua", - "vim", - "vimdoc", - "bash", - "fish", - "diff", - "json", - "jsonc", - "markdown", - "markdown_inline", - "regex", - "javascript", - "typescript", - "html", - "css", - "python", - "ruby", - "c", - "go", - "elixir", - "rust", - }, - auto_install = true, - highlight = { - enable = true, - disable = { "gitcommit" }, + { + "windwp/nvim-ts-autotag", + config = true, }, - textobjects = { - select = { + }, + config = function() + ---@diagnostic disable-next-line: missing-fields + require("nvim-treesitter.configs").setup({ + ensure_installed = { + "lua", + "vim", + "vimdoc", + "bash", + "fish", + "diff", + "json", + "jsonc", + "markdown", + "markdown_inline", + "regex", + "javascript", + "typescript", + "tsx", + "html", + "css", + "python", + "ruby", + "c", + "go", + "elixir", + "rust", + }, + auto_install = true, + highlight = { enable = true, - lookahead = true, - keymaps = { - ["af"] = "@function.outer", - ["if"] = "@function.inner", - ["ac"] = "@comment.outer", - ["ic"] = "@comment.outer", - ["aa"] = "@parameter.outer", - ["ia"] = "@parameter.inner", + }, + textobjects = { + select = { + enable = true, + lookahead = true, + keymaps = { + ["af"] = "@function.outer", + ["if"] = "@function.inner", + ["ac"] = "@comment.outer", + ["ic"] = "@comment.outer", + ["aa"] = "@parameter.outer", + ["ia"] = "@parameter.inner", + }, + selection_modes = { + ["@function.outer"] = "V", + ["@function.inner"] = "V", + }, }, - selection_modes = { - ["@function.outer"] = "V", - ["@function.inner"] = "V", + move = { + enable = true, + set_jumps = true, + goto_next_start = { + ["]m"] = "@function.outer", + }, }, }, - move = { + endwise = { enable = true, - set_jumps = true, - goto_next_start = { - ["]m"] = "@function.outer", - }, }, - }, - endwise = { - enable = true, - }, - autotag = { - enable = true, - }, - }, - config = function(_, opts) - require("nvim-treesitter.configs").setup(opts) + autotag = { + enable = true, + }, + }) end, }, { "wansmer/treesj", - dependencies = { "nvim-treesitter/nvim-treesitter" }, + dependencies = { + "nvim-treesitter/nvim-treesitter", + }, keys = { { "s", @@ -192,101 +194,108 @@ require("lazy").setup({ desc = "Toggle node (split/join)", }, }, + ---@class TreeSJ.Settings + ---@field use_default_keymaps boolean Use default keymaps (m - toggle, j - join, s - split) + ---@field check_syntax_error boolean Node with syntax error will not be formatted + ---@field max_join_length number If line after join will be longer than max value, node will not be formatted + ---Cursor behavior: + ---hold - cursor follows the node/place on which it was called + ---start - cursor jumps to the first symbol of the node being formatted + ---end - cursor jumps to the last symbol of the node being formatted + ---@field cursor_behavior 'hold'|'start'|'end' + ---@field notify boolean Notify about possible problems or not + ---@field langs table Presets for languages + ---@field dot_repeat boolean Use `dot` for repeat action + ---@field on_error nil|function Callback for treesj error handler. func (err_text, level, ...) opts = { use_default_keymaps = false, - max_join_length = 600, + -- max_join_length = 600, }, }, { "zbirenbaum/copilot.lua", enabled = false, - opts = { - filetypes = { - gitcommit = true, - markdown = true, - yaml = true, - }, - panel = { - enabled = false, - }, - suggestion = { - auto_trigger = true, - keymap = { - accept = "", - accept_word = "", - accept_line = "", - next = "", - prev = "", - dismiss = "", + config = function() + require("copilot").setup({ + filetypes = { + gitcommit = true, + markdown = true, + yaml = true, }, - }, - }, + panel = { + enabled = false, + }, + suggestion = { + auto_trigger = true, + keymap = { + accept = "", + accept_word = "", + accept_line = "", + next = "", + prev = "", + dismiss = "", + }, + }, + }) + end, }, { "supermaven-inc/supermaven-nvim", - opts = { - keymaps = { - accept_suggestion = "", - accept_word = "", - clear_suggestion = "", - }, - }, + config = function() + require("supermaven-nvim").setup({ + keymaps = { + accept_suggestion = "", + accept_word = "", + clear_suggestion = "", + }, + }) + end, }, { - "vonheikemen/lsp-zero.nvim", - branch = "v3.x", + "williamboman/mason.nvim", + config = true, + }, + + { + "folke/neoconf.nvim", + config = true, + }, + + { + "williamboman/mason-lspconfig.nvim", dependencies = { "williamboman/mason.nvim", - "williamboman/mason-lspconfig.nvim", "neovim/nvim-lspconfig", - "hrsh7th/nvim-cmp", "hrsh7th/cmp-nvim-lsp", "onsails/lspkind.nvim", - "l3mon4d3/luasnip", "b0o/schemastore.nvim", "yioneko/nvim-vtsls", - -- { "zbirenbaum/copilot-cmp", opts = {} }, + "folke/neoconf.nvim", + { + "vonheikemen/lsp-zero.nvim", + branch = "v4.x", + }, }, config = function() local lsp_zero = require("lsp-zero") - local lspconfig = require("lspconfig") - local schemastore = require("schemastore") - local cmp = require("cmp") - cmp.setup({ - sources = { - -- { name = "copilot" }, - { name = "nvim_lsp" }, - { name = "lazydev", group_index = 0 }, - }, - mapping = cmp.mapping.preset.insert({ - [""] = cmp.mapping.complete(), - }), - formatting = { - fields = { "abbr", "kind", "menu" }, - format = function(entry, item) - local color_item = require("nvim-highlight-colors").format(entry, { kind = item.kind }) - item = require("lspkind").cmp_format({ - -- before = require("tailwind-tools.cmp").lspkind_format, - })(entry, item) - if color_item.abbr_hl_group then - item.kind_hl_group = color_item.abbr_hl_group - item.kind = color_item.abbr - end - return item - end, - expandable_indicator = true, - }, - window = { - completion = cmp.config.window.bordered(), - documentation = cmp.config.window.bordered(), - }, + -- add tmux lsp + vim.api.nvim_create_autocmd("FileType", { + pattern = "tmux", + callback = function() + vim.lsp.start({ + name = "tmux", + cmd = { "tmux-language-server" }, + }) + end, }) - lsp_zero.on_attach(function(client, bufnr) + local on_attach = function(client, bufnr) + -- lsp_zero.highlight_symbol(client, bufnr) + -- :h lsp-zero-keybindings lsp_zero.default_keymaps({ buffer = bufnr, @@ -294,6 +303,10 @@ require("lazy").setup({ exclude = { "gs" }, }) + vim.keymap.set("n", "gl", function() + vim.diagnostic.open_float() + end, { desc = "Show diagnostics", silent = true, buffer = bufnr }) + vim.keymap.set( "n", "gk", @@ -309,16 +322,31 @@ require("lazy").setup({ { desc = "Goto source definition", silent = true, buffer = bufnr } ) end - end) + end + + lsp_zero.extend_lspconfig({ + capabilities = require("cmp_nvim_lsp").default_capabilities(), + lsp_attach = on_attach, + sign_text = true, + float_border = "rounded", + }) + + -- local orig_util_open_floating_preview = vim.lsp.util.open_floating_preview + -- + -- ---@diagnostic disable-next-line: duplicate-set-field + -- function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...) + -- local bufnr, winnr = orig_util_open_floating_preview(contents, syntax, opts, ...) + -- -- vim.api.nvim_set_option_value("signcolumn", "no", { win = winnr }) + -- vim.api.nvim_set_option_value("filetype", "markdown", { buf = bufnr }) + -- return bufnr, winnr + -- end - require("mason").setup({}) require("mason-lspconfig").setup({ ensure_installed = { "lua_ls", "clangd", "jsonls", "yamlls", - "jsonnet_ls", "bashls", "basedpyright", "ruff_lsp", @@ -328,57 +356,92 @@ require("lazy").setup({ "vtsls", }, handlers = { - lsp_zero.default_setup, + function(server) + require("lspconfig")[server].setup({}) + end, lua_ls = function() - -- local lua_opts = lsp_zero.nvim_lua_ls() + ---@diagnostic disable: missing-fields + ---@type lspconfig.options.lua_ls local lua_opts = { settings = { Lua = { format = { enable = false, }, + diagnostics = { + workspaceDelay = -1, + workspaceEvent = "None", + }, + workspace = { + checkThirdParty = false, + }, + codeLens = { + enable = true, + }, + completion = { + callSnippet = "Both", + }, + doc = { + privateName = { "^_" }, + }, + hint = { + enable = true, + setType = false, + paramType = true, + paramName = "Disable", + semicolon = "Disable", + arrayIndex = "Disable", + }, }, }, } - lspconfig.lua_ls.setup(lua_opts) + require("lspconfig").lua_ls.setup(lua_opts) end, jsonls = function() - lspconfig.jsonls.setup({ + ---@diagnostic disable: missing-fields + ---@type lspconfig.options.jsonls + local jsonls_opts = { settings = { json = { - schemas = vim.list_extend(schemastore.json.schemas(), { + schemas = vim.list_extend(require("schemastore").json.schemas(), { { - fileMatch = { "dodcker-compose*.json", "compose*.json" }, + fileMatch = { "docker-compose*.json", "compose*.json" }, url = "https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json", }, }), validate = { enable = true }, }, }, - }) + } + require("lspconfig").jsonls.setup(jsonls_opts) end, yamlls = function() - lspconfig.yamlls.setup({ + ---@diagnostic disable: missing-fields + ---@type lspconfig.options.yamlls + local yamlls_opts = { settings = { yaml = { schemaStore = { enable = false, url = "", }, - schemas = vim.tbl_extend("force", schemastore.yaml.schemas(), { + schemas = vim.tbl_extend("force", require("schemastore").yaml.schemas(), { kubernetes = { "manifests/*.yaml" }, }), }, validate = { enable = true }, }, - }) + } + require("lspconfig").yamlls.setup(yamlls_opts) end, tailwindcss = function() - lspconfig.tailwindcss.setup({ + ---@diagnostic disable: missing-fields + ---@type lspconfig.options.tailwindcss + local tailwindcss_opts = { settings = { tailwindCSS = { experimental = { @@ -389,24 +452,117 @@ require("lazy").setup({ }, }, }, - }) + } + require("lspconfig").tailwindcss.setup(tailwindcss_opts) end, vtsls = function() - lspconfig.vtsls.setup({ + ---@diagnostic disable: missing-fields + ---@type lspconfig.options.vtsls + local vtsls_opts = { settings = { javascript = { - updateImportsOnFileMove = "always", + updateImportsOnFileMove = { enabled = "always" }, }, typescript = { - updateImportsOnFileMove = "always", + updateImportsOnFileMove = { enabled = "always" }, + tsserver = { + experimental = { + enableProjectDiagnostics = true, + }, + }, }, vtsls = { enableMoveToFileCodeAction = true, }, }, - }) + -- handlers = { + -- ---@diagnostic disable: redundant-parameter + -- ---@param err lsp.ResponseError? + -- ---@param result lsp.PublishDiagnosticsParams + -- ---@param ctx lsp.HandlerContext + -- ---@param config? vim.diagnostic.Opts Configuration table (see |vim.diagnostic.config()|). + -- ["textDocument/publishDiagnostics"] = function(err, result, ctx, config) + -- if not result.diagnostics then + -- return + -- end + -- + -- for _, diagnostic in ipairs(result.diagnostics) do + -- local json = vim.fn.json_encode({ + -- range = diagnostic.range, + -- message = diagnostic.message, + -- code = diagnostic.code, + -- severity = diagnostic.severity, + -- source = diagnostic.source, + -- }) + -- local proc = vim.system( + -- { "pretty-ts-errors-markdown" }, + -- { text = true, stdin = true }, + -- function(obj) + -- diagnostic.message = obj.stdout + -- vim.lsp.diagnostic.on_publish_diagnostics(err, result, ctx, config) + -- end + -- ) + -- proc:write(json) + -- proc:write(nil) + -- end + -- end, + -- }, + } + require("lspconfig").vtsls.setup(vtsls_opts) + end, + }, + }) + end, + }, + + { + "hrsh7th/nvim-cmp", + event = "InsertEnter", + dependencies = { + "L3MON4D3/LuaSnip", + }, + config = function() + local cmp = require("cmp") + + cmp.setup({ + sources = { + -- { name = "copilot" }, + { + name = "nvim_lsp", + ---@param entry cmp.Entry + entry_filter = function(entry) + return entry:get_kind() ~= cmp.lsp.CompletionItemKind.Text + end, + }, + { name = "lazydev", group_index = 0 }, + }, + snippet = { + expand = function(args) + require("luasnip").lsp_expand(args.body) + end, + }, + mapping = cmp.mapping.preset.insert({ + [""] = cmp.mapping.complete(), + }), + formatting = { + fields = { "abbr", "kind", "menu" }, + format = function(entry, item) + local color_item = require("nvim-highlight-colors").format(entry, { kind = item.kind }) + item = require("lspkind").cmp_format({ + -- before = require("tailwind-tools.cmp").lspkind_format, + })(entry, item) + if color_item.abbr_hl_group then + item.kind_hl_group = color_item.abbr_hl_group + item.kind = color_item.abbr + end + return item end, + expandable_indicator = true, + }, + window = { + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), }, }) end, @@ -418,15 +574,13 @@ require("lazy").setup({ "nvim-lua/plenary.nvim", "nvim-neo-tree/neo-tree.nvim", }, - opts = {}, + config = true, }, { "luckasRanarison/tailwind-tools.nvim", enabled = false, - ---@module "tailwind-tools" - ---@type TailwindTools.Option - opts = {}, + config = true, }, { @@ -436,37 +590,36 @@ require("lazy").setup({ init = function() vim.o.formatexpr = "v:lua.require'conform'.formatexpr()" end, - opts = { - formatters_by_ft = { - lua = { "stylua" }, - yaml = { "yamlfmt" }, - javascript = { "prettierd", "prettier", stop_after_first = true }, - javascriptreact = { "prettierd", "prettier", stop_after_first = true }, - typescript = { "prettierd", "prettier", stop_after_first = true }, - typescriptreact = { "prettierd", "prettier", stop_after_first = true }, - html = { "prettierd", "prettier", stop_after_first = true }, - css = { "prettierd", "prettier", stop_after_first = true }, - graphql = { "prettierd", "prettier", stop_after_first = true }, - sh = { "shfmt" }, - fish = { "fish_indent" }, - }, - format_on_save = function(bufnr) - if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then - return - end + config = function() + require("conform").setup({ + formatters_by_ft = { + lua = { "stylua" }, + yaml = { "yamlfmt" }, + javascript = { "prettierd", "prettier", stop_after_first = true }, + javascriptreact = { "prettierd", "prettier", stop_after_first = true }, + typescript = { "prettierd", "prettier", stop_after_first = true }, + typescriptreact = { "prettierd", "prettier", stop_after_first = true }, + html = { "prettierd", "prettier", stop_after_first = true }, + css = { "prettierd", "prettier", stop_after_first = true }, + graphql = { "prettierd", "prettier", stop_after_first = true }, + sh = { "shfmt" }, + fish = { "fish_indent" }, + }, + format_on_save = function(bufnr) + if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then + return + end - return { lsp_format = "fallback" } - end, - format_after_save = function(bufnr) - if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then - return - end + return { lsp_format = "fallback" } + end, + format_after_save = function(bufnr) + if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then + return + end - return { lsp_format = "fallback" } - end, - }, - config = function(_, opts) - require("conform").setup(opts) + return { lsp_format = "fallback" } + end, + }) vim.api.nvim_create_user_command("Format", function(args) local range = nil @@ -514,14 +667,14 @@ require("lazy").setup({ { "folke/lazydev.nvim", ft = "lua", - ---@module "lazydev" - ---@type lazydev.Config - opts = { - ---@type lazydev.Library.spec[] - library = { - { path = "luvit-meta/library", words = { "vim%.uv" } }, - }, - }, + config = function() + require("lazydev").setup({ + ---@type lazydev.Library.spec[] + library = { + { path = "luvit-meta/library" }, + }, + }) + end, }, { @@ -532,12 +685,14 @@ require("lazy").setup({ --TODO: configure { "folke/trouble.nvim", - dependencies = { "nvim-tree/nvim-web-devicons" }, + dependencies = { + "nvim-tree/nvim-web-devicons", + }, cmd = { "Trouble" }, keys = { { "t", "Trouble" }, }, - opts = {}, + config = true, }, { @@ -557,35 +712,37 @@ require("lazy").setup({ { "", "Telescope man_pages", desc = "Telescope man" }, --{ 'gd', 'Telescope lsp_definitions', desc = 'Telescope definitions' }, --{ 'gi', 'Telescope implementations', desc = 'Telescope implementations' }, - --{ 'dl', 'Telescope diagnostics', desc = 'Telescope diagnostics' }, + { "", "Telescope diagnostics", desc = "Telescope diagnostics" }, }, - opts = { - defaults = { - sorting_strategy = "ascending", - layout_config = { - prompt_position = "top", - }, - file_ignore_patterns = { ".git/" }, - }, - pickers = { - find_files = { - theme = "dropdown", - hidden = true, - }, - buffers = { - theme = "dropdown", - }, - live_grep = { - theme = "dropdown", - }, - help_tags = { - theme = "dropdown", + config = function() + require("telescope").setup({ + defaults = { + sorting_strategy = "ascending", + layout_config = { + prompt_position = "top", + }, + file_ignore_patterns = { ".git/" }, }, - man_pages = { - theme = "dropdown", + pickers = { + find_files = { + theme = "dropdown", + hidden = true, + }, + buffers = { + theme = "dropdown", + }, + live_grep = { + theme = "dropdown", + }, + help_tags = { + theme = "dropdown", + }, + man_pages = { + theme = "dropdown", + }, }, - }, - }, + }) + end, }, { @@ -601,43 +758,48 @@ require("lazy").setup({ { "", "Neotree toggle", desc = "Toggle Neotree" }, { "fh", "Neotree reveal", desc = "Reveal file in Neotree" }, }, - opts = { - close_if_last_window = true, - filesystem = { - follow_current_file = { - enabled = true, - }, - filtered_items = { - visible = true, - never_show = { - "..", - "node_modules", + config = function() + require("neo-tree").setup({ + close_if_last_window = true, + filesystem = { + follow_current_file = { + enabled = true, + leave_dirs_open = true, }, - }, - find_command = "fd", - find_args = { - fd = { - "--exclude", - ".git", - "--exclude", - "node_modules", + filtered_items = { + visible = true, + never_show = { + "..", + "node_modules", + }, + }, + find_command = "fd", + find_args = { + fd = { + "--exclude", + ".git", + "--exclude", + "node_modules", + }, }, + hijack_netrw_behavior = "disabled", + use_libuv_file_watcher = true, }, - }, - event_handlers = { - -- { - -- event = "file_opened", - -- handler = function() - -- require("neo-tree.command").execute({ action = "close" }) - -- end, - -- }, - }, - window = { - mappings = { - ["P"] = { "toggle_preview", config = { use_float = false } }, + event_handlers = { + -- { + -- event = "file_opened", + -- handler = function() + -- require("neo-tree.command").execute({ action = "close" }) + -- end, + -- }, }, - }, - }, + window = { + mappings = { + ["P"] = { "toggle_preview", config = { use_float = false } }, + }, + }, + }) + end, }, { @@ -646,20 +808,43 @@ require("lazy").setup({ keys = { { "", "lua if not MiniFiles.close() then MiniFiles.open() end", desc = "Toggle MiniFiles" }, }, - opts = { - mappings = { - close = "", - }, - }, + config = function() + require("mini.files").setup({ + mappings = { + close = "", + }, + }) + end, }, { "stevearc/oil.nvim", - opts = { - skip_confirm_for_simple_edits = true, - prompt_save_on_select_new_entry = false, - watch_for_changes = true, - }, + config = function() + require("oil").setup({ + skip_confirm_for_simple_edits = true, + prompt_save_on_select_new_entry = false, + watch_for_changes = true, + }) + end, + }, + + { + "rcarriga/nvim-notify", + priority = 500, + config = function() + require("notify").setup({ + stages = "static", + max_height = function() + return math.floor(vim.o.lines * 0.75) + end, + max_width = function() + return math.floor(vim.o.columns * 0.75) + end, + on_open = function(win) + vim.api.nvim_win_set_config(win, { zindex = 100 }) + end, + }) + end, }, { @@ -669,24 +854,32 @@ require("lazy").setup({ "rcarriga/nvim-notify", "smjonas/inc-rename.nvim", }, - opts = { - lsp = { - override = { - ["vim.lsp.util.convert_input_to_markdown_lines"] = true, - ["vim.lsp.util.stylize_markdown"] = true, - ["cmp.entry.get_documentation"] = true, + config = function() + require("noice").setup({ + lsp = { + override = { + ["vim.lsp.util.convert_input_to_markdown_lines"] = true, + ["vim.lsp.util.stylize_markdown"] = true, + ["cmp.entry.get_documentation"] = true, + }, + progress = { + enabled = false, + }, + hover = { + silent = true, + }, }, - progress = { - enabled = false, + presets = { + bottom_search = true, + long_message_to_split = true, + inc_rename = true, + lsp_doc_border = true, }, - }, - presets = { - bottom_search = true, - long_message_to_split = true, - inc_rename = true, - lsp_doc_border = true, - }, - }, + popupmenu = { + backend = "nui", -- cmp seems broken? + }, + }) + end, }, { "stevearc/dressing.nvim" }, @@ -694,11 +887,13 @@ require("lazy").setup({ { "andweeb/presence.nvim", -- enabled = false, - opts = { - show_time = false, - neovim_image_text = "Neovim", - -- log_level = "debug", - }, + config = function() + require("presence").setup({ + show_time = false, + neovim_image_text = "Neovim", + -- log_level = "debug", + }) + end, }, { @@ -709,26 +904,28 @@ require("lazy").setup({ { "q", "QFToggle!" }, { "l", "LLToggle!" }, }, - opts = {}, + config = true, }, { "yorickpeterse/nvim-pqf", - opts = {}, + config = true, }, { "petertriho/nvim-scrollbar", - dependencies = { "kevinhwang91/nvim-hlslens" }, - opts = function() - return { + dependencies = { + "kevinhwang91/nvim-hlslens", + }, + config = function() + require("scrollbar").setup({ handle = { - color = require("nord.colors").nord2_gui, + color = require("nord.colors").palette.polar_night.brighter, }, handlers = { -- search = true, }, - } + }) end, }, @@ -743,34 +940,39 @@ require("lazy").setup({ { "g*", "g*lua require('hlslens').start()" }, { "g#", "g#lua require('hlslens').start()" }, }, - opts = {}, + config = true, }, { "akinsho/toggleterm.nvim", version = "*", - opts = { - open_mapping = "", - shading_factor = "0", - winbar = { - enabled = true, - }, + keys = { + { "", desc = "Toggle terminal" }, }, + config = function() + require("toggleterm").setup({ + open_mapping = "", + shading_factor = "0", + winbar = { + enabled = true, + }, + }) + end, }, { "ethanholz/nvim-lastplace", - opts = {}, + config = true, }, { "kylechui/nvim-surround", - opts = {}, + config = true, }, { "numtostr/comment.nvim", - opts = {}, + config = true, }, { @@ -798,19 +1000,21 @@ require("lazy").setup({ { "j-hui/fidget.nvim", - opts = {}, + config = true, }, { "lewis6991/gitsigns.nvim", - opts = {}, + config = true, }, { "karb94/neoscroll.nvim", - opts = { - easing_function = "quadratic", - }, + config = function() + require("neoscroll").setup({ + easing_function = "quadratic", + }) + end, }, { "JopjeKnopje/42header_codam" }, @@ -820,87 +1024,101 @@ require("lazy").setup({ { "altermo/ultimate-autopair.nvim", event = { "InsertEnter", "CmdlineEnter" }, - opts = { - fastwarp = { - faster = true, - }, - }, + config = function() + require("ultimate-autopair").setup({ + fastwarp = { + faster = true, + }, + }) + end, }, { "TimUntersberger/neogit", - opts = { - commit_popup = { - kind = "floating", - }, - popup = { - kind = "floating", - }, - }, + config = function() + require("neogit").setup({ + commit_popup = { + kind = "floating", + }, + popup = { + kind = "floating", + }, + }) + end, }, { "sindrets/diffview.nvim", - dependencies = { "nvim-lua/plenary.nvim" }, + dependencies = { + "nvim-lua/plenary.nvim", + }, + config = true, }, { "abecodes/tabout.nvim", - opts = {}, + config = true, }, { "NMAC427/guess-indent.nvim", - opts = {}, + config = true, }, { "NvChad/nvim-colorizer.lua", enabled = false, main = "colorizer", - opts = { - filetypes = { "*", "!lazy" }, - user_default_options = { - RGB = true, -- #RGB hex codes - RRGGBB = true, -- #RRGGBB hex codes - names = false, -- "Name" codes like Blue or blue - RRGGBBAA = false, -- #RRGGBBAA hex codes - AARRGGBB = false, -- 0xAARRGGBB hex codes - rgb_fn = true, -- CSS rgb() and rgba() functions - hsl_fn = true, -- CSS hsl() and hsla() functions - 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", - -- Available methods are false / true / "normal" / "lsp" / "both" - -- True is same as normal - tailwind = "both", - sass = { - enable = true, - parsers = { "css" }, + config = function() + require("colorizer").setup({ + filetypes = { "*", "!lazy" }, + user_default_options = { + RGB = true, -- #RGB hex codes + RRGGBB = true, -- #RRGGBB hex codes + names = false, -- "Name" codes like Blue or blue + RRGGBBAA = false, -- #RRGGBBAA hex codes + AARRGGBB = false, -- 0xAARRGGBB hex codes + rgb_fn = true, -- CSS rgb() and rgba() functions + hsl_fn = true, -- CSS hsl() and hsla() functions + 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", + -- Available methods are false / true / "normal" / "lsp" / "both" + -- True is same as normal + tailwind = "both", + sass = { + enable = true, + parsers = { "css" }, + }, + virtualtext = "■", + -- update color values even if buffer is not focused + -- example use: cmp_menu, cmp_docs + always_update = true, }, - virtualtext = "■", - -- update color values even if buffer is not focused - -- example use: cmp_menu, cmp_docs - always_update = true, - }, - }, + }) + end, }, { "brenoprata10/nvim-highlight-colors", enabled = true, - opts = { - render = "virtual", - enable_tailwind = true, - }, + config = function() + require("nvim-highlight-colors").setup({ + render = "virtual", + enable_tailwind = true, + exclude_filetypes = { "gitcommit", "lazy", "help" }, + }) + end, }, { "xorid/swap-split.nvim", - opts = { - ignore_filetypes = { "NvimTree", "notify", "toggleterm", "Trouble", "qf" }, - }, + config = function() + require("swap-split").setup({ + ignore_filetypes = { "NvimTree", "neo-tree", "notify", "toggleterm", "Trouble", "qf" }, + }) + end, }, { @@ -924,7 +1142,8 @@ require("lazy").setup({ }, }, config = function() - local dap, dapui = require("dap"), require("dapui") + local dap = require("dap") + local dapui = require("dapui") dap.listeners.after.event_initialized["dapui_config"] = function() dapui.open({}) @@ -942,28 +1161,45 @@ require("lazy").setup({ { "Shatur/neovim-session-manager", - dependencies = { "nvim-lua/plenary.nvim" }, + dependencies = { + "nvim-lua/plenary.nvim", + }, main = "session_manager", opts = function() local config = require("session_manager.config") - + ---@module "plenary" + ---@class SessionManager.Settings + ---@field sessions_dir Path The directory where the session files will be saved. + ---@field session_filename_to_dir function(string): Path Function that replaces symbols into separators and colons to transform filename into a session directory. + ---@field dir_to_session_filename function(string): Path Function that replaces separators and colons into special symbols to transform session directory into a filename. Should use `vim.uv.cwd()` if the passed `dir` is `nil`. + ---@field autoload_mode ('Disabled'|'CurrentDir'|'LastSession'|'GitSession')[] Define what to do when Neovim is started without arguments. See "Autoload mode" section below. + ---@field autosave_last_session boolean Automatically save last session on exit and on session switch. + ---@field autosave_ignore_not_normal boolean Plugin will not save a session when no buffers are opened, or all of them aren't writable or listed. + ---@field autosave_ignore_dirs string[] A list of directories where the session will not be autosaved. + ---@field autosave_ignore_filetypes string[] All buffers of these file types will be closed before the session is saved. + ---@field autosave_ignore_buftypes string[] All buffers of these bufer types will be closed before the session is saved. + ---@field autosave_only_in_session boolean Always autosaves session. If true, only autosaves after a session is active. + ---@field max_path_length number Shorten the display path if length exceeds this threshold. Use 0 if don't want to shorten the path at all. return { autoload_mode = { config.AutoloadMode.GitSession, config.AutoloadMode.CurrentDir }, + autosave_ignore_dirs = { "~" }, } end, }, { "chentoast/marks.nvim", - opts = {}, + config = true, }, { "jinh0/eyeliner.nvim", - opts = { - highlight_on_key = true, - dim = true, - }, + config = function() + require("eyeliner").setup({ + highlight_on_key = true, + dim = true, + }) + end, }, { @@ -988,16 +1224,18 @@ require("lazy").setup({ { "", "lua require('tmux').resize_top()", desc = "Resize top", mode = { "n", "t" } }, { "", "lua require('tmux').resize_right()", desc = "Resize right", mode = { "n", "t" } }, }, - opts = { - navigation = { - enable_default_keybindings = false, - }, - resize = { - enable_custom_bindings = false, - resize_step_x = 5, - resize_step_y = 5, - }, - }, + config = function() + require("tmux").setup({ + navigation = { + enable_default_keybindings = false, + }, + resize = { + enable_custom_bindings = false, + resize_step_x = 5, + resize_step_y = 5, + }, + }) + end, }, { @@ -1009,7 +1247,7 @@ require("lazy").setup({ vim.cmd.highlight("WinBar guibg=none") vim.cmd.highlight("WinBarNC guibg=none") end, - opts = {}, + config = true, }, { @@ -1038,23 +1276,88 @@ require("lazy").setup({ { "", "BufferGoto 9", desc = "Buffer goto 9" }, { "", "BufferLast", desc = "Buffer goto last" }, }, - opts = { - auto_hide = 1, - focus_on_close = "previous", - no_name_title = "new", - }, + config = function() + require("barbar").setup({ + auto_hide = 1, + focus_on_close = "previous", + no_name_title = "new", + }) + end, }, { "tzachar/highlight-undo.nvim", init = function() - local nord = require("nord.named_colors") + local nord = require("nord.colors").palette vim.api.nvim_set_hl(0, "HighlightUndo", { - bg = nord.light_gray, - fg = nord.white, + bg = nord.polar_night.brighter, + fg = nord.snow_storm.brightest, + }) + end, + config = true, + }, + + { + "dmmulroy/ts-error-translator.nvim", + enabled = false, + config = true, + }, + + { + "MeanderingProgrammer/render-markdown.nvim", + enabled = false, + dependencies = { + "nvim-treesitter/nvim-treesitter", + "nvim-tree/nvim-web-devicons", + }, -- if you prefer nvim-web-devicons + config = function() + require("render-markdown").setup({ + preset = "lazy", + overrides = { + buftype = { + nofile = { + code = { left_pad = 0, right_pad = 0 }, + }, + }, + }, + }) + end, + }, + + { + "nvimdev/indentmini.nvim", + init = function() + local nord = require("nord.colors").palette + + vim.cmd.highlight("IndentLine guifg=" .. nord.polar_night.brighter) + vim.cmd.highlight("IndentLineCurHide guifg=" .. nord.polar_night.brighter) + vim.cmd.highlight("IndentLineCurrent guifg=" .. nord.polar_night.light) + end, + config = function() + require("indentmini").setup({ + char = "▎", + exclude = { "gitcommit" }, + }) + end, + enabled = true, + }, + + { + "lukas-reineke/indent-blankline.nvim", + main = "ibl", + config = true, + enabled = false, + }, + + { + "https://git.sr.ht/~whynothugo/lsp_lines.nvim", + config = function() + require("lsp_lines").setup() + vim.diagnostic.config({ + virtual_text = false, + virtual_lines = true, }) end, - opts = {}, }, -}) +}