summaryrefslogtreecommitdiffstats
path: root/lua/conf/plugins/neorg.lua
diff options
context:
space:
mode:
authorSquibid <me@zacharyscheiman.com>2025-05-08 18:18:34 -0500
committerSquibid <me@zacharyscheiman.com>2025-05-08 18:18:34 -0500
commit7430ebed8eab0364452a6cdcaa209f8a7288e44d (patch)
treecd80b99c41c4af92c7a130fe52ca462062697d22 /lua/conf/plugins/neorg.lua
parent7c3289fded1f75f6e060f56bd06edc2a327744d9 (diff)
downloadnvim-7430ebed8eab0364452a6cdcaa209f8a7288e44d.tar.gz
nvim-7430ebed8eab0364452a6cdcaa209f8a7288e44d.tar.bz2
nvim-7430ebed8eab0364452a6cdcaa209f8a7288e44d.zip
kitchen sink now don't support any version lower than 0.11.0 for lspv3.0
- dap now works for java and c
Diffstat (limited to 'lua/conf/plugins/neorg.lua')
-rw-r--r--lua/conf/plugins/neorg.lua146
1 files changed, 0 insertions, 146 deletions
diff --git a/lua/conf/plugins/neorg.lua b/lua/conf/plugins/neorg.lua
deleted file mode 100644
index 9193a84..0000000
--- a/lua/conf/plugins/neorg.lua
+++ /dev/null
@@ -1,146 +0,0 @@
--- WARNING: neorg does some pretty stupid stuff when it comes to the plugins it
--- wants (using luarocks), in order to get around all that bullshit I"ve
--- manually added it"s dependencies. Because I don"t want this to randomly break
--- I"ve also pinned neorg to the latest working version that I"ve messed around
--- with.
---
--- NOTE: for my future self to update this thingy while not breaking
--- dependencies take a look at the build.lua for versioning info. Also make sure
--- to check the release notes on github for info on breaking changes.
-
-local workspace_cache
-if not vim.fs then
- workspace_cache = vim.fn.stdpath("data").."/neorg-workspace-cache.lua"
-else
- workspace_cache = vim.fs.joinpath(vim.fn.stdpath("data"), "neorg-workspace-cache.lua")
-end
-
---- populate neorg workspaces from path or cache
----@param path string path to populate workspaces from
----@param cache boolean? if true will re populate the cache from the fs
----@return table workspaces
-local function populate_workspaces(path, cache)
- local workspaces = {}
- cache = cache or false
-
- if vim.fn.filereadable(workspace_cache) == 1 and not cache then
- local ok, ret = pcall(dofile, workspace_cache)
- if ok and type(ret) == "table" then
- return ret
- end
- end
-
- -- loop through all files in path if path is not empty
- if vim.fn.empty(vim.fn.glob(path)) == 0 then
- for n, t in vim.fs.dir(path) do
- if string.sub(n, 1, 1) == "." or (t ~= "directory" and t ~= "link") then
- goto continue
- end
- -- make sure this still works if the last charachter in the path isn"t a "/"
- workspaces[n] = (string.sub(path, #path, #path) == "/") and path..n or path.."/"..n
- ::continue::
- end
- end
-
- -- write data to cachefile
- local f = io.open(workspace_cache, "w+")
- if not f then
- return workspaces
- end
-
- f:write("return")
- local ret = vim.inspect(workspaces)
- if type(ret) == "string" then
- f:write(ret)
- else
- f:write("false")
- end
-
- f:close()
-
- return workspaces
-end
-
-return { "nvim-neorg/neorg",
- disable = not vim.fn.has("nvim-0.10.0"),
- branch = "v9.3.0",
- requires = {
- "nvim-lua/plenary.nvim",
- "nvim-treesitter/nvim-treesitter",
- "folke/zen-mode.nvim",
- "hrsh7th/nvim-cmp",
- { "nvim-neorg/neorg-telescope",
- requires = "nvim-telescope/telescope.nvim"
- },
-
- -- NOTE: these are usually installed by neorg via luarocks, the versions
- -- were picked based on the neorg-scm-1.rockspec found in the root of the
- -- neorg repo
- { "nvim-neotest/nvim-nio",
- branch = "v1.7.0"
- },
- { "nvim-neorg/lua-utils.nvim",
- branch = "v1.0.2"
- },
- { "MunifTanjim/nui.nvim",
- branch = "0.3.0"
- },
- { "pysan3/pathlib.nvim",
- branch = "v2.2.2"
- }
- },
-
- function()
- local wsphome = (os.getenv("XDG_DOCUMENTS_DIR") or
- (os.getenv("HOME").."/Documents")).."/notes/"
-
- require("neorg").setup {
- load = {
- -- not sure how to sort the modules so ima just put the empty ones first
- ["core.defaults"] = {},
- ["core.export"] = {},
- ["core.export.markdown"] = {},
- ["core.integrations.telescope"] = {},
- ["core.summary"] = {},
- ["core.ui.calendar"] = {},
-
- ["core.completion"] = {
- config = {
- engine = "nvim-cmp"
- }
- },
- ["core.concealer"] = {
- config = {
- folds = false
- }
- },
- ["core.dirman"] = {
- config = {
- -- a list of available workspaces are generated at runtime >:)
- workspaces = populate_workspaces(wsphome)
- }
- },
- ["core.esupports.metagen"] = {
- config = {
- type = "auto"
- }
- },
- ["core.presenter"] = {
- config = {
- zen_mode = "zen-mode"
- }
- },
- ["core.qol.toc"] = {
- config = {
- close_after_use = true
- }
- },
- ["core.tangle"] = {
- config = {
- tangle_on_write = true
- }
- }
- }
- }
- end
-}