diff --git a/lazyvim.json b/lazyvim.json new file mode 100644 index 0000000..c0e11c4 --- /dev/null +++ b/lazyvim.json @@ -0,0 +1,10 @@ +{ + "extras": [ + "lazyvim.plugins.extras.coding.codeium", + "lazyvim.plugins.extras.editor.leap" + ], + "news": { + "NEWS.md": "2123" + }, + "version": 2 +} \ No newline at end of file diff --git a/lua/config/autocmds.lua b/lua/config/autocmds.lua index 7134bf8..a954a45 100644 --- a/lua/config/autocmds.lua +++ b/lua/config/autocmds.lua @@ -5,6 +5,6 @@ vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, { pattern = { "*.html", "*.tsx", "*.jsx" }, callback = function(_) - vim.cmd("InlineFoldActivate") + vim.cmd("InlineFoldToggle") end, }) diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index 01f66cc..ffe4aed 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -15,3 +15,10 @@ vim.api.nvim_set_keymap("n", "", "(coc-snippets-expand)", { noremap = vim.keymap.set("i", "", vim.fn["codeium#Accept"], { expr = true }) vim.keymap.set("i", "", vim.fn["codeium#Complete"], { expr = true }) + +vim.keymap.set("n", "", function() + require("harpoon.ui").nav_prev() +end, { silent = true, noremap = true }) +vim.keymap.set("n", "", function() + require("harpoon.ui").nav_next() +end, { silent = true, noremap = true }) diff --git a/lua/config/options.lua b/lua/config/options.lua index 4b68f83..233fef1 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -7,8 +7,9 @@ vim.opt.clipboard = "unnamedplus" vim.opt.nu = true vim.opt.relativenumber = true -vim.g.foldmethod = "expr" -vim.g.foldexpr = "nvim_treesitter#foldexpr()" +vim.opt.foldmethod = "manual" +-- vim.g.foldmethod = "manual" +-- vim.g.foldexpr = "nvim_treesitter#foldexpr()" -- vim.opt.foldenable = false vim.opt.tabstop = 2 diff --git a/lua/plugins/colorscheme.lua b/lua/plugins/colorscheme.lua index 2e7fb40..234dda5 100644 --- a/lua/plugins/colorscheme.lua +++ b/lua/plugins/colorscheme.lua @@ -5,7 +5,7 @@ return { { "jul-o/LazyVim", opts = { - colorscheme = "catppuccin-frappe", + colorscheme = "catppuccin-mocha", }, }, } diff --git a/lua/plugins/headlines.lua b/lua/plugins/headlines.lua new file mode 100644 index 0000000..eac51ce --- /dev/null +++ b/lua/plugins/headlines.lua @@ -0,0 +1,27 @@ +return { + "lukas-reineke/headlines.nvim", + opts = function() + local opts = {} + for _, ft in ipairs({ "markdown", "norg", "rmd", "org" }) do + opts[ft] = { + headline_highlights = {}, + -- disable bullets for now. See https://github.com/lukas-reineke/headlines.nvim/issues/66 + -- bullets = {}, + } + for i = 1, 6 do + local hl = "Headline" .. i + vim.api.nvim_set_hl(0, hl, { link = "Headline", default = true }) + table.insert(opts[ft].headline_highlights, hl) + end + end + return opts + end, + ft = { "markdown", "norg", "rmd", "org" }, + config = function(_, opts) + -- PERF: schedule to prevent headlines slowing down opening a file + vim.schedule(function() + require("headlines").setup(opts) + require("headlines").refresh() + end) + end, +} diff --git a/lua/plugins/inline-fold.lua b/lua/plugins/inline-fold.lua index e0bb6d5..cee8b3a 100644 --- a/lua/plugins/inline-fold.lua +++ b/lua/plugins/inline-fold.lua @@ -1,5 +1,6 @@ local tsx = { - { pattern = 'className="([^"]*)"' }, -- classes in html + { pattern = 'className="([^"]*)"' }, + { pattern = 'd="([^"]*)"' }, } local jsx = tsx @@ -11,7 +12,6 @@ return { queries = { html = { { pattern = 'class="([^"]*)"' }, -- classes in html - { pattern = 'className="([^"]*)"' }, -- classes in html { pattern = 'href="(.-)"' }, -- hrefs in html { pattern = 'src="(.-)"' }, -- HTML img src attribute }, diff --git a/lua/plugins/lsp-config.lua b/lua/plugins/lsp-config.lua index 2302d93..a179dd1 100644 --- a/lua/plugins/lsp-config.lua +++ b/lua/plugins/lsp-config.lua @@ -5,6 +5,7 @@ return { tailwindcss = { filetypes_exclude = { "markdown" }, }, + marksman = {}, eslint = {}, emmet_language_server = { filetypes = { @@ -43,7 +44,7 @@ return { }, setup = { eslint = function() - require("lazyvim.util").on_attach(function(client) + require("lazyvim.util").lsp.on_attach(function(client) if client.name == "eslint" then client.server_capabilities.documentFormattingProvider = true elseif client.name == "tsserver" then diff --git a/lua/plugins/luarocks.lua b/lua/plugins/luarocks.lua new file mode 100644 index 0000000..dbbd27a --- /dev/null +++ b/lua/plugins/luarocks.lua @@ -0,0 +1,5 @@ +return { + "vhyrro/luarocks.nvim", + priority = 1000, -- We'd like this plugin to load first out of the rest + config = true, -- This automatically runs `require("luarocks-nvim").setup()` +} diff --git a/lua/plugins/markdown-preview.lua b/lua/plugins/markdown-preview.lua new file mode 100644 index 0000000..cf037cd --- /dev/null +++ b/lua/plugins/markdown-preview.lua @@ -0,0 +1,18 @@ +return { + "iamcco/markdown-preview.nvim", + cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" }, + build = function() + vim.fn["mkdp#util#install"]() + end, + keys = { + { + "cp", + ft = "markdown", + "MarkdownPreviewToggle", + desc = "Markdown Preview", + }, + }, + config = function() + vim.cmd([[do FileType]]) + end, +} diff --git a/lua/plugins/markdown-table.lua b/lua/plugins/markdown-table.lua new file mode 100644 index 0000000..39532b4 --- /dev/null +++ b/lua/plugins/markdown-table.lua @@ -0,0 +1,6 @@ +return { + "kiran94/edit-markdown-table.nvim", + config = true, + dependencies = { "nvim-treesitter/nvim-treesitter" }, + cmd = "EditMarkdownTable", +} diff --git a/lua/plugins/mason.lua b/lua/plugins/mason.lua index 316cd5e..9252447 100644 --- a/lua/plugins/mason.lua +++ b/lua/plugins/mason.lua @@ -5,4 +5,10 @@ -- end, -- } -return {} +return { + "williamboman/mason.nvim", + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "markdownlint", "marksman" }) + end, +} diff --git a/lua/plugins/neogen.lua b/lua/plugins/neogen.lua new file mode 100644 index 0000000..6b3aef2 --- /dev/null +++ b/lua/plugins/neogen.lua @@ -0,0 +1,5 @@ +return { + "danymat/neogen", + dependencies = "nvim-treesitter/nvim-treesitter", + config = true, +} diff --git a/lua/plugins/neorg.lua b/lua/plugins/neorg.lua new file mode 100644 index 0000000..d9569e4 --- /dev/null +++ b/lua/plugins/neorg.lua @@ -0,0 +1,7 @@ +return { + "nvim-neorg/neorg", + dependencies = { "luarocks.nvim" }, + lazy = false, -- Disable lazy loading as some `lazy.nvim` distributions set `lazy = true` by default + version = "*", -- Pin Neorg to the latest stable release + config = true, +} diff --git a/lua/plugins/null-ls.lua b/lua/plugins/none-ls.lua similarity index 77% rename from lua/plugins/null-ls.lua rename to lua/plugins/none-ls.lua index f582a79..67eeedd 100644 --- a/lua/plugins/null-ls.lua +++ b/lua/plugins/none-ls.lua @@ -1,9 +1,12 @@ local augroup = vim.api.nvim_create_augroup("LspFormatting", {}) return { - "jose-elias-alvarez/null-ls.nvim", + "nvimtools/none-ls.nvim", opts = function(_, opts) - local nls = require("null-ls") + local nls = require("none-ls") + opts.sources = vim.list_extend(opts.sources or {}, { + nls.builtins.diagnostics.markdownlint, + }) -- table.insert(opts.sources, nls.builtins.formatting.prettierd) end, config = { diff --git a/lua/plugins/nvim-treesitter.lua b/lua/plugins/nvim-treesitter.lua index bbcdb00..c50c1da 100644 --- a/lua/plugins/nvim-treesitter.lua +++ b/lua/plugins/nvim-treesitter.lua @@ -1,10 +1,20 @@ return { "nvim-treesitter/nvim-treesitter", - opts = { + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "markdown", "markdown_inline" }) + end + end, + setup = { autotag = { enable = true, }, }, + -- opts = { + -- autotag = { + -- enable = true, + -- }, + -- }, dependencies = { { "windwp/nvim-ts-autotag" }, },