refactor!: restructure and document configuration
This commit is contained in:
parent
4a02e072a7
commit
f87f9995be
126 changed files with 957 additions and 590 deletions
84
modules/neovim/lua/plugins/astrocore.lua
Normal file
84
modules/neovim/lua/plugins/astrocore.lua
Normal file
|
@ -0,0 +1,84 @@
|
|||
-- AstroCore provides a central place to modify mappings, vim options, autocommands, and more!
|
||||
-- Configuration documentation can be found with `:h astrocore`
|
||||
-- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`)
|
||||
-- as this provides autocomplete and documentation while editing
|
||||
|
||||
---@type LazySpec
|
||||
return {
|
||||
"AstroNvim/astrocore",
|
||||
---@type AstroCoreOpts
|
||||
opts = {
|
||||
-- Configure core features of AstroNvim
|
||||
features = {
|
||||
large_buf = { size = 1024 * 500, lines = 10000 }, -- set global limits for large files for disabling features like treesitter
|
||||
autopairs = true, -- enable autopairs at start
|
||||
cmp = true, -- enable completion at start
|
||||
diagnostics_mode = 3, -- diagnostic mode on start (0 = off, 1 = no signs/virtual text, 2 = no virtual text, 3 = on)
|
||||
highlighturl = true, -- highlight URLs at start
|
||||
notifications = true, -- enable notifications at start
|
||||
},
|
||||
-- Diagnostics configuration (for vim.diagnostics.config({...})) when diagnostics are on
|
||||
diagnostics = {
|
||||
virtual_text = true,
|
||||
underline = true,
|
||||
},
|
||||
-- vim options can be configured here
|
||||
options = {
|
||||
opt = { -- vim.opt.<key>
|
||||
autoindent = true, -- indents automatically based on context
|
||||
expandtab = true, -- use spaces instead of tabs
|
||||
grepprg = "rg --vimgrep", -- use ripgrep on grep actions
|
||||
number = true, -- sets vim.opt.number
|
||||
relativenumber = true, -- sets vim.opt.relativenumber
|
||||
shiftwidth = 2, -- how many spaces after indentation
|
||||
signcolumn = "auto", -- sets vim.opt.signcolumn to auto
|
||||
smartindent = true, -- smartly indent
|
||||
spell = false, -- sets vim.opt.spell
|
||||
tabstop = 2, -- how many spaces to indent when pressing tab
|
||||
wrap = false, -- sets vim.opt.wrap
|
||||
},
|
||||
g = { -- vim.g.<key>
|
||||
-- configure global vim variables (vim.g)
|
||||
-- NOTE: `mapleader` and `maplocalleader` must be set in the AstroNvim opts or before `lazy.setup`
|
||||
-- This can be found in the `lua/lazy_setup.lua` file
|
||||
},
|
||||
},
|
||||
-- Mappings can be configured through AstroCore as well.
|
||||
-- NOTE: keycodes follow the casing in the vimdocs. For example, `<Leader>` must be capitalized
|
||||
mappings = {
|
||||
-- first key is the mode
|
||||
n = {
|
||||
-- second key is the lefthand side of the map
|
||||
|
||||
-- navigate buffer tabs with `H` and `L`
|
||||
-- L = {
|
||||
-- function() require("astrocore.buffer").nav(vim.v.count > 0 and vim.v.count or 1) end,
|
||||
-- desc = "Next buffer",
|
||||
-- },
|
||||
-- H = {
|
||||
-- function() require("astrocore.buffer").nav(-(vim.v.count > 0 and vim.v.count or 1)) end,
|
||||
-- desc = "Previous buffer",
|
||||
-- },
|
||||
|
||||
-- mappings seen under group name "Buffer"
|
||||
["<Leader>bD"] = {
|
||||
function()
|
||||
require("astroui.status.heirline").buffer_picker(function(bufnr)
|
||||
require("astrocore.buffer").close(bufnr)
|
||||
end)
|
||||
end,
|
||||
desc = "Pick to close",
|
||||
},
|
||||
-- tables with just a `desc` key will be registered with which-key if it's installed
|
||||
-- this is useful for naming menus
|
||||
["<Leader>b"] = { desc = "Buffers" },
|
||||
-- quick save
|
||||
-- ["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command
|
||||
},
|
||||
t = {
|
||||
-- setting a mapping to false will disable it
|
||||
-- ["<esc>"] = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
37
modules/neovim/lua/plugins/astroui.lua
Normal file
37
modules/neovim/lua/plugins/astroui.lua
Normal file
|
@ -0,0 +1,37 @@
|
|||
-- AstroUI provides the basis for configuring the AstroNvim User Interface
|
||||
-- Configuration documentation can be found with `:h astroui`
|
||||
-- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`)
|
||||
-- as this provides autocomplete and documentation while editing
|
||||
|
||||
---@type LazySpec
|
||||
return {
|
||||
"AstroNvim/astroui",
|
||||
---@type AstroUIOpts
|
||||
opts = {
|
||||
-- change colorscheme
|
||||
colorscheme = "catppuccin-frappe",
|
||||
-- AstroUI allows you to easily modify highlight groups easily for any and all colorschemes
|
||||
highlights = {
|
||||
init = { -- this table overrides highlights in all themes
|
||||
-- Normal = { bg = "#000000" },
|
||||
},
|
||||
astrotheme = { -- a table of overrides/changes when applying the astrotheme theme
|
||||
-- Normal = { bg = "#000000" },
|
||||
},
|
||||
},
|
||||
-- Icons can be configured throughout the interface
|
||||
icons = {
|
||||
-- configure the loading of the lsp in the status line
|
||||
LSPLoading1 = "⠋",
|
||||
LSPLoading2 = "⠙",
|
||||
LSPLoading3 = "⠹",
|
||||
LSPLoading4 = "⠸",
|
||||
LSPLoading5 = "⠼",
|
||||
LSPLoading6 = "⠴",
|
||||
LSPLoading7 = "⠦",
|
||||
LSPLoading8 = "⠧",
|
||||
LSPLoading9 = "⠇",
|
||||
LSPLoading10 = "⠏",
|
||||
},
|
||||
},
|
||||
}
|
15
modules/neovim/lua/plugins/luasnip.lua
Normal file
15
modules/neovim/lua/plugins/luasnip.lua
Normal file
|
@ -0,0 +1,15 @@
|
|||
return {
|
||||
"L3MON4D3/LuaSnip",
|
||||
config = function(plugin, opts)
|
||||
-- include the default astronvim config that calls the setup call
|
||||
require "astronvim.plugins.configs.luasnip" (plugin, opts)
|
||||
|
||||
-- load snippets paths
|
||||
require("luasnip.loaders.from_lua").lazy_load {
|
||||
paths = { vim.fn.stdpath "config" .. "/snippets" },
|
||||
}
|
||||
|
||||
-- extend 'razor' files with html snippets
|
||||
require("luasnip").filetype_extend("razor", { "html" })
|
||||
end,
|
||||
}
|
31
modules/neovim/lua/plugins/mason.lua
Normal file
31
modules/neovim/lua/plugins/mason.lua
Normal file
|
@ -0,0 +1,31 @@
|
|||
-- Customize Mason plugins
|
||||
|
||||
---@type LazySpec
|
||||
return {
|
||||
-- use mason-lspconfig to configure LSP installations
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
-- overrides `require("mason-lspconfig").setup(...)`
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = nil
|
||||
opts.automatic_installation = false
|
||||
end,
|
||||
},
|
||||
-- use mason-null-ls to configure Formatters/Linter installation for null-ls sources
|
||||
{
|
||||
"jay-babu/mason-null-ls.nvim",
|
||||
-- overrides `require("mason-null-ls").setup(...)`
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = nil
|
||||
opts.automatic_installation = false
|
||||
end,
|
||||
},
|
||||
{
|
||||
"jay-babu/mason-nvim-dap.nvim",
|
||||
-- overrides `require("mason-nvim-dap").setup(...)`
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = nil
|
||||
opts.automatic_installation = false
|
||||
end,
|
||||
},
|
||||
}
|
9
modules/neovim/lua/plugins/nix-store.lua
Normal file
9
modules/neovim/lua/plugins/nix-store.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
---@type LazySpec
|
||||
return {
|
||||
"wizardlink/nix-store.nvim",
|
||||
priority = 999999,
|
||||
lazy = false,
|
||||
opts = {
|
||||
allow_unfree = true,
|
||||
},
|
||||
}
|
64
modules/neovim/lua/plugins/none-ls.lua
Normal file
64
modules/neovim/lua/plugins/none-ls.lua
Normal file
|
@ -0,0 +1,64 @@
|
|||
-- Customize None-ls sources
|
||||
|
||||
---@type LazySpec
|
||||
return {
|
||||
"nvimtools/none-ls.nvim",
|
||||
dependencies = {
|
||||
"nvimtools/none-ls-extras.nvim",
|
||||
},
|
||||
opts = function(_, config)
|
||||
-- config variable is the default configuration table for the setup function call
|
||||
local null_ls = require "null-ls"
|
||||
local helpers = require "null-ls.helpers"
|
||||
|
||||
-- local deno_fmt = helpers.make_builtin({
|
||||
-- name = "deno_fmt",
|
||||
-- filetypes = {
|
||||
-- "angular",
|
||||
-- "astro",
|
||||
-- "css",
|
||||
-- "html",
|
||||
-- "javascript",
|
||||
-- "json",
|
||||
-- "jsonc",
|
||||
-- "less",
|
||||
-- "markdown",
|
||||
-- "sass",
|
||||
-- "scss",
|
||||
-- "svelte",
|
||||
-- "typescript",
|
||||
-- "vue",
|
||||
-- "yaml",
|
||||
-- },
|
||||
-- method = { null_ls.methods.FORMATTING },
|
||||
-- generator_opts = {
|
||||
-- command = "deno",
|
||||
-- args = { "fmt", "--unstable-component", "-" },
|
||||
-- to_stdin = true,
|
||||
-- },
|
||||
-- factory = helpers.formatter_factory,
|
||||
-- })
|
||||
|
||||
-- Check supported formatters and linters
|
||||
-- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/formatting
|
||||
-- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
|
||||
config.sources = require("astrocore").list_insert_unique(config.sources, {
|
||||
-- Set a formatter
|
||||
require "none-ls.diagnostics.flake8",
|
||||
require "none-ls.formatting.ruff",
|
||||
null_ls.builtins.formatting.clang_format.with {
|
||||
disabled_filetypes = { "cs" },
|
||||
},
|
||||
null_ls.builtins.formatting.csharpier,
|
||||
null_ls.builtins.formatting.nixfmt,
|
||||
null_ls.builtins.formatting.stylua,
|
||||
--deno_fmt,
|
||||
null_ls.builtins.formatting.prettierd,
|
||||
|
||||
null_ls.builtins.code_actions.statix,
|
||||
|
||||
null_ls.builtins.diagnostics.deadnix,
|
||||
})
|
||||
return config -- return final config table
|
||||
end,
|
||||
}
|
84
modules/neovim/lua/plugins/nvim-dap.lua
Normal file
84
modules/neovim/lua/plugins/nvim-dap.lua
Normal file
|
@ -0,0 +1,84 @@
|
|||
---@type LazySpec
|
||||
return {
|
||||
"mfussenegger/nvim-dap",
|
||||
config = function()
|
||||
local dap = require "dap"
|
||||
|
||||
---@type dap.Adapter
|
||||
dap.adapters.codelldb = {
|
||||
port = "${port}",
|
||||
type = "server",
|
||||
executable = {
|
||||
command = "codelldb",
|
||||
args = { "--port", "${port}" },
|
||||
},
|
||||
}
|
||||
|
||||
---@type dap.Configuration[]
|
||||
dap.configurations.rust = {
|
||||
{
|
||||
name = "Launch file",
|
||||
type = "codelldb",
|
||||
request = "launch",
|
||||
program = function()
|
||||
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file")
|
||||
end,
|
||||
cwd = "${workspaceFolder}",
|
||||
stopOnEntry = false,
|
||||
},
|
||||
}
|
||||
|
||||
---@type dap.Adapter
|
||||
dap.adapters.cppdbg = {
|
||||
id = "cppdbg",
|
||||
type = "executable",
|
||||
command = vim.fn.get_nix_store "vscode-extensions.ms-vscode.cpptools"
|
||||
.. "/share/vscode/extensions/ms-vscode.cpptools/debugAdapters/bin/OpenDebugAD7",
|
||||
}
|
||||
|
||||
---@type dap.Configuration[]
|
||||
dap.configurations.cpp = {
|
||||
{
|
||||
name = "Launch file",
|
||||
type = "cppdbg",
|
||||
request = "launch",
|
||||
program = function()
|
||||
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file")
|
||||
end,
|
||||
cwd = "${workspaceFolder}",
|
||||
stopAtEntry = true,
|
||||
},
|
||||
{
|
||||
name = "Attach to gdbserver :1234",
|
||||
type = "cppdbg",
|
||||
request = "launch",
|
||||
MIMode = "gdb",
|
||||
miDebuggerServerAddress = "localhost:1234",
|
||||
miDebuggerPath = "/usr/bin/gdb",
|
||||
cwd = "${workspaceFolder}",
|
||||
program = function()
|
||||
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file")
|
||||
end,
|
||||
},
|
||||
}
|
||||
dap.configurations.c = dap.configurations.cpp
|
||||
|
||||
---@type dap.Adapter
|
||||
dap.adapters.godot = {
|
||||
type = "server",
|
||||
host = "127.0.0.1",
|
||||
port = 6006,
|
||||
}
|
||||
|
||||
---@type dap.Configuration[]
|
||||
dap.configurations.gdscript = {
|
||||
{
|
||||
name = "Launch scene",
|
||||
type = "godot",
|
||||
request = "launch",
|
||||
project = "${workspaceFolder}",
|
||||
scene = "current",
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
11
modules/neovim/lua/plugins/nvim-lint.lua
Normal file
11
modules/neovim/lua/plugins/nvim-lint.lua
Normal file
|
@ -0,0 +1,11 @@
|
|||
return {
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
optional = true,
|
||||
opts = {
|
||||
linters_by_ft = {
|
||||
nix = { "statix", "deadnix" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
32
modules/neovim/lua/plugins/nvim-ufo.lua
Normal file
32
modules/neovim/lua/plugins/nvim-ufo.lua
Normal file
|
@ -0,0 +1,32 @@
|
|||
---@type LazySpec
|
||||
return {
|
||||
"kevinhwang91/nvim-ufo",
|
||||
opts = {
|
||||
provider_selector = function(_, filetype, _)
|
||||
---@type table<string, UfoProviderEnum | UfoProviderEnum[]>
|
||||
local ftDefaults = {
|
||||
cs = "treesitter",
|
||||
}
|
||||
|
||||
local function handleFallbackException(bufnr, err, providerName)
|
||||
if type(err) == "string" and err:match "UfoFallbackException" then
|
||||
return require("ufo").getFolds(bufnr, providerName)
|
||||
else
|
||||
return require("promise").reject(err)
|
||||
end
|
||||
end
|
||||
|
||||
return ftDefaults[filetype]
|
||||
or function(bufnr)
|
||||
return require("ufo")
|
||||
.getFolds(bufnr, "lsp")
|
||||
:catch(function(err)
|
||||
return handleFallbackException(bufnr, err, "treesitter")
|
||||
end)
|
||||
:catch(function(err)
|
||||
return handleFallbackException(bufnr, err, "indent")
|
||||
end)
|
||||
end
|
||||
end,
|
||||
},
|
||||
}
|
137
modules/neovim/lua/plugins/roslyn-nvim.lua
Normal file
137
modules/neovim/lua/plugins/roslyn-nvim.lua
Normal file
|
@ -0,0 +1,137 @@
|
|||
---@type LazySpec
|
||||
return {
|
||||
{
|
||||
"seblyng/roslyn.nvim",
|
||||
ft = { "cs", "razor" },
|
||||
lazy = true,
|
||||
dependencies = {
|
||||
{
|
||||
"tris203/rzls.nvim",
|
||||
opts = function(_, opts)
|
||||
opts = {
|
||||
capabilities = vim.lsp.protocol.make_client_capabilities(),
|
||||
path = vim.fn.get_nix_store "rzls" .. "/bin/rzls",
|
||||
}
|
||||
|
||||
return opts
|
||||
end,
|
||||
},
|
||||
},
|
||||
opts = function(_, opts)
|
||||
local rzlspath = vim.fn.get_nix_store "rzls"
|
||||
require("roslyn.config").get()
|
||||
|
||||
opts = {
|
||||
exe = "Microsoft.CodeAnalysis.LanguageServer",
|
||||
args = {
|
||||
"--stdio",
|
||||
"--logLevel=Information",
|
||||
"--extensionLogDirectory=" .. vim.fs.dirname(vim.lsp.get_log_path()),
|
||||
"--razorSourceGenerator=" .. rzlspath .. "/lib/rzls/Microsoft.CodeAnalysis.Razor.Compiler.dll",
|
||||
"--razorDesignTimePath="
|
||||
.. rzlspath
|
||||
.. "/lib/rzls/Targets/Microsoft.NET.Sdk.Razor.DesignTime.targets",
|
||||
},
|
||||
---@type vim.lsp.ClientConfig
|
||||
---@diagnostic disable-next-line: missing-fields
|
||||
config = {
|
||||
handlers = require "rzls.roslyn_handlers",
|
||||
settings = {
|
||||
["csharp|inlay_hints"] = {
|
||||
csharp_enable_inlay_hints_for_implicit_object_creation = true,
|
||||
csharp_enable_inlay_hints_for_implicit_variable_types = true,
|
||||
|
||||
csharp_enable_inlay_hints_for_lambda_parameter_types = true,
|
||||
csharp_enable_inlay_hints_for_types = true,
|
||||
dotnet_enable_inlay_hints_for_indexer_parameters = true,
|
||||
dotnet_enable_inlay_hints_for_literal_parameters = true,
|
||||
dotnet_enable_inlay_hints_for_object_creation_parameters = true,
|
||||
dotnet_enable_inlay_hints_for_other_parameters = true,
|
||||
dotnet_enable_inlay_hints_for_parameters = true,
|
||||
dotnet_suppress_inlay_hints_for_parameters_that_differ_only_by_suffix = true,
|
||||
dotnet_suppress_inlay_hints_for_parameters_that_match_argument_name = true,
|
||||
dotnet_suppress_inlay_hints_for_parameters_that_match_method_intent = true,
|
||||
},
|
||||
["csharp|code_lens"] = {
|
||||
dotnet_enable_references_code_lens = true,
|
||||
},
|
||||
},
|
||||
---@class RoslynPatchedClient: vim.lsp.Client
|
||||
---@field patched boolean?
|
||||
|
||||
---@param client RoslynPatchedClient
|
||||
---@param bufnr integer
|
||||
on_attach = function(client, bufnr)
|
||||
-- Call AstroLSP's on_attach so it registers mappings, formatting, etc.
|
||||
require("astrolsp").on_attach(client, bufnr)
|
||||
|
||||
-- HACK: Patch out the `roslyn-ls` LSP client to have proper
|
||||
-- semantic tokens.
|
||||
-- This is a snippet of code taken and modified from:
|
||||
-- https://github.com/seblyng/roslyn.nvim/wiki#semantic-tokens
|
||||
if client.patched then
|
||||
return
|
||||
else
|
||||
client.patched = true
|
||||
end
|
||||
|
||||
-- let the runtime know the server can do semanticTokens/full now
|
||||
client.server_capabilities = vim.tbl_deep_extend("force", client.server_capabilities, {
|
||||
semanticTokensProvider = {
|
||||
full = true,
|
||||
},
|
||||
})
|
||||
|
||||
local lsp_request = client.request
|
||||
|
||||
client.request = function(method, params, handler, req_bufnr)
|
||||
if method ~= vim.lsp.protocol.Methods.textDocument_semanticTokens_full then
|
||||
return lsp_request(method, params, handler, req_bufnr)
|
||||
end
|
||||
|
||||
local target_bufnr = vim.uri_to_bufnr(params.textDocument.uri)
|
||||
local line_count = vim.api.nvim_buf_line_count(target_bufnr)
|
||||
local last_line =
|
||||
vim.api.nvim_buf_get_lines(target_bufnr, line_count - 1, line_count, true)[1]
|
||||
|
||||
local returnvalue = lsp_request("textDocument/semanticTokens/range", {
|
||||
textDocument = params.textDocument,
|
||||
range = {
|
||||
["start"] = {
|
||||
line = 0,
|
||||
character = 0,
|
||||
},
|
||||
["end"] = {
|
||||
line = line_count - 1,
|
||||
character = string.len(last_line) - 1,
|
||||
},
|
||||
},
|
||||
}, handler, req_bufnr)
|
||||
return returnvalue
|
||||
end
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
return opts
|
||||
end,
|
||||
init = function()
|
||||
vim.filetype.add {
|
||||
extension = {
|
||||
razor = "razor",
|
||||
cshtml = "razor",
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-neotest/neotest",
|
||||
dependencies = { "Issafalcon/neotest-dotnet", config = function() end },
|
||||
opts = function(_, opts)
|
||||
if not opts.adapters then
|
||||
opts.adapters = {}
|
||||
end
|
||||
table.insert(opts.adapters, require "neotest-dotnet" (require("astrocore").plugin_opts "neotest-dotnet"))
|
||||
end,
|
||||
},
|
||||
}
|
58
modules/neovim/lua/plugins/treesitter.lua
Normal file
58
modules/neovim/lua/plugins/treesitter.lua
Normal file
|
@ -0,0 +1,58 @@
|
|||
-- Customize Treesitter
|
||||
|
||||
---@type LazySpec
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
---@param _ LazyPlugin
|
||||
---@param opts TSConfig
|
||||
opts = function(_, opts)
|
||||
-- disable automatically installing parsers
|
||||
opts.auto_install = false
|
||||
|
||||
-- add more things to the ensure_installed table protecting against community packs modifying it
|
||||
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed --[[@as string[]], {
|
||||
-- Programming
|
||||
"c",
|
||||
"c_sharp",
|
||||
"cmake",
|
||||
"cpp",
|
||||
"css",
|
||||
"gdscript",
|
||||
"godot_resource",
|
||||
"html",
|
||||
"hyprlang",
|
||||
"javascript",
|
||||
"jsdoc",
|
||||
"lua",
|
||||
"nim",
|
||||
"nim_format_string",
|
||||
"objc",
|
||||
"proto",
|
||||
"python",
|
||||
"razor",
|
||||
"svelte",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vue",
|
||||
-- Scripting
|
||||
"bash",
|
||||
"fish",
|
||||
"glsl",
|
||||
-- Configuring
|
||||
"dockerfile",
|
||||
"json",
|
||||
"jsonc",
|
||||
"nix",
|
||||
"vhs",
|
||||
"yaml",
|
||||
-- Misc
|
||||
"cuda",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"query",
|
||||
-- VIM
|
||||
"vim",
|
||||
"vimdoc",
|
||||
})
|
||||
end,
|
||||
}
|
211
modules/neovim/lua/plugins/user.lua
Normal file
211
modules/neovim/lua/plugins/user.lua
Normal file
|
@ -0,0 +1,211 @@
|
|||
-- You can also add or configure plugins by creating files in this `plugins/` folder
|
||||
-- Here are some examples:
|
||||
|
||||
---@type LazySpec
|
||||
return {
|
||||
-- Customize alpha options
|
||||
{
|
||||
"goolord/alpha-nvim",
|
||||
opts = function(_, opts)
|
||||
-- customize the dashboard header
|
||||
opts.section.header.val = {
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣠⣤⣶⣶⣾⣿⣿⣿⣿⣷⣶⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣶⣾⣿⣿⣿⣿⣷⣶⣶⣤⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⢀⣠⡴⠾⠟⠋⠉⠉⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠁⠀⠀⠀⠀⠀⠀⠀⠉⠉⠙⠛⠷⢦⣄⡀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠘⠋⠁⠀⠀⢀⣀⣤⣶⣖⣒⣒⡲⠶⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⠶⢖⣒⣒⣲⣶⣤⣀⡀⠀⠀⠈⠙⠂⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⣠⢖⣫⣷⣿⣿⣿⣿⣿⣿⣶⣤⡙⢦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡴⢋⣤⣾⣿⣿⣿⣿⣿⣿⣾⣝⡲⣄⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⣄⣀⣠⢿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠻⢿⣿⣿⣦⣳⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣟⣴⣿⣿⡿⠟⠻⢿⣿⣿⣿⣿⣿⣿⣿⡻⣄⣀⣤⠀⠀⠀",
|
||||
"⠀⠀⠀⠈⠟⣿⣿⣿⡿⢻⣿⣿⣿⠃⠀⠀⠀⠀⠙⣿⣿⣿⠓⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠚⣿⣿⣿⠋⠀⠀⠀⠀⠘⣿⣿⣿⡟⢿⣿⣿⣟⠻⠁⠀⠀⠀",
|
||||
"⠤⣤⣶⣶⣿⣿⣿⡟⠀⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⢻⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⡏⠀⠀⠀⠀⠀⠀⣹⣿⣿⣷⠈⢻⣿⣿⣿⣶⣦⣤⠤",
|
||||
"⠀⠀⠀⠀⠀⢻⣟⠀⠀⣿⣿⣿⣿⡀⠀⠀⠀⠀⢀⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢻⣿⣿⡀⠀⠀⠀⠀⢀⣿⣿⣿⣿⠀⠀⣿⡟⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠻⣆⠀⢹⣿⠟⢿⣿⣦⣤⣤⣴⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⡿⢷⣤⣤⣤⣴⣿⣿⣿⣿⡇⠀⣰⠟⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠙⠂⠀⠙⢀⣀⣿⣿⣿⣿⣿⣿⣿⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠻⠁⠀⣻⣿⣿⣿⣿⣿⣿⠏⠀⠘⠃⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡈⠻⠿⣿⣿⣿⡿⠟⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠻⢿⣿⣿⣿⠿⠛⢁⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠚⠛⣶⣦⣤⣤⣤⡤⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠰⢤⣤⣤⣤⣶⣾⠛⠓⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
||||
}
|
||||
return opts
|
||||
end,
|
||||
},
|
||||
|
||||
-- Add the catppuccin colorscheme
|
||||
{
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
priority = 1000,
|
||||
---@type CatppuccinOptions
|
||||
opts = {
|
||||
integrations = {
|
||||
aerial = true,
|
||||
alpha = true,
|
||||
cmp = true,
|
||||
dap = true,
|
||||
dap_ui = true,
|
||||
gitsigns = true,
|
||||
illuminate = true,
|
||||
indent_blankline = true,
|
||||
markdown = true,
|
||||
mason = true,
|
||||
native_lsp = { enabled = true },
|
||||
neotree = true,
|
||||
notify = true,
|
||||
semantic_tokens = true,
|
||||
symbols_outline = true,
|
||||
telescope = true,
|
||||
treesitter = true,
|
||||
ts_rainbow = false,
|
||||
ufo = true,
|
||||
which_key = true,
|
||||
window_picker = true,
|
||||
colorful_winsep = { enabled = true, color = "lavender" },
|
||||
},
|
||||
},
|
||||
specs = {
|
||||
{
|
||||
"akinsho/bufferline.nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
return require("astrocore").extend_tbl(opts, {
|
||||
highlights = require("catppuccin.groups.integrations.bufferline").get(),
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
optional = true,
|
||||
opts = {
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Makes most if not all groups have a transparent background.
|
||||
{
|
||||
"xiyaowong/transparent.nvim",
|
||||
opts = function(_, opts)
|
||||
local transparent = require "transparent"
|
||||
|
||||
opts.groups = {
|
||||
"Comment",
|
||||
"Conditional",
|
||||
"Constant",
|
||||
"CursorLine",
|
||||
"CursorLineNr",
|
||||
"EndOfBuffer",
|
||||
"Function",
|
||||
"Identifier",
|
||||
"LineNr",
|
||||
"NonText",
|
||||
"Normal",
|
||||
"NormalNC",
|
||||
"Operator",
|
||||
"PreProc",
|
||||
"Repeat",
|
||||
"SignColumn",
|
||||
"Special",
|
||||
"Statement",
|
||||
-- "StatusLine",
|
||||
-- "StatusLineNC",
|
||||
"String",
|
||||
"Structure",
|
||||
"Todo",
|
||||
"Type",
|
||||
"Underlined",
|
||||
}
|
||||
|
||||
opts.extra_groups = {
|
||||
"CursorColumn",
|
||||
"CursorLineFold",
|
||||
"CursorLineSign",
|
||||
"FloatBorder",
|
||||
"FoldColumn",
|
||||
"Folded",
|
||||
"GitSignsAdd",
|
||||
"GitSignsChange",
|
||||
"GitSignsDelete",
|
||||
"LineNr",
|
||||
"LineNrAbove",
|
||||
"LineNrBelow",
|
||||
"LineNrBelow",
|
||||
"NeoTreeFloatingBorder",
|
||||
"NeoTreeMessage",
|
||||
"NeoTreeNormal",
|
||||
"NeoTreeTabSeparatorActive",
|
||||
"NeoTreeTabSeparatorInactive",
|
||||
"NeoTreeVertSplit",
|
||||
"NeoTreeWinSeparator",
|
||||
"NeoTreeNormalNC",
|
||||
"NeoTreeTabActive",
|
||||
"NeoTreeStatusLine",
|
||||
"NeoTreeStatusLineNC",
|
||||
"NeoTreeTabInactive",
|
||||
"NormalFloat",
|
||||
"TabLine",
|
||||
"TabLineFill",
|
||||
"VertSplit",
|
||||
"WinBar",
|
||||
"WinBarNC",
|
||||
"WinSeparator",
|
||||
}
|
||||
|
||||
transparent.clear_prefix "BufferLine"
|
||||
transparent.clear_prefix "Diagnostic"
|
||||
transparent.clear_prefix "NvimTree"
|
||||
end,
|
||||
},
|
||||
|
||||
-- Adds highlighting and lsp features for embedded code in documents.
|
||||
{
|
||||
"jmbuhr/otter.nvim",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- Adds highlighting and custom commands for ledger files
|
||||
{
|
||||
"ledger/vim-ledger",
|
||||
},
|
||||
|
||||
-- Better UI hooks
|
||||
{
|
||||
"stevearc/dressing.nvim",
|
||||
},
|
||||
|
||||
-- Add Ollama support in-editor
|
||||
{
|
||||
"nomnivore/ollama.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
|
||||
-- All the user commands added by the plugin
|
||||
cmd = { "Ollama", "OllamaModel", "OllamaServe", "OllamaServeStop" },
|
||||
|
||||
keys = {
|
||||
-- Sample keybind for prompt menu. Note that the <c-u> is important for selections to work properly.
|
||||
{
|
||||
"<leader>oo",
|
||||
":<c-u>lua require('ollama').prompt()<cr>",
|
||||
desc = "ollama prompt",
|
||||
mode = { "n", "v" },
|
||||
},
|
||||
|
||||
-- Sample keybind for direct prompting. Note that the <c-u> is important for selections to work properly.
|
||||
{
|
||||
"<leader>oG",
|
||||
":<c-u>lua require('ollama').prompt('Generate_Code')<cr>",
|
||||
desc = "ollama Generate Code",
|
||||
mode = { "n", "v" },
|
||||
},
|
||||
},
|
||||
|
||||
---@type Ollama.Config
|
||||
opts = {
|
||||
-- your configuration overrides
|
||||
},
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue