new config using vim.pack
This commit is contained in:
parent
e685165044
commit
17fda33a90
52 changed files with 629 additions and 659 deletions
|
|
@ -1,8 +1,11 @@
|
|||
---@module "utils.plugins"
|
||||
---@type Plugin
|
||||
return {
|
||||
"0xferrous/ansi.nvim",
|
||||
config = true,
|
||||
opts = {
|
||||
auto_enable = false, -- Auto-enable for configured filetypes
|
||||
filetypes = { "log", "ansi" }, -- Filetypes to auto-enable
|
||||
},
|
||||
configure = function(load)
|
||||
load("0xferrous/ansi.nvim")
|
||||
require("ansi").setup({
|
||||
auto_enable = false, -- Auto-enable for configured filetypes
|
||||
filetypes = { "log", "ansi" }, -- Filetypes to auto-enable
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
return {
|
||||
"LukasPietzschmann/boo.nvim",
|
||||
opts = {},
|
||||
}
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
return {
|
||||
"stevearc/conform.nvim",
|
||||
dependencies = { "frostplexx/mason-bridge.nvim" },
|
||||
event = { "BufWritePre" },
|
||||
cmd = { "ConformInfo" },
|
||||
init = function()
|
||||
require("conform").setup({
|
||||
format_on_save = function(bufnr)
|
||||
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||
return
|
||||
end
|
||||
require("conform").formatters_by_ft = require("mason-bridge").get_formatters()
|
||||
return { timeout_ms = 200, lsp_fallback = true }, on_format
|
||||
end,
|
||||
formatters_by_ft = require("mason-bridge").get_formatters(), --[[ = {
|
||||
lua = { "stylua" },
|
||||
javascript = { "prettier" },
|
||||
html = { "prettier" },
|
||||
css = { "prettier" },
|
||||
c = { "clang-format" },
|
||||
cpp = { "clang-format" },
|
||||
arduino = { "clang-format" },
|
||||
sh = { "shfmt" },
|
||||
bash = { "shfmt" },
|
||||
mksh = { "shfmt" },
|
||||
json = { "jq" },
|
||||
}, ]] --
|
||||
|
||||
-- This will provide type hinting with LuaLS
|
||||
---@module "conform"
|
||||
---@type conform.setupOpts
|
||||
formatters = {
|
||||
prettier = {
|
||||
prepend_args = { "--use-tabs", "true" },
|
||||
},
|
||||
jq = {
|
||||
prepend_args = { "--tab" },
|
||||
},
|
||||
["clang-format"] = {
|
||||
prepend_args = function(self, ctx)
|
||||
return { "-style=file:/home/Dario48/.config/.clang-format" }
|
||||
end,
|
||||
},
|
||||
default_format_opts = {
|
||||
lsp_format = "fallback",
|
||||
},
|
||||
},
|
||||
})
|
||||
-- If you want the formatexpr, here is the place to set it
|
||||
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
|
||||
vim.g.arduino_recommended_style = 0
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
return {
|
||||
"vyfor/cord.nvim",
|
||||
build = ":Cord update",
|
||||
-- opts = {}
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
return {
|
||||
url = "https://dario48.site/git/Dario48/darioline.git",
|
||||
config = true,
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
return {
|
||||
"3rd/diagram.nvim",
|
||||
dependencies = {
|
||||
{ "3rd/image.nvim" }, -- you'd probably want to configure image.nvim manually instead of doing this
|
||||
},
|
||||
opts = { -- you can just pass {}, defaults below
|
||||
events = {
|
||||
render_buffer = { "InsertLeave", "BufWinEnter", "TextChanged" },
|
||||
clear_buffer = { "BufLeave" },
|
||||
},
|
||||
renderer_options = {
|
||||
mermaid = {
|
||||
background = nil, -- nil | "transparent" | "white" | "#hex"
|
||||
theme = nil, -- nil | "default" | "dark" | "forest" | "neutral"
|
||||
scale = 1, -- nil | 1 (default) | 2 | 3 | ...
|
||||
width = nil, -- nil | 800 | 400 | ...
|
||||
height = nil, -- nil | 600 | 300 | ...
|
||||
cli_args = nil, -- nil | { "--no-sandbox" } | { "-p", "/path/to/puppeteer" } | ...
|
||||
},
|
||||
plantuml = {
|
||||
charset = nil,
|
||||
cli_args = nil, -- nil | { "-Djava.awt.headless=true" } | ...
|
||||
},
|
||||
d2 = {
|
||||
theme_id = nil,
|
||||
dark_theme_id = nil,
|
||||
scale = nil,
|
||||
layout = nil,
|
||||
sketch = nil,
|
||||
cli_args = nil, -- nil | { "--pad", "0" } | ...
|
||||
},
|
||||
gnuplot = {
|
||||
size = nil, -- nil | "800,600" | ...
|
||||
font = nil, -- nil | "Arial,12" | ...
|
||||
theme = nil, -- nil | "light" | "dark" | custom theme string
|
||||
cli_args = nil, -- nil | { "-p" } | { "-c", "config.plt" } | ...
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
21
lua/plugins/diagrams.lua
Normal file
21
lua/plugins/diagrams.lua
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
---@module "utils.plugins"
|
||||
---@type Plugin
|
||||
return {
|
||||
after = "images",
|
||||
configure = function(load)
|
||||
--load("3rd/diagram.nvim")
|
||||
--require("diagram").setup()
|
||||
|
||||
load("jbyuki/venn.nvim")
|
||||
vim.b.ve = "all"
|
||||
|
||||
vim.api.nvim_create_user_command("VennInit", function()
|
||||
vim.keymap.set("n", "J", "<C-v>j:VBox<CR>", { noremap = true })
|
||||
vim.keymap.set("n", "K", "<C-v>k:VBox<CR>", { noremap = true })
|
||||
vim.keymap.set("n", "L", "<C-v>l:VBox<CR>", { noremap = true })
|
||||
vim.keymap.set("n", "H", "<C-v>h:VBox<CR>", { noremap = true })
|
||||
-- draw a box by pressing "f" with visual selection,
|
||||
vim.keymap.set("v", "f", ":VBox<CR>", { noremap = true })
|
||||
end, {})
|
||||
end,
|
||||
}
|
||||
47
lua/plugins/formatter.lua
Normal file
47
lua/plugins/formatter.lua
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
---@module "utils.plugins"
|
||||
---@type Plugin
|
||||
return {
|
||||
after = "mason-bridge",
|
||||
configure = function(load)
|
||||
load("stevearc/conform.nvim")
|
||||
|
||||
require("conform").setup({
|
||||
formatters_by_ft = require("mason-bridge").get_formatters(),
|
||||
|
||||
format_on_save = function(bufnr)
|
||||
require("conform").formatters_by_ft = require("mason-bridge").get_formatters()
|
||||
|
||||
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||
return
|
||||
else
|
||||
return { timeout_ms = 500, lsp_format = "fallback" }
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("FormatDisable", function(args)
|
||||
if args.bang then
|
||||
-- FormatDisable! will disable formatting globally
|
||||
vim.g.disable_autoformat = true
|
||||
else
|
||||
vim.b.disable_autoformat = true
|
||||
end
|
||||
end, {
|
||||
desc = "Disable autoformat-on-save",
|
||||
bang = true,
|
||||
})
|
||||
vim.api.nvim_create_user_command("FormatEnable", function(args)
|
||||
if args.bang then
|
||||
-- FormatDisable! will disable formatting globally
|
||||
vim.g.disable_autoformat = false
|
||||
else
|
||||
vim.b.disable_autoformat = false
|
||||
end
|
||||
end, {
|
||||
desc = "Enable autoformat-on-save",
|
||||
bang = true,
|
||||
})
|
||||
|
||||
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,11 +1,14 @@
|
|||
---@module "utils.plugins"
|
||||
---@type Plugin
|
||||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
|
||||
keys = {
|
||||
{ "<leader>ff", require("telescope.builtin").find_files, desc = "Telescope find files" },
|
||||
{ "<leader>fg", require("telescope.builtin").live_grep, desc = "Telescope live grep" },
|
||||
{ "<leader>fb", require("telescope.builtin").buffers, desc = "Telescope buffers" },
|
||||
{ "<leader>fh", require("telescope.builtin").help_tags, desc = "Telescope help tags" },
|
||||
},
|
||||
after = "plenary",
|
||||
configures = "telescope",
|
||||
configure = function(load)
|
||||
load("nvim-telescope/telescope.nvim")
|
||||
require("telescope").setup()
|
||||
vim.keymap.set("n", "<leader>ff", require("telescope.builtin").find_files, { desc = "Telescope find files" })
|
||||
vim.keymap.set("n", "<leader>fg", require("telescope.builtin").live_grep, { desc = "Telescope live grep" })
|
||||
vim.keymap.set("n", "<leader>fb", require("telescope.builtin").buffers, { desc = "Telescope buffers" })
|
||||
vim.keymap.set("n", "<leader>fh", require("telescope.builtin").help_tags, { desc = "Telescope help tags" })
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
return {
|
||||
"3rd/image.nvim",
|
||||
opts = {
|
||||
integrations = {
|
||||
markdown = {
|
||||
enabled = true,
|
||||
clear_in_insert_mode = false,
|
||||
download_remote_images = true,
|
||||
only_render_image_at_cursor = false,
|
||||
only_render_image_at_cursor_mode = "popup", -- or "inline"
|
||||
floating_windows = true, -- if true, images will be rendered in floating markdown windows
|
||||
filetypes = { "markdown", "vimwiki", "latex" }, -- markdown extensions (ie. quarto) can go here
|
||||
},
|
||||
},
|
||||
},
|
||||
config = true,
|
||||
}
|
||||
22
lua/plugins/images.lua
Normal file
22
lua/plugins/images.lua
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
---@module "utils.plugins"
|
||||
---@type Plugin
|
||||
return {
|
||||
configures = "images",
|
||||
configure = function(load)
|
||||
load("3rd/image.nvim")
|
||||
|
||||
require("image").setup({
|
||||
integrations = {
|
||||
markdown = {
|
||||
enabled = true,
|
||||
clear_in_insert_mode = false,
|
||||
download_remote_images = true,
|
||||
only_render_image_at_cursor = false,
|
||||
only_render_image_at_cursor_mode = "popup", -- or "inline"
|
||||
floating_windows = true, -- if true, images will be rendered in floating markdown windows
|
||||
filetypes = { "markdown", "vimwiki", "latex" }, -- markdown extensions (ie. quarto) can go here
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
return {
|
||||
"kmonad/kmonad-vim",
|
||||
}
|
||||
|
|
@ -1,7 +1,9 @@
|
|||
---@module "utils.plugins"
|
||||
---@type Plugin
|
||||
return {
|
||||
"lervag/vimtex",
|
||||
init = function()
|
||||
-- VimTeX configuration goes here, e.g.
|
||||
configure = function(load)
|
||||
load("lervag/vimtex")
|
||||
|
||||
vim.g.vimtex_view_method = "mupdf"
|
||||
vim.g.vimtex_compiler_method = "latexmk"
|
||||
vim.g.vimtex_compiler_latexmk = { options = { "-shell-escape" } }
|
||||
99
lua/plugins/lsp.lua
Normal file
99
lua/plugins/lsp.lua
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
---@module "utils.plugins"
|
||||
---@type Plugin
|
||||
return {
|
||||
after = "mason",
|
||||
configure = function(load)
|
||||
load("neovim/nvim-lspconfig")
|
||||
|
||||
load("folke/lazydev.nvim")
|
||||
require("lazydev").setup({})
|
||||
|
||||
--[[
|
||||
---@type vim.lsp.Config
|
||||
local config = {
|
||||
---@type lspconfig.settings.lua_ls
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
version = "LuaJIT",
|
||||
},
|
||||
workspace = {
|
||||
preloadFileSize = 10000,
|
||||
library = {
|
||||
vim.env.VIMRUNTIME,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
vim.lsp.config("lua_ls", config)
|
||||
]]
|
||||
--
|
||||
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
callback = function(args)
|
||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||
if client and client:supports_method("textDocument/completion") then
|
||||
vim.lsp.completion.enable(true, client.id, args.buf, { autotrigger = true })
|
||||
end
|
||||
end,
|
||||
})
|
||||
vim.opt.completeopt = { "menuone", "noinsert", "popup" }
|
||||
vim.keymap.set("i", "<Tab>", function()
|
||||
if vim.fn.pumvisible() == 1 then
|
||||
return "<C-y>"
|
||||
end
|
||||
return "<Tab>"
|
||||
end, { expr = true })
|
||||
|
||||
-- Reserve a space in the gutter
|
||||
-- This will avoid an annoying layout shift in the screen
|
||||
vim.opt.signcolumn = "yes"
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
desc = "LSP actions",
|
||||
callback = function(event)
|
||||
local opts = { buffer = event.buf }
|
||||
|
||||
vim.keymap.set("n", "K", function()
|
||||
vim.lsp.buf.hover()
|
||||
end, opts)
|
||||
vim.keymap.set("n", "gd", function()
|
||||
vim.lsp.buf.definition()
|
||||
end, opts)
|
||||
vim.keymap.set("n", "gD", function()
|
||||
vim.lsp.buf.declaration()
|
||||
end, opts)
|
||||
vim.keymap.set("n", "gi", function()
|
||||
vim.lsp.buf.implementation()
|
||||
end, opts)
|
||||
vim.keymap.set("n", "go", function()
|
||||
vim.lsp.buf.type_definition()
|
||||
end, opts)
|
||||
vim.keymap.set("n", "gr", function()
|
||||
vim.lsp.buf.references()
|
||||
end, opts)
|
||||
vim.keymap.set("n", "gs", function()
|
||||
vim.lsp.buf.signature_help()
|
||||
end, opts)
|
||||
vim.keymap.set("n", "<F2>", function()
|
||||
vim.lsp.buf.rename()
|
||||
end, opts)
|
||||
vim.keymap.set({ "n", "x" }, "<F3>", function()
|
||||
vim.lsp.buf.format({ async = true })
|
||||
end, opts)
|
||||
vim.keymap.set("n", "<leader>f", function()
|
||||
vim.lsp.buf.code_action()
|
||||
end, opts)
|
||||
end,
|
||||
})
|
||||
|
||||
load("mason-org/mason-lspconfig.nvim")
|
||||
|
||||
require("mason-lspconfig").setup({
|
||||
automatic_enable = true,
|
||||
})
|
||||
|
||||
load("LukasPietzschmann/boo.nvim")
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
{ "hrsh7th/cmp-nvim-lsp" },
|
||||
{ "hrsh7th/nvim-cmp" },
|
||||
},
|
||||
config = function()
|
||||
-- Reserve a space in the gutter
|
||||
-- This will avoid an annoying layout shift in the screen
|
||||
vim.opt.signcolumn = "yes"
|
||||
|
||||
-- Add cmp_nvim_lsp capabilities settings to lspconfig
|
||||
-- This should be executed before you configure any language server
|
||||
local lspconfig_defaults = require("lspconfig").util.default_config
|
||||
lspconfig_defaults.capabilities = vim.tbl_deep_extend(
|
||||
"force",
|
||||
lspconfig_defaults.capabilities,
|
||||
require("cmp_nvim_lsp").default_capabilities()
|
||||
)
|
||||
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
desc = "LSP actions",
|
||||
callback = function(event)
|
||||
local opts = { buffer = event.buf }
|
||||
|
||||
vim.keymap.set("n", "K", function()
|
||||
vim.lsp.buf.hover()
|
||||
end, opts)
|
||||
vim.keymap.set("n", "gd", function()
|
||||
vim.lsp.buf.definition()
|
||||
end, opts)
|
||||
vim.keymap.set("n", "gD", function()
|
||||
vim.lsp.buf.declaration()
|
||||
end, opts)
|
||||
vim.keymap.set("n", "gi", function()
|
||||
vim.lsp.buf.implementation()
|
||||
end, opts)
|
||||
vim.keymap.set("n", "go", function()
|
||||
vim.lsp.buf.type_definition()
|
||||
end, opts)
|
||||
vim.keymap.set("n", "gr", function()
|
||||
vim.lsp.buf.references()
|
||||
end, opts)
|
||||
vim.keymap.set("n", "gs", function()
|
||||
vim.lsp.buf.signature_help()
|
||||
end, opts)
|
||||
vim.keymap.set("n", "<F2>", function()
|
||||
vim.lsp.buf.rename()
|
||||
end, opts)
|
||||
vim.keymap.set({ "n", "x" }, "<F3>", function()
|
||||
vim.lsp.buf.format({ async = true })
|
||||
end, opts)
|
||||
vim.keymap.set("n", "<leader>f", function()
|
||||
vim.lsp.buf.code_action()
|
||||
end, opts)
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
10
lua/plugins/mason-bridge.lua
Normal file
10
lua/plugins/mason-bridge.lua
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
---@module "utils.plugins"
|
||||
---@type Plugin
|
||||
return {
|
||||
after = "mason",
|
||||
configures = "mason-bridge",
|
||||
configure = function(load)
|
||||
load("frostplexx/mason-bridge.nvim")
|
||||
require("mason-bridge").setup({})
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,72 +1,13 @@
|
|||
---@module "utils.plugins"
|
||||
---@type Plugin
|
||||
return {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
configures = "mason",
|
||||
configure = function(load)
|
||||
load("mason-org/mason.nvim")
|
||||
vim.keymap.set("n", "<leader>m", ":Mason<CR>", { desc = "open mason" })
|
||||
|
||||
keys = {
|
||||
{ "<leader>m", ":Mason <CR>", desc = "open mason" },
|
||||
},
|
||||
config = true,
|
||||
opts = {
|
||||
require("mason").setup({
|
||||
PATH = "append",
|
||||
},
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
dependencies = { "williamboman/mason.nvim" },
|
||||
opts = {
|
||||
-- Replace the language servers listed here
|
||||
-- with the ones you want to install
|
||||
ensure_installed = { "lua_ls", "clangd", "hyprls" },
|
||||
handlers = {
|
||||
function(server_name)
|
||||
vim.lsp.enable(server_name)
|
||||
end,
|
||||
|
||||
["lua_ls"] = function()
|
||||
vim.lsp.config("lua_ls", {
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
-- Tell the language server which version of Lua you're using
|
||||
-- (most likely LuaJIT in the case of Neovim)
|
||||
version = "LuaJIT",
|
||||
},
|
||||
-- Make the server aware of Neovim runtime files
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
library = {
|
||||
vim.env.VIMRUNTIME,
|
||||
-- Depending on the usage, you might want to add additional paths here.
|
||||
-- "${3rd}/luv/library"
|
||||
-- "${3rd}/busted/library",
|
||||
},
|
||||
-- or pull in all of 'runtimepath'. NOTE: this is a lot slower
|
||||
-- library = vim.api.nvim_get_runtime_file("", true)
|
||||
completion = {
|
||||
callSnippet = "Replace",
|
||||
},
|
||||
doc = {
|
||||
privateName = { "^_" },
|
||||
},
|
||||
hint = {
|
||||
enable = true,
|
||||
setType = false,
|
||||
paramType = true,
|
||||
paramName = "Disable",
|
||||
semicolon = "Disable",
|
||||
arrayIndex = "Disable",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"frostplexx/mason-bridge.nvim",
|
||||
dependencies = { "williamboman/mason.nvim" },
|
||||
config = true,
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,52 +0,0 @@
|
|||
return {
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
"milanglacier/minuet-ai.nvim",
|
||||
config = function()
|
||||
require("minuet").setup({
|
||||
provider = "openai_fim_compatible",
|
||||
n_completions = 1, -- recommend for local model for resource saving
|
||||
context_window = 512,
|
||||
provider_options = {
|
||||
openai_fim_compatible = {
|
||||
-- For Windows users, TERM may not be present in environment variables.
|
||||
-- Consider using APPDATA instead.
|
||||
api_key = "TERM",
|
||||
name = "LLama.cpp",
|
||||
end_point = "http://localhost:8012/v1/completions",
|
||||
model = "PLACEHOLDER",
|
||||
optional = {
|
||||
max_tokens = 56,
|
||||
top_p = 0.9,
|
||||
},
|
||||
template = {
|
||||
prompt = function(context_before_cursor, context_after_cursor, _)
|
||||
return "<|fim_prefix|>"
|
||||
.. context_before_cursor
|
||||
.. "<|fim_suffix|>"
|
||||
.. context_after_cursor
|
||||
.. "<|fim_middle|>"
|
||||
end,
|
||||
suffix = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
virtualtext = {
|
||||
auto_trigger_ft = {},
|
||||
keymap = {
|
||||
-- accept whole completion
|
||||
accept = "<M-T>",
|
||||
-- accept one line
|
||||
accept_line = "<M-t>",
|
||||
-- accept n lines (prompts for number)
|
||||
-- e.g. "A-z 2 CR" will accept 2 lines
|
||||
accept_n_lines = "<M-z>",
|
||||
-- Cycle to prev completion item, or manually invoke completion
|
||||
prev = "<M-h>",
|
||||
-- Cycle to next completion item, or manually invoke completion
|
||||
next = "<M-l>",
|
||||
dismiss = "<M-e>",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,43 +1,38 @@
|
|||
---@module "utils.plugins"
|
||||
---@type Plugin
|
||||
return {
|
||||
"nvim-neorg/neorg",
|
||||
lazy = false, -- Disable lazy loading as some `lazy.nvim` distributions set `lazy = true` by default
|
||||
dependencies = {
|
||||
{
|
||||
"juniorsundar/neorg-extras",
|
||||
-- tag = "v0.3.1" -- Always a safe bet to track current latest release
|
||||
},
|
||||
"nvim-telescope/telescope.nvim", -- Required for the Neorg-Roam features
|
||||
"nvim-lua/plenary.nvim", -- Required as part of Telescope installation
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
opts = {
|
||||
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.concealer"] = {},
|
||||
["core.dirman"] = {
|
||||
config = {
|
||||
workspaces = {
|
||||
school = "~/Documents/school",
|
||||
notes = "~/Documents/notes",
|
||||
uni = "~/Documents/uni",
|
||||
after = { "telescope", "nvim-treesitter" },
|
||||
configure = function(load)
|
||||
load("nvim-neotest/nvim-nio")
|
||||
load("pysan3/pathlib.nvim")
|
||||
load("nvim-neorg/lua-utils.nvim")
|
||||
load("juniorsundar/neorg-extras")
|
||||
load("nvim-neorg/neorg")
|
||||
require("neorg").setup({
|
||||
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.concealer"] = {},
|
||||
-- ["core.completion"] = { config = { engine = "nvim-cmp" } },
|
||||
-- ["core.integrations.treesitter"] = {},
|
||||
["core.clipboard.code-blocks"] = {},
|
||||
["core.esupports.indent"] = {},
|
||||
["core.dirman"] = {
|
||||
config = {
|
||||
workspaces = {
|
||||
school = "~/Documents/school",
|
||||
notes = "~/Documents/notes",
|
||||
uni = "~/Documents/uni",
|
||||
},
|
||||
default_workspace = "notes",
|
||||
},
|
||||
default_workspace = "notes",
|
||||
},
|
||||
},
|
||||
["core.completion"] = { config = { engine = "nvim-cmp" } },
|
||||
["core.integrations.treesitter"] = {},
|
||||
["core.clipboard.code-blocks"] = {},
|
||||
["core.esupports.indent"] = {},
|
||||
},
|
||||
},
|
||||
ft = "norg",
|
||||
cmd = "Neorg",
|
||||
config = true,
|
||||
version = "*",
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
---@module "utils.plugins"
|
||||
---@type Plugin
|
||||
return {
|
||||
"EdenEast/nightfox.nvim",
|
||||
init = function()
|
||||
configure = function(load)
|
||||
load("EdenEast/nightfox.nvim")
|
||||
vim.cmd("colorscheme carbonfox")
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,79 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"hrsh7th/cmp-nvim-lua",
|
||||
"neovim/nvim-lspconfig",
|
||||
"mtoohey31/cmp-fish",
|
||||
"petertriho/cmp-git",
|
||||
},
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
|
||||
cmp.setup({
|
||||
sources = {
|
||||
{
|
||||
name = "lazydev",
|
||||
group_index = 0, -- set group index to 0 to skip loading LuaLS completions
|
||||
},
|
||||
{ name = "nvim_lua" },
|
||||
{
|
||||
name = "nvim_lsp",
|
||||
entry_filter = function(entry, ctx)
|
||||
local kind = require("cmp.types").lsp.CompletionItemKind[entry:get_kind()]
|
||||
|
||||
if kind == "Text" then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end,
|
||||
},
|
||||
{ name = "neorg" },
|
||||
{ name = "fish" },
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
-- You need Neovim v0.10 to use vim.snippet
|
||||
vim.snippet.expand(args.body)
|
||||
end,
|
||||
},
|
||||
cmp.setup.filetype("gitcommit", {
|
||||
sources = cmp.config.sources({
|
||||
{ name = "git" },
|
||||
}, {
|
||||
{ name = "buffer" },
|
||||
}),
|
||||
}),
|
||||
require("cmp_git").setup({}),
|
||||
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<S-NL>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-S-K>"] = cmp.mapping.scroll_docs(-4),
|
||||
[" "] = cmp.mapping.confirm(),
|
||||
}),
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/lazydev.nvim",
|
||||
ft = "lua", -- only load on lua files
|
||||
config = function()
|
||||
local lazydev = require("lazydev")
|
||||
require("lazydev").setup()
|
||||
vim.lsp.enable("lua_ls")
|
||||
vim.lsp.config("lua_ls", {
|
||||
root_dir = function(bufnr, on_dir)
|
||||
on_dir(lazydev.find_workspace(bufnr))
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
@ -1,9 +1,13 @@
|
|||
---@module "utils.plugins"
|
||||
---@type Plugin
|
||||
return {
|
||||
"mfussenegger/nvim-lint",
|
||||
init = function()
|
||||
after = "mason-bridge",
|
||||
configure = function(load)
|
||||
load("mfussenegger/nvim-lint")
|
||||
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||
callback = function()
|
||||
require "lint".try_lint()
|
||||
require("lint").linters_by_ft = require("mason-bridge").get_linters()
|
||||
require("lint").try_lint()
|
||||
end,
|
||||
})
|
||||
|
||||
|
|
@ -15,5 +19,5 @@ return {
|
|||
})
|
||||
|
||||
require("lint").linters_by_ft = require("mason-bridge").get_linters()
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
return {
|
||||
"taeber/vim-peg",
|
||||
lazy = false,
|
||||
}
|
||||
8
lua/plugins/plenary.lua
Normal file
8
lua/plugins/plenary.lua
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
---@module "utils.plugins"
|
||||
---@type Plugin
|
||||
return {
|
||||
configures = "plenary",
|
||||
configure = function(load)
|
||||
load("nvim-lua/plenary.nvim")
|
||||
end,
|
||||
}
|
||||
13
lua/plugins/rpc.lua
Normal file
13
lua/plugins/rpc.lua
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---@module "utils.plugins"
|
||||
---@type Plugin
|
||||
return {
|
||||
configure = function(load)
|
||||
load("vyfor/cord.nvim")
|
||||
require("cord").setup({
|
||||
display = {
|
||||
theme = "catppuccin",
|
||||
flavor = "dark",
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
return {
|
||||
"michaelb/sniprun",
|
||||
branch = "master",
|
||||
|
||||
build = "sh install.sh",
|
||||
-- do 'sh install.sh 1' if you want to force compile locally
|
||||
-- (instead of fetching a binary from the github release). Requires Rust >= 1.65
|
||||
|
||||
opts = {
|
||||
repl_enable = { "Mathematica_original" },
|
||||
interpreter_options = {
|
||||
Lua_nvim = {
|
||||
use_on_filetypes = { "lua" },
|
||||
},
|
||||
Mathematica_original = {
|
||||
use_javagraphics_if_contains = { "Plot" }, -- a pattern that need <<JavaGraphics
|
||||
},
|
||||
},
|
||||
display = {
|
||||
"VirtualLine",
|
||||
},
|
||||
live_mode_toggle = "enable",
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>r", "<Plug>SnipRun", desc = "run snipper", silent = true },
|
||||
{ "<leader>R", "<Plug>SnipLive", desc = "run snipper in REPL mode", silent = true },
|
||||
},
|
||||
|
||||
lazy = false,
|
||||
|
||||
config = true,
|
||||
}
|
||||
8
lua/plugins/statusline.lua
Normal file
8
lua/plugins/statusline.lua
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
---@module "utils.plugins"
|
||||
---@type Plugin
|
||||
return {
|
||||
configure = function(load)
|
||||
load({ "Dario48/darioline", source = "https://dario48.site/git/" })
|
||||
require("darioline").setup()
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
return {
|
||||
"lambdalisue/vim-suda",
|
||||
}
|
||||
15
lua/plugins/table-mode.lua
Normal file
15
lua/plugins/table-mode.lua
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
---@module "utils.plugins"
|
||||
---@type Plugin
|
||||
return {
|
||||
configure = function(load)
|
||||
load("dhruvasagar/vim-table-mode")
|
||||
|
||||
vim.g.table_mode_corner = "+"
|
||||
|
||||
vim.keymap.set("n", "<LocalLeader>tm", "<cmd>TableModeToggle<cr>", { desc = "toggla table mode" })
|
||||
vim.keymap.set("n", "<LocalLeader>tt", "<cmd>Tableize<cr>", { desc = "transform CVS to table" })
|
||||
vim.keymap.set("n", "<LocalLeader>T", function()
|
||||
vim.api.nvim_command("Tableize/" .. vim.fn.input("what separator to use? "))
|
||||
end, { desc = "transform CVS to table" })
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,24 +1,20 @@
|
|||
---@module "utils.plugins"
|
||||
---@type Plugin
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
-- A list of parser names, or "all" (the listed parsers MUST always be installed)
|
||||
ensure_installed = { "c", "lua", "vim", "vimdoc", "query" },
|
||||
configures = "nvim-treesitter",
|
||||
configure = function(load)
|
||||
load("nvim-treesitter/nvim-treesitter")
|
||||
|
||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||
sync_install = true,
|
||||
require("nvim-treesitter").install({ "c", "lua", "vim", "vimdoc", "query" }):wait(300000)
|
||||
|
||||
-- Automatically install missing parsers when entering buffer
|
||||
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
||||
auto_install = false,
|
||||
|
||||
-- List of parsers to ignore installing (or "all")
|
||||
|
||||
---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
|
||||
-- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
|
||||
highlight = { enable = true },
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = require("nvim-treesitter").get_installed(),
|
||||
callback = function()
|
||||
vim.treesitter.start()
|
||||
end,
|
||||
})
|
||||
end,
|
||||
onUpdate = function()
|
||||
vim.cmd("TSUpdate")
|
||||
end,
|
||||
version = "*",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
return {
|
||||
"Apeiros-46B/uiua.vim",
|
||||
}
|
||||
|
|
@ -1,7 +1,9 @@
|
|||
---@module "utils.plugins"
|
||||
---@type Plugin
|
||||
return {
|
||||
"HiPhish/rainbow-delimiters.nvim",
|
||||
lazy = false,
|
||||
init = function()
|
||||
configure = function(load)
|
||||
load("HiPhish/rainbow-delimiters.nvim")
|
||||
|
||||
-- This module contains a number of default definitions
|
||||
local rainbow_delimiters = require("rainbow-delimiters")
|
||||
|
||||
|
|
@ -29,5 +31,8 @@ return {
|
|||
"RainbowDelimiterCyan",
|
||||
},
|
||||
}
|
||||
|
||||
load("nvim-tree/nvim-web-devicons")
|
||||
load("folke/which-key.nvim")
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
return {
|
||||
"jbyuki/venn.nvim",
|
||||
|
||||
config = function()
|
||||
vim.b.ve = "all"
|
||||
end,
|
||||
|
||||
keys = {
|
||||
{ "J", "<C-v>j:VBox<CR>", mode = "n", noremap = true },
|
||||
{ "K", "<C-v>k:VBox<CR>", mode = "n", noremap = true },
|
||||
{ "L", "<C-v>l:VBox<CR>", mode = "n", noremap = true },
|
||||
{ "H", "<C-v>h:VBox<CR>", mode = "n", noremap = true },
|
||||
-- draw a box by pressing "f" with visual selection,
|
||||
{ "f", ":VBox<CR>", mode = "v", noremap = true },
|
||||
},
|
||||
|
||||
lazy = true,
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
return {
|
||||
"luk400/vim-jukit",
|
||||
lazu = true,
|
||||
ft = "ipynb",
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
return {
|
||||
"dhruvasagar/vim-table-mode",
|
||||
config = function()
|
||||
vim.g.table_mode_corner = "+"
|
||||
end,
|
||||
keys = {
|
||||
{ "<LocalLeader>tm", "<cmd>TableModeToggle<cr>", desc = "toggla table mode" },
|
||||
{ "<LocalLeader>tt", "<cmd>Tableize<cr>", desc = "transform CVS to table" },
|
||||
{
|
||||
"<LocalLeader>T",
|
||||
function()
|
||||
vim.api.nvim_command("Tableize/" .. vim.fn.input("what separator to use? "))
|
||||
end,
|
||||
desc = "transform CVS to table",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
return {
|
||||
"folke/which-key.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue