From fc016bd7b8305874a822768faff5582fe23d8480 Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Wed, 17 Jul 2024 11:44:56 -0700 Subject: [PATCH] WIP: Made a few changes This could use a broader refactor similar to lazyvim that takes advantage of opt merging --- neovim/ftplugin/markdown.vim | 3 +++ neovim/lua/lazy_plugins.lua | 18 ++++++------------ neovim/lua/plugins/completion.lua | 8 -------- vim/ftplugin/markdown.vim | 1 + 4 files changed, 10 insertions(+), 20 deletions(-) diff --git a/neovim/ftplugin/markdown.vim b/neovim/ftplugin/markdown.vim index a50e8d6..bc6956e 100644 --- a/neovim/ftplugin/markdown.vim +++ b/neovim/ftplugin/markdown.vim @@ -4,4 +4,7 @@ set shiftwidth=2 " From plasticboy/vim-markdown via sheerun/vim-polyglot let g:vim_markdown_new_list_item_indent = 0 +" Format frontmatter as YAML +let g:vim_markdown_frontmatter = 1 + call textobj#sentence#init() diff --git a/neovim/lua/lazy_plugins.lua b/neovim/lua/lazy_plugins.lua index 3f0f28a..24fa5eb 100644 --- a/neovim/lua/lazy_plugins.lua +++ b/neovim/lua/lazy_plugins.lua @@ -186,6 +186,7 @@ return { { "https://github.com/mfussenegger/nvim-dap" }, { "nvim-neotest/nvim-nio" }, }, + ft = { "python", "rust" }, config = function() require("dapui").setup({ icons = { @@ -483,9 +484,6 @@ return { }) gs.async_pull() end, - dependencies = { - { "https://github.com/epwalsh/obsidian.nvim" }, - }, event = { "BufRead " .. vim.fn.expand("~") .. "/Documents/Obsidian/**.md", "BufNewFile " .. vim.fn.expand("~") .. "/Documents/Obsidian/**.md", @@ -497,15 +495,11 @@ return { { "https://github.com/nvim-lua/plenary.nvim" }, }, version = "1.x.x", - config = function() - -- TODO: maybe move this to opts? - vim.g.vim_markdown_frontmatter = 1 - require("obsidian").setup({ - workspaces = { - { name = "personal", path = "~/Documents/Obsidian" }, - }, - }) - end, + opts = { + workspaces = { + { name = "personal", path = "~/Documents/Obsidian" }, + }, + }, event = { "BufRead " .. vim.fn.expand("~") .. "/Documents/Obsidian/**.md", "BufNewFile " .. vim.fn.expand("~") .. "/Documents/Obsidian/**.md", diff --git a/neovim/lua/plugins/completion.lua b/neovim/lua/plugins/completion.lua index 62afe7d..e986597 100644 --- a/neovim/lua/plugins/completion.lua +++ b/neovim/lua/plugins/completion.lua @@ -51,14 +51,6 @@ function M.config_cmp() utils.keymap_set("i", "(cmp_complete)", function() require("cmp").complete() end, { desc = "Autocomplete" }) - - -- Maybe add obsidian and obsidian new. This is done here in case obsidian.nvim is loaded before cmp - utils.try_require("cmp_obsidian", function(cmp_obsidian) - cmp.register_source("obsidian", cmp_obsidian.new()) - end) - utils.try_require("cmp_obsidian_new", function(cmp_obsidian_new) - cmp.register_source("obsidian_new", cmp_obsidian_new.new()) - end) end return M diff --git a/vim/ftplugin/markdown.vim b/vim/ftplugin/markdown.vim index 5e94e3c..bfb835a 100644 --- a/vim/ftplugin/markdown.vim +++ b/vim/ftplugin/markdown.vim @@ -3,3 +3,4 @@ set shiftwidth=2 " From plasticboy/vim-markdown via sheerun/vim-polyglot let g:vim_markdown_new_list_item_indent = 0 +let g:vim_markdown_frontmatter = 1