diff --git a/lua/plugins/nvim_cmp.lua b/lua/plugins/nvim_cmp.lua index 4d1106d..4b17bd9 100644 --- a/lua/plugins/nvim_cmp.lua +++ b/lua/plugins/nvim_cmp.lua @@ -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", diff --git a/lua/plugins/nvim_neorg.lua b/lua/plugins/nvim_neorg.lua index 52e913d..523bde8 100644 --- a/lua/plugins/nvim_neorg.lua +++ b/lua/plugins/nvim_neorg.lua @@ -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"] = {}, }, }, } diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index f299331..2a70c29 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -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