From 98133dad03e2cb9a1c26b71c855f156ec606f54e Mon Sep 17 00:00:00 2001 From: Bas Grolleman Date: Sun, 8 Jun 2025 16:41:51 +0200 Subject: [PATCH] Lots of LSP lessons --- nvim/README.md | 3 +- nvim/lazyvim.json | 2 +- .../follow-md-links.lua | 0 nvim/lua/plugins/lspconfig.lua | 6 ++- nvim/lua/plugins/mkdnflow.lua | 38 +++++++++++++++++++ .../{markdown.lua => render-markdown.lua} | 3 ++ 6 files changed, 49 insertions(+), 3 deletions(-) rename nvim/lua/{plugins => plugins.disable}/follow-md-links.lua (100%) create mode 100644 nvim/lua/plugins/mkdnflow.lua rename nvim/lua/plugins/{markdown.lua => render-markdown.lua} (90%) diff --git a/nvim/README.md b/nvim/README.md index a27b384..705baa6 100644 --- a/nvim/README.md +++ b/nvim/README.md @@ -46,7 +46,8 @@ Seems to be working, but not sure how to use it yet. But in the base it's typing and then just pressing enter. If this thing does a co-pilot call whenever I'm typing, then I suddenly understand why we have such high energy bills. -### Keyboard keys to remember +### LSP Keys - =g Cleanup code - K Get hover definition +- gr (anything) diff --git a/nvim/lazyvim.json b/nvim/lazyvim.json index 4661934..466e64d 100644 --- a/nvim/lazyvim.json +++ b/nvim/lazyvim.json @@ -34,4 +34,4 @@ "NEWS.md": "10960" }, "version": 8 -} \ No newline at end of file +} diff --git a/nvim/lua/plugins/follow-md-links.lua b/nvim/lua/plugins.disable/follow-md-links.lua similarity index 100% rename from nvim/lua/plugins/follow-md-links.lua rename to nvim/lua/plugins.disable/follow-md-links.lua diff --git a/nvim/lua/plugins/lspconfig.lua b/nvim/lua/plugins/lspconfig.lua index 1c015b8..e6b3a2c 100644 --- a/nvim/lua/plugins/lspconfig.lua +++ b/nvim/lua/plugins/lspconfig.lua @@ -2,6 +2,10 @@ return { "neovim/nvim-lspconfig", config = function() require("lspconfig").lua_ls.setup({}) - require("lspconfig").marksman.setup({}) + require("lspconfig").marksman.setup({ + root_dir = require("lspconfig.util").root_pattern(".marksman.toml", ".git", "*.md"), + }) + require("lspconfig").bashls.setup({}) + require("lspconfig").yamlls.setup({}) end, } diff --git a/nvim/lua/plugins/mkdnflow.lua b/nvim/lua/plugins/mkdnflow.lua new file mode 100644 index 0000000..ae090f1 --- /dev/null +++ b/nvim/lua/plugins/mkdnflow.lua @@ -0,0 +1,38 @@ +-- Configuration Documentation https://github.com/jakewvincent/mkdnflow.nvim?tab=readme-ov-file#%EF%B8%8F-configuration +return { + "jakewvincent/mkdnflow.nvim", + config = function() + require("mkdnflow").setup({ + -- Config goes here; leave blank for defaults + perspective = { + priority = "first", + root_tell = false, + }, + new_file_template = { + use_template = true, + placeholders = { + before = { + title = "link_title", + date = "os_date", + }, + after = {}, + }, + template = "# {{ title }}", + }, + links = { + style = "markdown", + name_is_source = false, + conceal = false, + context = 0, + implicit_extension = nil, + transform_implicit = false, + transform_explicit = function(text) + text = text:gsub(" ", "-") + text = text:lower() + return text + end, + create_on_follow_failure = true, + }, + }) + end, +} diff --git a/nvim/lua/plugins/markdown.lua b/nvim/lua/plugins/render-markdown.lua similarity index 90% rename from nvim/lua/plugins/markdown.lua rename to nvim/lua/plugins/render-markdown.lua index e412b56..dc80a29 100644 --- a/nvim/lua/plugins/markdown.lua +++ b/nvim/lua/plugins/render-markdown.lua @@ -15,6 +15,9 @@ return { checkbox = { enabled = true, }, + wikilinks = { + enabled = true, + }, }) end, }