Compare commits
No commits in common. "327651d68dd8fa3ba184e43485c723011bcc25f6" and "109b6dd7173377ebe829e39e6df231a1e5e7dcaa" have entirely different histories.
327651d68d
...
109b6dd717
4 changed files with 25 additions and 43 deletions
2
init.lua
2
init.lua
|
|
@ -13,7 +13,7 @@ local plugins = {
|
||||||
"treesitter",
|
"treesitter",
|
||||||
"nvim-lint",
|
"nvim-lint",
|
||||||
|
|
||||||
"neorg",
|
-- "neorg",
|
||||||
|
|
||||||
"nightfox",
|
"nightfox",
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,8 @@ return {
|
||||||
require("lazydev").setup({})
|
require("lazydev").setup({})
|
||||||
|
|
||||||
load("rafamadriz/friendly-snippets")
|
load("rafamadriz/friendly-snippets")
|
||||||
load("saghen/blink.lib")
|
|
||||||
load("saghen/blink.cmp")
|
load("saghen/blink.cmp")
|
||||||
|
|
||||||
|
|
||||||
---@module "blink.cmp"
|
---@module "blink.cmp"
|
||||||
require("blink.cmp").setup({
|
require("blink.cmp").setup({
|
||||||
keymap = { preset = "super-tab" },
|
keymap = { preset = "super-tab" },
|
||||||
|
|
@ -49,7 +47,22 @@ return {
|
||||||
end,
|
end,
|
||||||
onUpdate = function()
|
onUpdate = function()
|
||||||
vim.notify("Building blink.cmp", vim.log.levels.INFO)
|
vim.notify("Building blink.cmp", vim.log.levels.INFO)
|
||||||
require('blink.cmp').build():pwait()
|
local cmd
|
||||||
|
if vim.fn.executable("nix") == 1 then
|
||||||
|
cmd = { "nix", "run", ".#build-plugin" }
|
||||||
|
elseif vim.fn.executable("cargo") == 1 then
|
||||||
|
cmd = { "cargo", "build", "--release" }
|
||||||
|
else
|
||||||
|
print("either cargo or nix is needed to build blink.cmp fzf")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local obj = vim.system(cmd, { cwd = vim.pack.get({ "blink.cmp" })[1].path })
|
||||||
|
:wait()
|
||||||
|
if obj.code == 0 then
|
||||||
|
vim.notify("Building blink.cmp done", vim.log.levels.INFO)
|
||||||
|
else
|
||||||
|
vim.notify("Building blink.cmp failed", vim.log.levels.ERROR)
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,50 +6,20 @@ return {
|
||||||
load("nvim-neotest/nvim-nio")
|
load("nvim-neotest/nvim-nio")
|
||||||
load("pysan3/pathlib.nvim")
|
load("pysan3/pathlib.nvim")
|
||||||
load("nvim-neorg/lua-utils.nvim")
|
load("nvim-neorg/lua-utils.nvim")
|
||||||
load("nvim-neorg/tree-sitter-norg")
|
load("juniorsundar/neorg-extras")
|
||||||
-- parser {{{
|
|
||||||
local data = vim.fn.stdpath("data")
|
|
||||||
local src = data .. "/site/pack/core/opt/tree-sitter-norg"
|
|
||||||
local src_meta = data .. "/site/pack/core/opt/tree-sitter-norg-meta"
|
|
||||||
local parser_dir = data .. "/site/parser"
|
|
||||||
vim.fn.mkdir(parser_dir, "p")
|
|
||||||
|
|
||||||
local out = parser_dir .. "/norg.so"
|
|
||||||
local out_meta = parser_dir .. "/norg_meta.so"
|
|
||||||
|
|
||||||
|
|
||||||
if not vim.uv.fs_stat(out) and vim.uv.fs_stat(src) then
|
|
||||||
-- not already built, and src present
|
|
||||||
local result = vim.system({ "nix", "build" }, { cwd = src }):wait()
|
|
||||||
if result.code == 0 then
|
|
||||||
vim.system({ "cp", "result/lib/lua/5.1/parser/norg.so", out }, { cwd = src }):wait()
|
|
||||||
else
|
|
||||||
vim.notify("failed to run nix build for norg treesitter, got result " .. tostring(result),
|
|
||||||
vim.log.levels.ERROR)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if not vim.uv.fs_stat(out_meta) and vim.uv.fs_stat(src_meta) then
|
|
||||||
-- not already built, and src present
|
|
||||||
local result = vim.system({ "nix", "build" }, { cwd = src_meta }):wait()
|
|
||||||
if result.code == 0 then
|
|
||||||
vim.system({ "cp", "result/parser", out_meta }, { cwd = src_meta }):wait()
|
|
||||||
else
|
|
||||||
vim.notify("failed to run nix build for norg_meta treesitter, got result " .. tostring(result),
|
|
||||||
vim.log.levels.ERROR)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- }}}
|
|
||||||
|
|
||||||
load("nvim-neorg/neorg")
|
load("nvim-neorg/neorg")
|
||||||
require("neorg").setup({
|
require("neorg").setup({
|
||||||
load = {
|
load = {
|
||||||
|
["external.many-mans"] = {
|
||||||
|
config = {
|
||||||
|
metadata_fold = true, -- If want @data property ... @end to fold
|
||||||
|
code_fold = true, -- If want @code ... @end to fold
|
||||||
|
},
|
||||||
|
},
|
||||||
["core.defaults"] = {},
|
["core.defaults"] = {},
|
||||||
["core.concealer"] = {},
|
["core.concealer"] = {},
|
||||||
-- ["core.completion"] = { config = { engine = "nvim-cmp" } },
|
-- ["core.completion"] = { config = { engine = "nvim-cmp" } },
|
||||||
["core.integrations.treesitter"] = {
|
-- ["core.integrations.treesitter"] = {},
|
||||||
config = { configure_parsers = false },
|
|
||||||
},
|
|
||||||
["core.clipboard.code-blocks"] = {},
|
["core.clipboard.code-blocks"] = {},
|
||||||
["core.esupports.indent"] = {},
|
["core.esupports.indent"] = {},
|
||||||
["core.dirman"] = {
|
["core.dirman"] = {
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ return {
|
||||||
underline = true,
|
underline = true,
|
||||||
update_in_insert = false,
|
update_in_insert = false,
|
||||||
virtual_text = true,
|
virtual_text = true,
|
||||||
virtual_lines = { current_line = true },
|
|
||||||
})
|
})
|
||||||
|
|
||||||
require("lint").linters_by_ft = require("mason-bridge").get_linters()
|
require("lint").linters_by_ft = require("mason-bridge").get_linters()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue