WIP: Made a few changes

This could use a broader refactor similar to lazyvim that takes advantage of opt merging
This commit is contained in:
ViViDboarder 2024-07-17 11:44:56 -07:00
parent b6eb73cb77
commit fc016bd7b8
4 changed files with 10 additions and 20 deletions

View File

@ -4,4 +4,7 @@ set shiftwidth=2
" From plasticboy/vim-markdown via sheerun/vim-polyglot " From plasticboy/vim-markdown via sheerun/vim-polyglot
let g:vim_markdown_new_list_item_indent = 0 let g:vim_markdown_new_list_item_indent = 0
" Format frontmatter as YAML
let g:vim_markdown_frontmatter = 1
call textobj#sentence#init() call textobj#sentence#init()

View File

@ -186,6 +186,7 @@ return {
{ "https://github.com/mfussenegger/nvim-dap" }, { "https://github.com/mfussenegger/nvim-dap" },
{ "nvim-neotest/nvim-nio" }, { "nvim-neotest/nvim-nio" },
}, },
ft = { "python", "rust" },
config = function() config = function()
require("dapui").setup({ require("dapui").setup({
icons = { icons = {
@ -483,9 +484,6 @@ return {
}) })
gs.async_pull() gs.async_pull()
end, end,
dependencies = {
{ "https://github.com/epwalsh/obsidian.nvim" },
},
event = { event = {
"BufRead " .. vim.fn.expand("~") .. "/Documents/Obsidian/**.md", "BufRead " .. vim.fn.expand("~") .. "/Documents/Obsidian/**.md",
"BufNewFile " .. 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" }, { "https://github.com/nvim-lua/plenary.nvim" },
}, },
version = "1.x.x", version = "1.x.x",
config = function() opts = {
-- TODO: maybe move this to opts?
vim.g.vim_markdown_frontmatter = 1
require("obsidian").setup({
workspaces = { workspaces = {
{ name = "personal", path = "~/Documents/Obsidian" }, { name = "personal", path = "~/Documents/Obsidian" },
}, },
}) },
end,
event = { event = {
"BufRead " .. vim.fn.expand("~") .. "/Documents/Obsidian/**.md", "BufRead " .. vim.fn.expand("~") .. "/Documents/Obsidian/**.md",
"BufNewFile " .. vim.fn.expand("~") .. "/Documents/Obsidian/**.md", "BufNewFile " .. vim.fn.expand("~") .. "/Documents/Obsidian/**.md",

View File

@ -51,14 +51,6 @@ function M.config_cmp()
utils.keymap_set("i", "<Plug>(cmp_complete)", function() utils.keymap_set("i", "<Plug>(cmp_complete)", function()
require("cmp").complete() require("cmp").complete()
end, { desc = "Autocomplete" }) 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 end
return M return M

View File

@ -3,3 +3,4 @@ set shiftwidth=2
" From plasticboy/vim-markdown via sheerun/vim-polyglot " From plasticboy/vim-markdown via sheerun/vim-polyglot
let g:vim_markdown_new_list_item_indent = 0 let g:vim_markdown_new_list_item_indent = 0
let g:vim_markdown_frontmatter = 1