Fix neorg dependency and completions

This commit is contained in:
Evie Litherland-Smith 2023-06-10 08:29:21 +01:00
parent 97dd1f8802
commit b52d724e88
3 changed files with 6 additions and 17 deletions

View file

@ -36,19 +36,16 @@ local config = function()
end
end, { "i", "s" }),
},
sources = { { name = "nvim_lsp" }, { name = "luasnip" } },
sources = { { name = "nvim_lsp" }, { name = "luasnip" }, { name = "neorg" } },
}
-- Set configuration for specific filetype.
cmp.setup.filetype("norg", { sources = { { name = "neorg" } } })
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
end
return {
"hrsh7th/nvim-cmp",
cond = not vim.g.vscode,
event = { "InsertEnter", "CmdlineEnter" },
event = "InsertEnter",
dependencies = {
"hrsh7th/cmp-nvim-lsp",
"windwp/nvim-autopairs",

View file

@ -1,16 +1,12 @@
return {
"nvim-neorg/neorg",
cond = function() return vim.fn.executable("nix") == 1 and not vim.g.vscode end,
cond = function() return vim.fn.executable "nix" == 1 and not vim.g.vscode end,
build = ":Neorg sync-parsers",
event = { "FileType norg" },
ft = "norg",
cmd = "Neorg",
lazy = true,
dependencies = { "nvim-lua/plenary.nvim" },
dependencies = { "nvim-lua/plenary.nvim", "nvim-treesitter/nvim-treesitter" },
init = function()
vim.api.nvim_create_autocmd({ "BufNewFile", "BufReadPost" }, {
pattern = { "*.norg" },
command = "set filetype=norg",
})
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
pattern = { "*.norg" },
command = "Neorg update-metadata",
@ -22,12 +18,8 @@ return {
["core.concealer"] = { config = { icon_preset = "diamond" } },
["core.dirman"] = { config = { workspaces = { personal = "~/notes/personal", work = "~/notes/work" } } },
["core.completion"] = { config = { engine = "nvim-cmp" } },
["core.export"] = {},
["core.journal"] = {},
["core.presenter"] = { config = { zen_mode = "zen-mode" } },
["core.summary"] = { config = { strategy = "metadata" } },
-- ["core.ui.calendar"] = {},
-- ["core.integrations.telescope"] = {},
},
},
}

View file

@ -4,7 +4,7 @@ return {
version = false,
build = ":TSUpdate",
event = { "BufReadPre", "BufNewFile" },
dependencies = { "nvim-treesitter/nvim-treesitter-refactor", "nvim-neorg/neorg" },
dependencies = "nvim-treesitter/nvim-treesitter-refactor",
config = function(_, opts)
if type(opts.ensure_installed) == "table" then
-- @type table<string, boolean>