Add neovim config

This commit is contained in:
GHOSCHT 2023-11-04 14:57:21 +01:00
parent 4c34c2bf30
commit e037dbb7b4
No known key found for this signature in database
11 changed files with 651 additions and 2 deletions

View file

@ -7,7 +7,8 @@
vars, vars,
... ...
}: { }: {
imports = (import ../modules/desktops) ++ (import ../modules/shell); imports =
(import ../modules/desktops) ++ (import ../modules/shell) ++ [../modules/programs/librewolf.nix] ++ (import ../modules/theming) ++ (import ../modules/coding);
users.users.${vars.user} = { users.users.${vars.user} = {
# System User # System User
@ -23,7 +24,6 @@
programs.fish.enable = true; programs.fish.enable = true;
services.flatpak.enable = true; services.flatpak.enable = true;
# Enable the X11 windowing system. # Enable the X11 windowing system.
# services.xserver.enable = true; # services.xserver.enable = true;

View file

@ -0,0 +1,19 @@
local headers = require("custom.headers")
---@type ChadrcConfig
local M = {}
M.ui = {
theme = 'catppuccin',
nvdash = {
load_on_startup = true,
header=headers.Bloody,
},
statusline = {
separator_style = "block",
theme = "default",
},
transparency = true,
}
M.plugins = "custom.plugins"
M.mappings = require "custom.mappings"
return M

View file

@ -0,0 +1,34 @@
local status, illuminate = pcall(require, "illuminate")
if not status then
return
end
illuminate.configure {
-- providers: provider used to get references in the buffer, ordered by priority
providers = {
"lsp",
"treesitter",
"regex",
},
delay = 100,
filetypes_denylist = {
"dirvish",
"fugitive",
"alpha",
"NvimTree",
"packer",
"neogitstatus",
"Trouble",
"lir",
"Outline",
"spectre_panel",
"toggleterm",
"DressingSelect",
"TelescopePrompt",
"aerial",
"Empty",
},
under_cursor = true,
max_file_lines = nil,
}

View file

@ -0,0 +1,26 @@
local config = require("plugins.configs.lspconfig")
local on_attach = config.on_attach
local capabilities = config.capabilities
local lspconfig = require("lspconfig")
lspconfig.pyright.setup({
on_attach = on_attach,
capabilities = capabilities,
filetypes = {"python"},
})
lspconfig.rnix.setup({
on_attach = on_attach,
capabilities = capabilities,
filetypes = {"nix"},
})
lspconfig.clangd.setup {
on_attach = function(client, bufnr)
client.server_capabilities.signatureHelpProvider = false
on_attach(client, bufnr)
end,
capabilities = capabilities,
}

View file

@ -0,0 +1,30 @@
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
local null_ls = require('null-ls')
local opts = {
sources = {
null_ls.builtins.formatting.black,
null_ls.builtins.diagnostics.mypy,
null_ls.builtins.diagnostics.eslint_d,
null_ls.builtins.diagnostics.jsonlint,
null_ls.builtins.diagnostics.ruff,
null_ls.builtins.formatting.clang_format,
null_ls.builtins.formatting.alejandra,
},
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,
}
return opts

View file

@ -0,0 +1,12 @@
local on_attach = require("plugins.configs.lspconfig").on_attach
local capabilities = require("plugins.configs.lspconfig").capabilities
local options = {
server = {
on_attach = on_attach,
capabilities = capabilities,
},
}
return options

View file

@ -0,0 +1,55 @@
require("todo-comments").setup {
signs = true,
sign_priority = 8,
keywords = {
FIX = {
icon = "", -- icon used for the sign, and in search results
color = "error", -- can be a hex color, or a named color (see below)
alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords
-- signs = false, -- configure signs for some keywords individually
},
TODO = { icon = "", color = "info" },
HACK = { icon = "", color = "warning" },
WARN = { icon = "", color = "warning", alt = { "WARNING", "XXX" } },
PERF = { icon = "󰑮 ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } },
NOTE = { icon = "", color = "hint", alt = { "INFO" } },
TEST = { icon = "󰤑 ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } },
},
gui_style = {
fg = "NONE", -- The gui style to use for the fg highlight group.
bg = "BOLD", -- The gui style to use for the bg highlight group.
},
merge_keywords = true, -- when true, custom keywords will be merged with the defaults
highlight = {
multiline = true, -- enable multine todo comments
multiline_pattern = "^.", -- lua pattern to match the next multiline from the start of the matched keyword
multiline_context = 10, -- extra lines that will be re-evaluated when changing a line
before = "", -- "fg" or "bg" or empty
keyword = "wide", -- "fg", "bg", "wide", "wide_bg", "wide_fg" or empty. (wide and wide_bg is the same as bg, but will also highlight surrounding characters, wide_fg acts accordingly but with fg)
after = "fg", -- "fg" or "bg" or empty
pattern = [[.*<(KEYWORDS)\s*:]], -- pattern or table of patterns, used for highlighting (vim regex)
comments_only = true, -- uses treesitter to match keywords in comments only
max_line_len = 400, -- ignore lines longer than this
exclude = {}, -- list of file types to exclude highlighting
},
colors = {
error = { "DiagnosticError", "ErrorMsg", "#DC2626" },
warning = { "DiagnosticWarn", "WarningMsg", "#FBBF24" },
info = { "DiagnosticInfo", "#2563EB" },
hint = { "DiagnosticHint", "#10B981" },
default = { "Identifier", "#7C3AED" },
test = { "Identifier", "#FF00FF" },
},
search = {
command = "rg",
args = {
"--color=never",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
},
pattern = [[\b(KEYWORDS):]], -- ripgrep regex
-- pattern = [[\b(KEYWORDS)\b]], -- match without the extra colon.
},
}

206
rsc/config/nvim/headers.lua Normal file
View file

@ -0,0 +1,206 @@
local M = {}
M.Default = {
[[ ██████ █████ ███ ]],
[[░░██████ ░░███ ░░░ ]],
[[ ░███░███ ░███ ██████ ██████ █████ █████ ████ █████████████ ]],
[[ ░███░░███░███ ███░░███ ███░░███░░███ ░░███ ░░███ ░░███░░███░░███ ]],
[[ ░███ ░░██████ ░███████ ░███ ░███ ░███ ░███ ░███ ░███ ░███ ░███ ]],
[[ ░███ ░░█████ ░███░░░ ░███ ░███ ░░███ ███ ░███ ░███ ░███ ░███ ]],
[[ █████ ░░█████░░██████ ░░██████ ░░█████ █████ █████░███ █████]],
[[░░░░░ ░░░░░ ░░░░░░ ░░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░ ░░░░░ ]],
}
M.Default2 = {
[[███╗░░██╗███████╗░█████╗░██╗░░░██╗██╗███╗░░░███╗]],
[[████╗░██║██╔════╝██╔══██╗██║░░░██║██║████╗░████║]],
[[██╔██╗██║█████╗░░██║░░██║╚██╗░██╔╝██║██╔████╔██║]],
[[██║╚████║██╔══╝░░██║░░██║░╚████╔╝░██║██║╚██╔╝██║]],
[[██║░╚███║███████╗╚█████╔╝░░╚██╔╝░░██║██║░╚═╝░██║]],
[[╚═╝░░╚══╝╚══════╝░╚════╝░░░░╚═╝░░░╚═╝╚═╝░░░░░╚═╝]],
}
M.ThreeDimensionsDiagonal = {
[[ ,--. ]],
[[ ,--.'| ____ ]],
[[ ,--,: : | ,--, ,' , `.]],
[[,`--.'`| ' : ,---. ,--.'| ,-+-,.' _ |]],
[[| : : | | ' ,'\ .---.| |, ,-+-. ; , ||]],
[[: | \ | : ,---. / / | /. ./|`--'_ ,--.'|' | ||]],
[[| : ' '; | / \ . ; ,. : .-' . ' |,' ,'| | | ,', | |,]],
[[' ' ;. ; / / |' | |: :/___/ \: |' | | | | / | |--' ]],
[[| | | \ |. ' / |' | .; :. \ ' .| | : | : | | , ]],
[[' : | ; .'' ; /|| : | \ \ '' : |__ | : | |/ ]],
[[| | '`--' ' | / | \ \ / \ \ | | '.'|| | |`-' ]],
[[' : | | : | `----' \ \ |; : ;| ;/ ]],
[[; |.' \ \ / '---" | , / '---' ]],
[['---' `----' ---`-' ]],
}
M.Alpha = {
[[ _____ _____ _______ _____ _____ _____ ]],
[[ /\ \ /\ \ /::\ \ /\ \ /\ \ /\ \ ]],
[[ /::\____\ /::\ \ /::::\ \ /::\____\ /::\ \ /::\____\ ]],
[[ /::::| | /::::\ \ /::::::\ \ /:::/ / \:::\ \ /::::| | ]],
[[ /:::::| | /::::::\ \ /::::::::\ \ /:::/ / \:::\ \ /:::::| | ]],
[[ /::::::| | /:::/\:::\ \ /:::/~~\:::\ \ /:::/ / \:::\ \ /::::::| | ]],
[[ /:::/|::| | /:::/__\:::\ \ /:::/ \:::\ \ /:::/____/ \:::\ \ /:::/|::| | ]],
[[ /:::/ |::| | /::::\ \:::\ \ /:::/ / \:::\ \ |::| | /::::\ \ /:::/ |::| | ]],
[[ /:::/ |::| | _____ /::::::\ \:::\ \ /:::/____/ \:::\____\ |::| | _____ ____ /::::::\ \ /:::/ |::|___|______ ]],
[[ /:::/ |::| |/\ \ /:::/\:::\ \:::\ \ |:::| | |:::| | |::| | /\ \ /\ \ /:::/\:::\ \ /:::/ |::::::::\ \ ]],
[[/:: / |::| /::\____\/:::/__\:::\ \:::\____\|:::|____| |:::| | |::| | /::\____\/::\ \/:::/ \:::\____\/:::/ |:::::::::\____\]],
[[\::/ /|::| /:::/ /\:::\ \:::\ \::/ / \:::\ \ /:::/ / |::| | /:::/ /\:::\ /:::/ \::/ /\::/ / ~~~~~/:::/ /]],
[[ \/____/ |::| /:::/ / \:::\ \:::\ \/____/ \:::\ \ /:::/ / |::| | /:::/ / \:::\/:::/ / \/____/ \/____/ /:::/ / ]],
[[ |::|/:::/ / \:::\ \:::\ \ \:::\ /:::/ / |::|____|/:::/ / \::::::/ / /:::/ / ]],
[[ |::::::/ / \:::\ \:::\____\ \:::\__/:::/ / |:::::::::::/ / \::::/____/ /:::/ / ]],
[[ |:::::/ / \:::\ \::/ / \::::::::/ / \::::::::::/____/ \:::\ \ /:::/ / ]],
[[ |::::/ / \:::\ \/____/ \::::::/ / ~~~~~~~~~~ \:::\ \ /:::/ / ]],
[[ /:::/ / \:::\ \ \::::/ / \:::\ \ /:::/ / ]],
[[ /:::/ / \:::\____\ \::/____/ \:::\____\ /:::/ / ]],
[[ \::/ / \::/ / ~~ \::/ / \::/ / ]],
[[ \/____/ \/____/ \/____/ \/____/ ]],
}
M.FiraFontK = {
[[ ) ]],
[[ ( /( ]],
[[ )\()) ( ) ( ) ]],
[[((_)\ ))\ ( /(( )\ ( ]],
[[ _((_) /((_) )\ (_))\((_) )\ ']],
[[| \| |(_)) ((_)_)((_)(_) _((_)) ]],
[[| .` |/ -_)/ _ \\ V / | || ' \()]],
[[|_|\_|\___|\___/ \_/ |_||_|_|_| ]],
}
M.FiraFontS = {
[[ ) ]],
[[ ( /( ]],
[[ )\()) ( ) ( ) ]],
[[((_)\ ))\ ( /(( )\ ( ]],
[[ _((_)/((_))\(_))((_) )\ ']],
[[| \| (_)) ((_))((_|_)_((_)) ]],
[[| .` / -_) _ \ V /| | ' \()]],
[[|_|\_\___\___/\_/ |_|_|_|_| ]],
}
M.Impossible = {
[[ _ _ _ _ _ _ _ _ ]],
[[ /\ \ _ /\ \ /\ \ /\ \ _ / /\ /\ \ /\_\/\_\ _ ]],
[[ / \ \ /\_\ / \ \ / \ \ \ \ \ /_/ / / \ \ \ / / / / //\_\]],
[[ / /\ \ \_/ / // /\ \ \ / /\ \ \ \ \ \ \___\/ /\ \_\ /\ \/ \ \/ / /]],
[[ / / /\ \___/ // / /\ \_\ / / /\ \ \ / / / \ \ \ / /\/_/ / \____\__/ / ]],
[[ / / / \/____// /_/_ \/_/ / / / \ \_\\ \ \ \_\ \ / / / / /\/________/ ]],
[[ / / / / / // /____/\ / / / / / / \ \ \ / / / / / / / / /\/_// / / ]],
[[ / / / / / // /\____\/ / / / / / / \ \ \/ / / / / / / / / / / / ]],
[[ / / / / / // / /______ / / /___/ / / \ \ \/ /___/ / /__ / / / / / / ]],
[[/ / / / / // / /_______\/ / /____\/ / \ \ //\__\/_/___\\/_/ / / / ]],
[[\/_/ \/_/ \/__________/\/_________/ \_\/ \/_________/ \/_/ ]],
}
M.Isometric1 = {
[[ ___ ___ ___ ___ ___ ]],
[[ /\__\ /\ \ /\ \ /\__\ ___ /\__\ ]],
[[ /::| | /::\ \ /::\ \ /:/ / /\ \ /::| | ]],
[[ /:|:| | /:/\:\ \ /:/\:\ \ /:/ / \:\ \ /:|:| | ]],
[[ /:/|:| |__ /::\~\:\ \ /:/ \:\ \ /:/__/ ___ /::\__\ /:/|:|__|__ ]],
[[ /:/ |:| /\__\ /:/\:\ \:\__\ /:/__/ \:\__\ |:| | /\__\ __/:/\/__/ /:/ |::::\__\]],
[[ \/__|:|/:/ / \:\~\:\ \/__/ \:\ \ /:/ / |:| |/:/ / /\/:/ / \/__/~~/:/ /]],
[[ |:/:/ / \:\ \:\__\ \:\ /:/ / |:|__/:/ / \::/__/ /:/ / ]],
[[ |::/ / \:\ \/__/ \:\/:/ / \::::/__/ \:\__\ /:/ / ]],
[[ /:/ / \:\__\ \::/ / ~~~~ \/__/ /:/ / ]],
[[ \/__/ \/__/ \/__/ \/__/ ]],
}
M.Isometric2 = {
[[ ___ ___ ___ ___ ]],
[[ /\ \ /\__\ /\ \ ___ /\ \ ]],
[[ \:\ \ /:/ _/_ /::\ \ /\ \ ___ |::\ \ ]],
[[ \:\ \ /:/ /\__\ /:/\:\ \ \:\ \ /\__\ |:|:\ \ ]],
[[ _____\:\ \ /:/ /:/ _/_ /:/ \:\ \ \:\ \ /:/__/ __|:|\:\ \ ]],
[[/::::::::\__\ /:/_/:/ /\__\ /:/__/ \:\__\ ___ \:\__\ /::\ \ /::::|_\:\__\]],
[[\:\~~\~~\/__/ \:\/:/ /:/ / \:\ \ /:/ / /\ \ |:| | \/\:\ \__ \:\~~\ \/__/]],
[[ \:\ \ \::/_/:/ / \:\ /:/ / \:\ \|:| | ~~\:\/\__\ \:\ \ ]],
[[ \:\ \ \:\/:/ / \:\/:/ / \:\__|:|__| \::/ / \:\ \ ]],
[[ \:\__\ \::/ / \::/ / \::::/__/ /:/ / \:\__\ ]],
[[ \/__/ \/__/ \/__/ ~~~~ \/__/ \/__/ ]],
}
M.Isometric3 = {
[[ ___ ___ ___ ___ ]],
[[ /__/\ / /\ / /\ ___ ___ /__/\ ]],
[[ \ \:\ / /:/_ / /::\ /__/\ / /\ | |::\ ]],
[[ \ \:\ / /:/ /\ / /:/\:\ \ \:\ / /:/ | |:|:\ ]],
[[ _____\__\:\ / /:/ /:/_ / /:/ \:\ \ \:\ /__/::\ __|__|:|\:\ ]],
[[/__/::::::::\ /__/:/ /:/ /\ /__/:/ \__\:\ ___ \__\:\ \__\/\:\__ /__/::::| \:\]],
[[\ \:\~~\~~\/ \ \:\/:/ /:/ \ \:\ / /:/ /__/\ | |:| \ \:\/\ \ \:\~~\__\/]],
[[ \ \:\ ~~~ \ \::/ /:/ \ \:\ /:/ \ \:\| |:| \__\::/ \ \:\ ]],
[[ \ \:\ \ \:\/:/ \ \:\/:/ \ \:\__|:| /__/:/ \ \:\ ]],
[[ \ \:\ \ \::/ \ \::/ \__\::::/ \__\/ \ \:\ ]],
[[ \__\/ \__\/ \__\/ ~~~~ \__\/ ]],
}
M.Isometric4 = {
[[ ___ ___ ___ ___ ]],
[[ / /\ / /\ / /\ ___ ___ / /\ ]],
[[ / /::| / /::\ / /::\ / /\ /__/\ / /::| ]],
[[ / /:|:| / /:/\:\ / /:/\:\ / /:/ \__\:\ / /:|:| ]],
[[ / /:/|:|__ / /::\ \:\ / /:/ \:\ / /:/ / /::\ / /:/|:|__ ]],
[[/__/:/ |:| /\ /__/:/\:\ \:\ /__/:/ \__\:\ /__/:/ ___ __/ /:/\/ /__/:/_|::::\]],
[[\__\/ |:|/:/ \ \:\ \:\_\/ \ \:\ / /:/ | |:| / /\ /__/\/:/~~ \__\/ /~~/:/]],
[[ | |:/:/ \ \:\ \:\ \ \:\ /:/ | |:|/ /:/ \ \::/ / /:/ ]],
[[ |__|::/ \ \:\_\/ \ \:\/:/ |__|:|__/:/ \ \:\ / /:/ ]],
[[ /__/:/ \ \:\ \ \::/ \__\::::/ \__\/ /__/:/ ]],
[[ \__\/ \__\/ \__\/ ~~~~ \__\/ ]],
}
M.Bloody = {
[[ ███▄ █ ▓█████ ▒█████ ██▒ █▓ ██▓ ███▄ ▄███▓]],
[[ ██ ▀█ █ ▓█ ▀ ▒██▒ ██▒▓██░ █▒▓██▒▓██▒▀█▀ ██▒]],
[[▓██ ▀█ ██▒▒███ ▒██░ ██▒ ▓██ █▒░▒██▒▓██ ▓██░]],
[[▓██▒ ▐▌██▒▒▓█ ▄ ▒██ ██░ ▒██ █░░░██░▒██ ▒██ ]],
[[▒██░ ▓██░░▒████▒░ ████▓▒░ ▒▀█░ ░██░▒██▒ ░██▒]],
[[░ ▒░ ▒ ▒ ░░ ▒░ ░░ ▒░▒░▒░ ░ ▐░ ░▓ ░ ▒░ ░ ░]],
[[░ ░░ ░ ▒░ ░ ░ ░ ░ ▒ ▒░ ░ ░░ ▒ ░░ ░ ░]],
[[ ░ ░ ░ ░ ░ ░ ░ ▒ ░░ ▒ ░░ ░ ]],
[[ ░ ░ ░ ░ ░ ░ ░ ░ ]],
[[ ░ ]],
}
M.TheEdge = {
[[ ▄ ▄███▄ ████▄ ▄ ▄█ █▀▄▀█]],
[[ █ █▀ ▀ █ █ █ ██ █ █ █]],
[[██ █ ██▄▄ █ █ █ █ ██ █ ▄ █]],
[[█ █ █ █▄ ▄▀ ▀████ █ █ ▐█ █ █]],
[[█ █ █ ▀███▀ █ █ ▐ █ ]],
[[█ ██ █▐ ▀ ]],
[[ ▐ ]],
}
M.Fraktur = {
[[ ... ... _ . ]],
[[ .=*8888n.."%888: u @88> ]],
[[ X ?8888f '8888 u. 88Nu. u. %8P .. . : ]],
[[ 88x. '8888X 8888> .u ...ue888b '88888.o888c . .888: x888 x888. ]],
[['8888k 8888X '"*8h. ud8888. 888R Y888r ^8888 8888 .@88u ~`8888~'888X`?888f`]],
[[ "8888 X888X .xH8 :888'8888. 888R I888> 8888 8888 ''888E` X888 888X '888> ]],
[[ `8" X888!:888X d888 '88%" 888R I888> 8888 8888 888E X888 888X '888> ]],
[[ =~` X888 X888X 8888.+" 888R I888> 8888 8888 888E X888 888X '888> ]],
[[ :h. X8*` !888X 8888L u8888cJ888 .8888b.888P 888E X888 888X '888> ]],
[[ X888xX" '8888..: '8888c. .+ "*888*P" ^Y8888*"" 888& "*88%""*88" '888!`]],
[[:~`888f '*888*" "88888% 'Y" `Y" R888" `~ " `"` ]],
[[ "" `"` "YP' "" ]],
}
M.Larry3D = {
[[ __ __ ]],
[[/\ \/\ \ __ ]],
[[\ \ `\\ \ __ ___ __ __ /\_\ ___ ___ ]],
[[ \ \ , ` \ /'__`\ / __`\/\ \/\ \\/\ \ /' __` __`\ ]],
[[ \ \ \`\ \/\ __//\ \L\ \ \ \_/ |\ \ \/\ \/\ \/\ \ ]],
[[ \ \_\ \_\ \____\ \____/\ \___/ \ \_\ \_\ \_\ \_\]],
[[ \/_/\/_/\/____/\/___/ \/__/ \/_/\/_/\/_/\/_/]],
}
-- These ASCII art have been generated in: http://patorjk.com/software/taag/
return M

6
rsc/config/nvim/init.lua Normal file
View file

@ -0,0 +1,6 @@
vim.opt.relativenumber = true
vim.o.guifont = "JetBrainsMono Nerd Font:h12"
vim.g.neovide_transparency = 0.8
vim.g.transparency = 1.0
vim.g.neovide_cursor_vfx_mode = "torpedo"
--vim.g.neovide_background_color = "#1e1e2e"

View file

@ -0,0 +1,68 @@
local M = {}
M.dap = {
plugin = true,
n = {
["<leader>db"] = {
"<cmd> DapToggleBreakpoint <CR>",
"Add breakpoint at line"
},
["<leader>dr"] = {
"<cmd> DapContinue <CR>",
"Start or continue the debugger",
},
["<leader>dus"] = {
function ()
local widgets = require('dap.ui.widgets');
local sidebar = widgets.sidebar(widgets.scopes);
sidebar.open();
end,
"Open debugging sidebar"
},
["<F5>"] = {
function ()
require("dap").continue()
end
},
["<F10>"] = {
function ()
require("dap").step_over()
end
},
["<F11>"] = {
function ()
require("dap").step_into()
end
},
["<F12>"] = {
function ()
require("dap").step_out()
end
},
}
}
M.dap_python = {
plugin = true,
n = {
["<leader>dpr"] = {
function()
require('dap-python').test_method()
end
},
}
}
M.crates = {
plugin = true,
n = {
["<leader>rcu"] = {
function ()
require('crates').upgrade_all_crates()
end,
"update crates"
}
}
}
return M

193
rsc/config/nvim/plugins.lua Normal file
View file

@ -0,0 +1,193 @@
local cmp = require "cmp"
local plugins = {
{
'numToStr/Comment.nvim',
lazy = false,
},
{
"simrat39/rust-tools.nvim",
ft = "rust",
dependencies = "neovim/nvim-lspconfig",
opts = function ()
return require "custom.configs.rust-tools"
end,
config = function(_, opts)
require('rust-tools').setup(opts)
end
},
{
'saecki/crates.nvim',
ft = {"toml"},
config = function(_, opts)
local crates = require('crates')
crates.setup(opts)
require('cmp').setup.buffer({
sources = { { name = "crates" }}
})
crates.show()
require("core.utils").load_mappings("crates")
end,
},
{
"rust-lang/rust.vim",
ft = "rust",
init = function ()
vim.g.rustfmt_autosave = 1
end
},
{
"theHamsta/nvim-dap-virtual-text",
lazy = false,
config = function(_, opts)
require("nvim-dap-virtual-text").setup()
end
},
{
"hrsh7th/nvim-cmp",
opts = function()
local M = require "plugins.configs.cmp"
M.completion.completeopt = "menu,menuone,noselect"
M.mapping["<CR>"] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Insert,
select = false,
}
table.insert(M.sources, {name = "crates"})
return M
end,
},
{
"m4xshen/hardtime.nvim",
dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" },
cmd = { "Hardtime" },
opts = {}
},
{
"folke/todo-comments.nvim",
event = "BufReadPost",
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
require "custom.configs.todo"
end,
},
{
"RRethy/vim-illuminate",
event = { "CursorHold", "CursorHoldI" },
config = function()
require "custom.configs.illuminate"
end,
},
{
"hiphish/rainbow-delimiters.nvim",
event = "BufReadPost",
config = function()
local rainbow_delimiters = require "rainbow-delimiters"
vim.g.rainbow_delimiters = {
strategy = {
[""] = rainbow_delimiters.strategy["global"],
vim = rainbow_delimiters.strategy["local"],
},
query = {
[""] = "rainbow-delimiters",
lua = "rainbow-blocks",
},
highlight = {
"RainbowDelimiterRed",
"RainbowDelimiterYellow",
"RainbowDelimiterBlue",
"RainbowDelimiterOrange",
"RainbowDelimiterGreen",
"RainbowDelimiterViolet",
"RainbowDelimiterCyan",
},
}
end,
},
{
"rcarriga/nvim-dap-ui",
event = "VeryLazy",
dependencies = "mfussenegger/nvim-dap",
config = function()
local dap = require("dap")
local dapui = require("dapui")
dapui.setup()
dap.listeners.after.event_initialized["dapui_config"] = function()
dapui.open()
end
dap.listeners.before.event_terminated["dapui_config"] = function()
dapui.close()
end
dap.listeners.before.event_exited["dapui_config"] = function()
dapui.close()
end
end
},
{
"jay-babu/mason-nvim-dap.nvim",
event = "VeryLazy",
dependencies = {
"williamboman/mason.nvim",
"mfussenegger/nvim-dap",
},
opts = {
handlers = {}
},
},
{
"mfussenegger/nvim-dap",
config = function (_,opts)
require("core.utils").load_mappings("dap")
end
},
{
"mfussenegger/nvim-dap-python",
ft = "python",
dependencies = {
"mfussenegger/nvim-dap",
"rcarriga/nvim-dap-ui"
},
config = function (_,opts)
local path = "~/.local/share/nvim/mason/packages/debugpy/venv/bin/python"
require("dap-python").setup(path)
require("core.utils").load_mappings("dap_python")
end,
},
{
"jose-elias-alvarez/null-ls.nvim",
event = "VeryLazy",
opts = function()
return require "custom.configs.null-ls"
end,
},
{
"neovim/nvim-lspconfig",
config = function ()
require "plugins.configs.lspconfig"
require "custom.configs.lspconfig"
end
},
{
"nvim-treesitter",
opts = {
ensure_installed = {
"ocaml",
"python",
"rust",
"css",
"html",
"dockerfile",
"gitignore",
"typescript",
"nix",
"rust",
}
}
},
{
"theRealCarneiro/hyprland-vim-syntax",
dependencies = { "nvim-treesitter/nvim-treesitter" },
ft = "hypr",
},
}
return plugins