delete everything

This commit is contained in:
Adam Bellinson
2026-09-07 02:37:47 -04:00
committed by thread
parent 9cca542a88
commit a6de358fd4
18 changed files with 0 additions and 1934 deletions
-3
View File
@@ -1,3 +0,0 @@
# Example_config
This can be used as an example custom config for NvChad. Do check the https://github.com/NvChad/nvcommunity
-20
View File
@@ -1,20 +0,0 @@
---@type ChadrcConfig
local M = {}
-- Path to overriding theme and highlights files
local highlights = require "custom.highlights"
M.ui = {
theme = "chadracula",
theme_toggle = { "chadracula", "one_light" },
hl_override = highlights.override,
hl_add = highlights.add,
}
M.plugins = "custom.plugins"
-- check core.mappings for table structure
M.mappings = require "custom.mappings"
return M
-43
View File
@@ -1,43 +0,0 @@
local options = {
adapters = {
ollama = function()
return require("codecompanion.adapters").extend("ollama", {
env = {
url = "http://axiom.bell:11434",
api_key = "ollama",
},
headers = {
["Content-Type"] = "application/json",
["Authorization"] = "Bearer ${api_key}",
},
parameters = {
sync = true,
},
})
end,
},
strategies = {
chat = {
adapter = "ollama",
},
inline = {
adapter = "ollama",
keymaps = {
accept_change = {
modes = { n = "ga" },
description = "Accept the suggested change",
},
reject_change = {
modes = { n = "gr" },
description = "Reject the suggested change",
},
},
},
cmd = {
adapter = "ollama",
}
},
}
return options
-54
View File
@@ -1,54 +0,0 @@
local on_attach = require("plugins.configs.lspconfig").on_attach
local capabilities = require("plugins.configs.lspconfig").capabilities
local lspconfig = require "lspconfig"
local util = require "lspconfig/util"
-- if you just want default config for the servers then put them in a table
local servers = { "html", "cssls", "ts_ls", "clangd" }
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
on_attach = on_attach,
capabilities = capabilities,
}
end
lspconfig.gopls.setup {
cmd = { "gopls" },
filetypes = { "go", "gomod", "gowork", "gotmpl" },
root_dir = util.root_pattern("go.work", "go.mod", ".git"),
settings = {
gopls = {
completeUnimported = true,
usePlaceholders = true,
analyses = {
unusedParameters = true,
},
},
},
}
lspconfig.ts_ls.setup {
filetypes = { "javascript", "typescript", "typescriptreact", "typescript.tsx" },
capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities()),
on_attach = function(client, bufnr)
local opts = { noremap = true, silent = true }
vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>f", "<cmd>lua vim.lsp.buf.format()<CR>", opts)
end,
}
-- lspconfig.rust_analyzer.setup({
-- on_attach = on_attach,
-- capabilities = capabilities,
-- filetypes = {"rust"},
-- root_dir = util.root_pattern("Cargo.toml"),
-- settings = {},
-- ['rust-analyzer'] = {
-- cargo = {
-- allFeatures = true,
-- }
-- }
-- })
--
-- lspconfig.pyright.setup { blabla}
-38
View File
@@ -1,38 +0,0 @@
local null_ls = require("null-ls")
null_ls.setup({
sources = {
null_ls.builtins.formatting.stylua,
null_ls.builtins.completion.spell,
-- require("none-ls.diagnostics.eslint"), -- requires none-ls-extras.nvim
},
})
-- local augroup = vim.api.nvim_create_augroup("NoneLsFormatting", {})
--
-- local on_attach = function(client, bufnr)
-- if client.supports_method("textDocument/formatting") then
-- vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
-- vim.api.nvim_create_autocmd("BufWritePre", {
-- group = augroup,
-- buffer = bufnr,
-- callback = function()
-- vim.lsp.buf.format({ bufnr = bufnr })
-- end,
-- })
-- end
-- end
--
-- local null_ls = require("null-ls")
--
-- null_ls.setup({
-- sources = {
-- null_ls.builtins.formatting.stylua,
-- null_ls.builtins.formatting.prettierd.with({
-- extra_args = { "--no-semi", "--single-quote", "--jsx-single-quote" },
-- }),
-- null_ls.builtins.diagnostics.mypy.with({ extra_args = { "--ignore-missing-imports" } }),
-- },
-- on_attach = on_attach,
-- })
--
-28
View File
@@ -1,28 +0,0 @@
local options = {
terminals = {
-- shell = vim.o.shell,
-- list = {},
type_opts = {
float = {
-- relative = "editor",
row = 0,
col = 0,
width = 0.9,
height = 0.9,
-- border = "single",
},
-- horizontal = { location = "rightbelow", split_ratio = 0.3 },
-- vertical = { location = "rightbelow", split_ratio = 0.5 },
},
},
-- behavior = {
-- autoclose_on_quit = {
-- enabled = false,
-- confirm = true,
-- },
-- close_on_exit = true,
-- auto_insert = true,
-- },
}
return options
-67
View File
@@ -1,67 +0,0 @@
local cmp = require "cmp"
local M = {}
M.treesitter = {
ensure_installed = {
"vim",
"lua",
"html",
"css",
"javascript",
"typescript",
"tsx",
"c",
"markdown",
"markdown_inline",
},
indent = {
enable = true,
-- disable = {
-- "python"
-- },
},
}
M.mason = {
ensure_installed = {
-- lua stuff
"lua-language-server",
"stylua",
-- web dev stuff
"css-lsp",
"html-lsp",
"typescript-language-server",
"deno",
"prettier",
-- c/cpp stuff
"clangd",
"clang-format",
},
}
-- git support in nvimtree
M.nvimtree = {
git = {
enable = true,
},
renderer = {
highlight_git = true,
icons = {
show = {
git = true,
},
},
},
}
-- M.cmp = {
-- mapping = {
-- ["<A-Space>"] = cmp.mapping.complete(),
-- }
-- }
return M
-13
View File
@@ -1,13 +0,0 @@
-- local on_attach = require("plugins.configs.lspconfig").on_attach
-- local capabilities = require("plugins.configs.lspconfig").capabilities
--
local options = {
-- server = {
-- on_attach = vim.tbl_deep_extend("force", on_attach, {
-- vim.keymap.set("n", "<leader>H", rt)
-- },
-- capabilities = capabilities,
-- },
}
return options
-19
View File
@@ -1,19 +0,0 @@
-- To find any highlight groups: "<cmd> Telescope highlights"
-- Each highlight group can take a table with variables fg, bg, bold, italic, etc
-- base30 variable names can also be used as colors
local M = {}
---@type Base46HLGroupsList
M.override = {
Comment = {
italic = true,
},
}
---@type HLTable
M.add = {
NvimTreeOpenedFolderName = { fg = "green", bold = true },
}
return M
-14
View File
@@ -1,14 +0,0 @@
-- local autocmd = vim.api.nvim_create_autocmd
-- Auto resize panes when resizing nvim window
-- autocmd("VimResized", {
-- pattern = "*",
-- command = "tabdo wincmd =",
-- })
--
local opt = vim.opt
opt.laststatus = 3
opt.swapfile = false
vim.g.lua_snippets_path = { vim.fn.stdpath "config" .. "/snippets" }
-100
View File
@@ -1,100 +0,0 @@
---@type MappingsTable
local M = {}
M.general = {
i = {
["<c-r>"] = { "<c-v>", "paste from OS without autopairing" },
},
n = {
-- [";"] = { ":", "enter command mode", opts = { nowait = true } },
["go"] = {
function()
vim.lsp.buf.format { async = true }
end,
"LSP formatting",
},
["<leader>wv"] = { "<C-w>v", "Split vertical" },
["<leader>ws"] = { "<C-w>s", "Split horizontal" },
["<leader>wo"] = { "<C-w>o", "Maximize split" },
["<leader>wc"] = { "<C-w>c", "Close split" },
["<leader>wx"] = { "<C-w>c", "Close split" },
["<leader>w="] = { "<C-w>=", "Even splits" },
["<leader>h"] = { "<C-w>h", "Focus left split" },
["<leader>j"] = { "<C-w>j", "Focus lower split" },
["<leader>k"] = { "<C-w>k", "Focus upper split" },
["<leader>l"] = { "<C-w>l", "Focus right split" },
["<leader>ee"] = { ':e <C-R>=expand("%:p:h" . "/" <CR><CR>)', "Copy relative path to file" },
["<leader>er"] = { ":!echo -n % | pbcopy<CR>", "Copy absolute path to file" },
["<leader>gn"] = { ":Telescope resume<CR>", "Resume telescope" },
["<leader>eu"] = { '!!python -c "import uuid; print(uuid.uuid4())"<CR>', "Drop fresh uuid4" },
["<c-c>"] = { '"+y', "Copy to OS clipboard" },
[",,"] = { ":w<CR>", "save" },
["<leader> "] = { ":w<CR>", "save" },
["<leader>n"] = { "<cmd> NvimTreeToggle <CR>", "Toggle nvimtree" },
["<leader>N"] = { "<cmd> set nu! <CR>", "Toggle line number" },
["<leader>x"] = { "<cmd>bdelete<CR>", "Close Buffer and window" },
["<leader>X"] = { "<cmd>bdelete!<CR>", "Close Buffer and window!" },
["<leader>c"] = { "<cmd>Bdelete<CR>", "Close Buffer" },
["<leader>b"] = { "<cmd> Telescope buffers <CR>", "Find buffers" },
-- ["<A-Space>"] = cmp.mapping.complete(),
["gb"] = { "<cmd>Gitsigns blame<CR>", "Git blame" },
["gB"] = { "<cmd>Gitsigns blame_line<CR>", "Git blame line" },
["gu"] = { "<cmd>diffget //2<CR>", "Select left in conflict" },
["gh"] = { "<cmd>diffget //3<CR>", "Select right in conflict" },
["ge"] = {
function()
vim.diagnostic.open_float { border = "rounded" }
end,
"Floating diagnostic",
},
[",z"] = { ":bnext<CR>", "Next buffer" },
[",v"] = { ":bprevious<CR>", "Previous buffer" },
["<leader>z"] = {
function()
require("nvchad.tabufline").tabuflineNext()
end,
"Goto next buffer",
},
["<leader>v"] = {
function()
require("nvchad.tabufline").tabuflinePrev()
end,
"Goto prev buffer",
},
["<leader>tl"] = { ":Neotest run last<CR>", "Neotest Run Last" },
["<leader>ts"] = { ":Neotest summary<CR>", "Neotest Summary" },
["<leader>to"] = { ":Neotest output<CR>", "Neotest Output" },
["<leader>ta"] = { ":Neotest output-panel<CR>", "Neotest Output Panel" },
},
v = {
[">"] = { ">gv", "indent" },
["<c-c>"] = { '"+y', "Copy to OS clipboard" },
},
}
M.crates = {
n = {
["<leader>rcu"] = {
function()
require("crates").upgrade_all_crates()
end,
"Update crates",
},
},
}
-- more keybinds!
return M
-362
View File
@@ -1,362 +0,0 @@
local overrides = require "custom.configs.overrides"
---@type NvPluginSpec[]
local plugins = {
-- Override plugin definition options
{
"nvimtools/none-ls.nvim",
lazy = false,
config = function()
require "custom.configs.none-ls"
end,
},
{
"neovim/nvim-lspconfig",
dependencies = "nvimtools/none-ls.nvim",
config = function()
require "plugins.configs.lspconfig"
require "custom.configs.lspconfig"
end, -- Override to setup mason-lspconfig
},
-- override plugin configs
{
"NvChad/nvterm",
opts = function()
return require "custom.configs.nvterm"
end,
},
{
"williamboman/mason.nvim",
opts = vim.tbl_deep_extend("force", overrides.mason, {
ensure_installed = {
"rust-analyzer",
"gopls",
},
}),
},
-- {
-- "nvim-treesitter/nvim-treesitter",
-- opts = overrides.treesitter,
-- },
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
dependencies = {
"nvim-treesitter/nvim-treesitter-textobjects"
},
},
{
"nvim-tree/nvim-tree.lua",
opts = overrides.nvimtree,
},
-- Install a plugin
{
"max397574/better-escape.nvim",
event = "InsertEnter",
config = function()
require("better_escape").setup()
end,
},
{
"elixir-tools/elixir-tools.nvim",
version = "*",
event = { "BufReadPre", "BufNewFile" },
config = function()
local elixir = require "elixir"
local elixirls = require "elixir.elixirls"
elixir.setup {
nextls = { enable = true },
credo = {},
elixirls = {
enable = true,
settings = elixirls.settings {
dialyzerEnabled = false,
enableTestLenses = false,
},
on_attach = function(client, bufnr)
vim.keymap.set("n", "<space>fp", ":ElixirFromPipe<cr>", { buffer = true, noremap = true })
vim.keymap.set("n", "<space>tp", ":ElixirToPipe<cr>", { buffer = true, noremap = true })
vim.keymap.set("v", "<space>em", ":ElixirExpandMacro<cr>", { buffer = true, noremap = true })
end,
},
}
end,
dependencies = {
"nvim-lua/plenary.nvim",
},
},
{
"rust-lang/rust.vim",
ft = "rust",
init = function()
vim.g.rustfmt_autosave = 1
end,
},
{
"mrcjkb/rustaceanvim",
version = "^3",
ft = { "rust" },
-- dependencies = "neovim/nvim-lspconfig",
-- opts = function()
-- return require "custom.configs.rust-tools"
-- end,
-- config = function(, opts)
-- require('rust-tools').setup(opts)
-- end
},
-- {
-- "mfussenegger/nvim-dap",
-- },
{
"saecki/crates.nvim",
dependencies = "hrsh7th/nvim-cmp",
ft = { "rust", "toml" },
config = function(_, opts)
local crates = require "crates"
crates.setup(opts)
crates.show()
end,
},
{
"hrsh7th/nvim-cmp",
opts = function()
local M = require "plugins.configs.cmp"
table.insert(M.sources, { name = "cartes" })
return M
end,
},
{
"nvim-treesitter/nvim-treesitter-context",
lazy = false,
opts = { max_lines = 6 },
},
{ "tpope/vim-surround", lazy = false },
{ "famiu/bufdelete.nvim", lazy = false },
{ "fladson/vim-kitty", ft = { "kitty" } },
-- { "tpope/vim-fugitive", lazy = false },
{
"lewis6991/gitsigns.nvim",
config = function(_, opts)
require("gitsigns").setup(opts)
end,
},
{
"lukas-reineke/indent-blankline.nvim",
enabled = false,
},
{ "rouge8/neotest-rust" },
{ "jfpedroza/neotest-elixir" },
{ "lewis6991/fileline.nvim", lazy = false },
{
"nvim-neotest/neotest",
lazy = false,
dependencies = {
"nvim-neotest/nvim-nio",
"nvim-lua/plenary.nvim",
"antoinemadec/FixCursorHold.nvim",
"nvim-treesitter/nvim-treesitter",
},
config = function()
require("neotest").setup {
adapters = {
require "neotest-rust",
require "neotest-elixir" {
-- -- The Mix task to use to run the tests
-- -- Can be a function to return a dynamic value.
-- -- Default: "test"
-- mix_task = { "my_custom_task" },
-- -- Other formatters to pass to the test command as the formatters are overridden
-- -- Can be a function to return a dynamic value.
-- -- Default: {"ExUnit.CLIFormatter"}
-- extra_formatters = { "ExUnit.CLIFormatter", "ExUnitNotifier" },
-- -- Extra test block identifiers
-- -- Can be a function to return a dynamic value.
-- -- Block identifiers "test", "feature" and "property" are always supported by default.
-- -- Default: {}
-- extra_block_identifiers = { "test_with_mock" },
-- -- Extra arguments to pass to mix test
-- -- Can be a function that receives the position, to return a dynamic value
-- -- Default: {}
-- args = { "--trace" },
-- -- Command wrapper
-- -- Must be a function that receives the mix command as a table, to return a dynamic value
-- -- Default: function(cmd) return cmd end
-- post_process_command = function(cmd)
-- return vim.tbl_flatten { { "env", "FOO=bar" }, cmd }
-- end,
-- -- Delays writes so that results are updated at most every given milliseconds
-- -- Decreasing this number improves snappiness at the cost of performance
-- -- Can be a function to return a dynamic value.
-- -- Default: 1000
-- write_delay = 1000,
},
},
}
end,
},
{
"ray-x/go.nvim",
dependencies = { -- optional packages
"ray-x/guihua.lua",
"neovim/nvim-lspconfig",
"nvim-treesitter/nvim-treesitter",
},
config = function()
require("go").setup()
end,
event = { "CmdlineEnter" },
ft = { "go", "gomod" },
build = ':lua require("go.install").update_all_sync()', -- if you need to install/update all binaries
},
{
"stevearc/conform.nvim",
config = function()
require("conform").setup {
formatters_by_ft = {
lua = { "stylua" },
-- Conform will run multiple formatters sequentially
python = { "isort", "black" },
-- You can customize some of the format options for the filetype (:help conform.format)
rust = { "rustfmt", lsp_format = "fallback" },
-- Conform will run the first available formatter
javascript = { "prettierd", "prettier", stop_after_first = true },
go = { { "gofmt" } },
},
}
end,
},
-- {
-- "olimorris/codecompanion.nvim",
-- lazy = false,
-- dependencies = {
-- "nvim-lua/plenary.nvim",
-- "nvim-treesitter/nvim-treesitter",
-- },
-- opts = function()
-- return require "custom.configs.codecompanion"
-- end,
-- config = function(_, opts)
-- require("codecompanion").setup(opts)
-- end,
-- },
--
{
"yetone/avante.nvim",
event = "VeryLazy",
version = false, -- Never set this value to "*"! Never!
---@module 'avante'
---@type avante.Config
opts = {
-- add any opts here
-- for example
provider = "ollama",
providers = {
ollama = {
endpoint = "http://axiom.bell:11434",
-- model = "devstral:24b",
model = "qwen2.5-coder:32b",
},
},
behavior = {
-- auto_apply_diff_after_generation = true
}
},
-- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
build = "make",
-- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows
dependencies = {
"nvim-treesitter/nvim-treesitter",
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
--- The below dependencies are optional,
"echasnovski/mini.pick", -- for file_selector provider mini.pick
"nvim-telescope/telescope.nvim", -- for file_selector provider telescope
"hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions
"ibhagwan/fzf-lua", -- for file_selector provider fzf
"stevearc/dressing.nvim", -- for input provider dressing
"folke/snacks.nvim", -- for input provider snacks
"nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
-- "zbirenbaum/copilot.lua", -- for providers='copilot'
{
-- support for image pasting
"HakonHarnes/img-clip.nvim",
event = "VeryLazy",
opts = {
-- recommended settings
default = {
embed_image_as_base64 = false,
prompt_for_file_name = false,
drag_and_drop = {
insert_mode = true,
},
-- required for Windows users
use_absolute_path = true,
},
},
},
{
-- Make sure to set this up properly if you have lazy=true
'MeanderingProgrammer/render-markdown.nvim',
opts = {
file_types = { "markdown", "Avante" },
},
ft = { "markdown", "Avante" },
},
},
}
-- {
-- "rouge8/neotest-rust",
-- config = function() end,
-- },
--
-- {
-- "jfpedroza/neotest-elixir",
-- config = function() end,
-- },
-- To make a plugin not be loaded
-- {
-- "NvChad/nvim-colorizer.lua",
-- enabled = false
-- },
-- All NvChad plugins are lazy-loaded by default
-- For a plugin to be loaded, you will need to set either `ft`, `cmd`, `keys`, `event`, or set `lazy = false`
-- If you want a plugin to load on startup, add `lazy = false` to a plugin spec, for example
-- {
-- "mg979/vim-visual-multi",
-- lazy = false,
-- }
}
return plugins
-67
View File
@@ -1,67 +0,0 @@
dofile(vim.g.base46_cache .. "lsp")
require "nvchad.lsp"
local M = {}
local utils = require "core.utils"
-- export on_attach & capabilities for custom lspconfigs
M.on_attach = function(client, bufnr)
client.server_capabilities.documentFormattingProvider = false
client.server_capabilities.documentRangeFormattingProvider = false
utils.load_mappings("lspconfig", { buffer = bufnr })
if client.server_capabilities.signatureHelpProvider then
require("nvchad.signature").setup(client)
end
-- if not utils.load_config().ui.lsp_semantic_tokens and client.supports_method "textDocument/semanticTokens" then
-- client.server_capabilities.semanticTokensProvider = nil
-- end
end
M.capabilities = vim.lsp.protocol.make_client_capabilities()
M.capabilities.textDocument.completion.completionItem = {
documentationFormat = { "markdown", "plaintext" },
snippetSupport = true,
preselectSupport = true,
insertReplaceSupport = true,
labelDetailsSupport = true,
deprecatedSupport = true,
commitCharactersSupport = true,
tagSupport = { valueSet = { 1 } },
resolveSupport = {
properties = {
"documentation",
"detail",
"additionalTextEdits",
},
},
}
require("lspconfig").lua_ls.setup {
on_attach = M.on_attach,
capabilities = M.capabilities,
settings = {
Lua = {
diagnostics = {
globals = { "vim" },
},
workspace = {
library = {
[vim.fn.expand "$VIMRUNTIME/lua"] = true,
[vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true,
[vim.fn.stdpath "data" .. "/lazy/ui/nvchad_types"] = true,
[vim.fn.stdpath "data" .. "/lazy/lazy.nvim/lua/lazy"] = true,
},
maxPreload = 100000,
preloadFileSize = 10000,
},
},
},
}
return M
-117
View File
@@ -1,117 +0,0 @@
local M = {}
local utils = require "core.utils"
M.blankline = {
indentLine_enabled = 1,
filetype_exclude = {
"help",
"terminal",
"lazy",
"lspinfo",
"TelescopePrompt",
"TelescopeResults",
"mason",
"nvdash",
"nvcheatsheet",
"",
},
buftype_exclude = { "terminal" },
show_trailing_blankline_indent = false,
show_first_indent_level = false,
show_current_context = true,
show_current_context_start = true,
}
M.luasnip = function(opts)
require("luasnip").config.set_config(opts)
-- vscode format
require("luasnip.loaders.from_vscode").lazy_load()
require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.vscode_snippets_path or "" }
-- snipmate format
require("luasnip.loaders.from_snipmate").load()
require("luasnip.loaders.from_snipmate").lazy_load { paths = vim.g.snipmate_snippets_path or "" }
-- lua format
require("luasnip.loaders.from_lua").load()
require("luasnip.loaders.from_lua").lazy_load { paths = vim.g.lua_snippets_path or "" }
vim.api.nvim_create_autocmd("InsertLeave", {
callback = function()
if
require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()]
and not require("luasnip").session.jump_active
then
require("luasnip").unlink_current()
end
end,
})
end
-- M.gitsigns = {
-- signs = {
-- add = { text = "│" },
-- change = { text = "│" },
-- delete = { text = "󰍵" },
-- topdelete = { text = "‾" },
-- changedelete = { text = "~" },
-- untracked = { text = "│" },
-- },
-- on_attach = function(bufnr)
-- utils.load_mappings("gitsigns", { buffer = bufnr })
-- end,
-- }
M.gitsigns = {
signs = {
add = { text = '' },
change = { text = '' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
untracked = { text = '' },
},
signs_staged = {
add = { text = '' },
change = { text = '' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
untracked = { text = '' },
},
signs_staged_enable = true,
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
watch_gitdir = {
follow_files = true
},
auto_attach = true,
attach_to_untracked = false,
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
current_line_blame_opts = {
virt_text = true,
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
delay = 1000,
ignore_whitespace = false,
virt_text_priority = 100,
},
current_line_blame_formatter = '<author>, <author_time:%R> - <summary>',
sign_priority = 6,
update_debounce = 100,
status_formatter = nil, -- Use default
max_file_length = 40000, -- Disable if file is longer than this (in lines)
preview_config = {
-- Options passed to nvim_open_win
border = 'single',
style = 'minimal',
relative = 'cursor',
row = 0,
col = 1
},
}
return M
-25
View File
@@ -1,25 +0,0 @@
local options = {
ensure_installed = { "lua", "elixir" },
highlight = {
enable = true,
use_languagetree = true,
},
indent = { enable = true },
textobjects = {
select = {
enable = true,
lookahead = true,
keymaps = {
-- custom mappings (example)
["ad"] = "@block.outer", -- around do...end
["id"] = "@block.inner", -- inside do...end
},
},
},
}
return options
-277
View File
@@ -1,277 +0,0 @@
-- All plugins have lazy=true by default,to load a plugin on startup just lazy=false
-- List of all default plugins & their definitions
local default_plugins = {
"nvim-lua/plenary.nvim",
{
"NvChad/base46",
branch = "v2.0",
build = function()
require("base46").load_all_highlights()
end,
},
{
"NvChad/ui",
branch = "v2.0",
lazy = false,
},
{
"NvChad/nvterm",
init = function()
require("core.utils").load_mappings "nvterm"
end,
config = function(_, opts)
require "base46.term"
require("nvterm").setup(opts)
end,
},
{
"NvChad/nvim-colorizer.lua",
init = function()
require("core.utils").lazy_load "nvim-colorizer.lua"
end,
config = function(_, opts)
require("colorizer").setup(opts)
-- execute colorizer as soon as possible
vim.defer_fn(function()
require("colorizer").attach_to_buffer(0)
end, 0)
end,
},
{
"nvim-tree/nvim-web-devicons",
opts = function()
return { override = require "nvchad.icons.devicons" }
end,
config = function(_, opts)
dofile(vim.g.base46_cache .. "devicons")
require("nvim-web-devicons").setup(opts)
end,
},
{
"lukas-reineke/indent-blankline.nvim",
version = "2.20.7",
init = function()
require("core.utils").lazy_load "indent-blankline.nvim"
end,
opts = function()
return require("plugins.configs.others").blankline
end,
config = function(_, opts)
require("core.utils").load_mappings "blankline"
dofile(vim.g.base46_cache .. "blankline")
require("indent_blankline").setup(opts)
end,
},
{
"nvim-treesitter/nvim-treesitter",
init = function()
require("core.utils").lazy_load "nvim-treesitter"
end,
cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSModuleInfo" },
build = ":TSUpdate",
opts = function()
return require "plugins.configs.treesitter"
end,
config = function(_, opts)
dofile(vim.g.base46_cache .. "syntax")
require("nvim-treesitter.configs").setup(opts)
end,
},
-- git stuff
{
"lewis6991/gitsigns.nvim",
lazy = false,
ft = { "gitcommit", "diff" },
-- init = function()
-- -- load gitsigns only when a git file is opened
-- vim.api.nvim_create_autocmd({ "BufRead" }, {
-- group = vim.api.nvim_create_augroup("GitSignsLazyLoad", { clear = true }),
-- callback = function()
-- vim.fn.jobstart({ "git", "-C", vim.loop.cwd(), "rev-parse" }, {
-- on_exit = function(_, return_code)
-- if return_code == 0 then
-- vim.api.nvim_del_augroup_by_name "GitSignsLazyLoad"
-- vim.schedule(function()
-- require("lazy").load { plugins = { "gitsigns.nvim" } }
-- end)
-- end
-- end,
-- })
-- end,
-- })
-- end,
opts = function()
return require("plugins.configs.others").gitsigns
end,
config = function(_, opts)
dofile(vim.g.base46_cache .. "git")
require("gitsigns").setup(opts)
end,
},
-- lsp stuff
{
"williamboman/mason.nvim",
cmd = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUpdate" },
opts = function()
return require "plugins.configs.mason"
end,
config = function(_, opts)
dofile(vim.g.base46_cache .. "mason")
require("mason").setup(opts)
-- custom nvchad cmd to install all mason binaries listed
vim.api.nvim_create_user_command("MasonInstallAll", function()
vim.cmd("MasonInstall " .. table.concat(opts.ensure_installed, " "))
end, {})
vim.g.mason_binaries_list = opts.ensure_installed
end,
},
{
"neovim/nvim-lspconfig",
init = function()
require("core.utils").lazy_load "nvim-lspconfig"
end,
config = function()
require "plugins.configs.lspconfig"
end,
},
-- load luasnips + cmp related in insert mode only
{
"hrsh7th/nvim-cmp",
event = "InsertEnter",
dependencies = {
{
-- snippet plugin
"L3MON4D3/LuaSnip",
dependencies = "rafamadriz/friendly-snippets",
opts = { history = true, updateevents = "TextChanged,TextChangedI" },
config = function(_, opts)
require("plugins.configs.others").luasnip(opts)
end,
},
-- autopairing of (){}[] etc
{
"windwp/nvim-autopairs",
opts = {
fast_wrap = {},
disable_filetype = { "TelescopePrompt", "vim" },
},
config = function(_, opts)
require("nvim-autopairs").setup(opts)
-- setup cmp for autopairs
local cmp_autopairs = require "nvim-autopairs.completion.cmp"
require("cmp").event:on("confirm_done", cmp_autopairs.on_confirm_done())
end,
},
-- cmp sources plugins
{
"saadparwaiz1/cmp_luasnip",
"hrsh7th/cmp-nvim-lua",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
},
},
opts = function()
return require "plugins.configs.cmp"
end,
config = function(_, opts)
require("cmp").setup(opts)
end,
},
{
"numToStr/Comment.nvim",
keys = {
{ "gcc", mode = "n", desc = "Comment toggle current line" },
{ "gc", mode = { "n", "o" }, desc = "Comment toggle linewise" },
{ "gc", mode = "x", desc = "Comment toggle linewise (visual)" },
{ "gbc", mode = "n", desc = "Comment toggle current block" },
{ "gb", mode = { "n", "o" }, desc = "Comment toggle blockwise" },
{ "gb", mode = "x", desc = "Comment toggle blockwise (visual)" },
},
init = function()
require("core.utils").load_mappings "comment"
end,
config = function(_, opts)
require("Comment").setup(opts)
end,
},
-- file managing , picker etc
{
"nvim-tree/nvim-tree.lua",
cmd = { "NvimTreeToggle", "NvimTreeFocus" },
init = function()
require("core.utils").load_mappings "nvimtree"
end,
opts = function()
return require "plugins.configs.nvimtree"
end,
config = function(_, opts)
dofile(vim.g.base46_cache .. "nvimtree")
require("nvim-tree").setup(opts)
end,
},
{
"nvim-telescope/telescope.nvim",
dependencies = { "nvim-treesitter/nvim-treesitter", { "nvim-telescope/telescope-fzf-native.nvim", build = "make" } },
cmd = "Telescope",
init = function()
require("core.utils").load_mappings "telescope"
end,
opts = function()
return require "plugins.configs.telescope"
end,
config = function(_, opts)
dofile(vim.g.base46_cache .. "telescope")
local telescope = require "telescope"
telescope.setup(opts)
-- load extensions
for _, ext in ipairs(opts.extensions_list) do
telescope.load_extension(ext)
end
end,
},
-- Only load whichkey after all the gui
{
"folke/which-key.nvim",
keys = { "<leader>", "<c-r>", "<c-w>", '"', "'", "`", "c", "v", "g" },
init = function()
require("core.utils").load_mappings "whichkey"
end,
cmd = "WhichKey",
config = function(_, opts)
dofile(vim.g.base46_cache .. "whichkey")
require("which-key").setup(opts)
end,
},
}
local config = require("core.utils").load_config()
if #config.plugins > 0 then
table.insert(default_plugins, { import = config.plugins })
end
require("lazy").setup(default_plugins, config.lazy_nvim)