Remove nvim-lua

This commit is contained in:
DashieTM 2024-07-17 23:33:52 +02:00
parent 759bad45a6
commit c1cb314be1
15 changed files with 0 additions and 1530 deletions

View file

@ -4,11 +4,6 @@
, ... , ...
}: }:
{ {
imports = [
# old neovim config
# (import ./nvim/default.nix { inherit lib pkgs; colorscheme = config.conf.colorscheme; })
];
programs.dashvim = { programs.dashvim = {
enable = true; enable = true;
colorscheme = config.conf.colorscheme; colorscheme = config.conf.colorscheme;

View file

@ -1,212 +0,0 @@
# please nixvim enable lazyloading
{ lib, pkgs, colorscheme, ... }:
{
programs.neovim = {
enable = true;
extraPackages = with pkgs; [
# Telescope
ripgrep
# lua
lua-language-server
stylua
# nix
nixd
# go
gopls
# jafuck
jdt-language-server
taplo
typst-lsp
sqls
shfmt
texlab
nixpkgs-fmt
crate2nix
ruff-lsp
pyright
lemminx
marksman
clang-tools_18
];
plugins = with pkgs.vimPlugins; [
lazy-nvim
];
extraLuaConfig =
let
plugins = with pkgs.vimPlugins; [
# LazyVim
LazyVim
bufferline-nvim
cmp-buffer
cmp-nvim-lsp
cmp-path
cmp_luasnip
cmp-async-path
conform-nvim
dashboard-nvim
dressing-nvim
flash-nvim
friendly-snippets
gitsigns-nvim
git-conflict-nvim
ltex_extra-nvim
indent-blankline-nvim
lualine-nvim
neo-tree-nvim
neoconf-nvim
neodev-nvim
noice-nvim
nui-nvim
nvim-cmp
nvim-dap
nvim-dap-ui
nvim-dap-python
nvim-dap-go
nvim-dap-virtual-text
nvim-nio
nvim-lint
nvim-lspconfig
nvim-notify
#nvim-spectre
nvim-treesitter.withAllGrammars
nvim-treesitter-context
nvim-treesitter-textobjects
nvim-ts-autotag
nvim-ts-context-commentstring
nvim-web-devicons
nvim-jdtls
rustaceanvim
typst-vim
instant-nvim
git-blame-nvim
neoscroll-nvim
mason-nvim
neotest
neotest-zig
neotest-python
neotest-rust
neotest-java
neotest-haskell
neotest-go
neotest-dotnet
neotest-bash
neotest-dart
omnisharp-extended-lsp-nvim
neotest
neotest-java
neotest-rust
persistence-nvim
plenary-nvim
telescope-fzf-native-nvim
telescope-nvim
telescope-zoxide
telescope-file-browser-nvim
telescope-project-nvim
todo-comments-nvim
vimtex
inc-rename-nvim
headlines-nvim
diffview-nvim
crates-nvim
cmake-tools-nvim
clangd_extensions-nvim
alpha-nvim
vim-visual-multi
ts-comments-nvim
nvim-tree-lua
nvim-snippets
markdown-preview-nvim
tokyonight-nvim
trouble-nvim
vim-illuminate
vim-startuptime
which-key-nvim
haskell-tools-nvim
Ionide-vim
{ name = "LuaSnip"; path = luasnip; }
{ name = "mini.ai"; path = mini-nvim; }
{ name = "mini.bufremove"; path = mini-nvim; }
{ name = "mini.comment"; path = mini-nvim; }
{ name = "mini.indentscope"; path = mini-nvim; }
{ name = "mini.pairs"; path = mini-nvim; }
{ name = "mini.surround"; path = mini-nvim; }
];
mkEntryFromDrv = drv:
if lib.isDerivation drv then
{ name = "${lib.getName drv}"; path = drv; }
else
drv;
lazyPath = pkgs.linkFarm "lazy-plugins" (builtins.map mkEntryFromDrv plugins);
in
''
require("lazy").setup({
defaults = {
lazy = true,
},
performance = {
rtp = {
disabled_plugins = {
"gzip",
"netrw",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
dev = {
-- reuse files from pkgs.vimPlugins.*
path = "${lazyPath}",
patterns = { "." },
-- fallback to download
fallback = true,
},
spec = {
{ "LazyVim/LazyVim",
opts = {
${if colorscheme != "" then "colorscheme = '${colorscheme}'," else ""}
},
import = "lazyvim.plugins" },
{ import = "lazyvim.plugins.extras.ui.alpha" },
{ import = "lazyvim.plugins.extras.lang.rust" },
{ import = "lazyvim.plugins.extras.lang.tailwind" },
{ import = "lazyvim.plugins.extras.lang.java" },
{ import = "lazyvim.plugins.extras.lang.go" },
{ import = "lazyvim.plugins.extras.lang.clangd" },
{ import = "lazyvim.plugins.extras.lang.markdown" },
{ import = "lazyvim.plugins.extras.lang.cmake" },
{ import = "lazyvim.plugins.extras.lang.omnisharp" },
{ import = "lazyvim.plugins.extras.lang.tex" },
{ import = "lazyvim.plugins.extras.util.dot" },
{ import = "lazyvim.plugins.extras.dap.core" },
{ import = "lazyvim.plugins.extras.test.core" },
{ "nvim-telescope/telescope-fzf-native.nvim", enabled = true },
{ "williamboman/mason-lspconfig.nvim", enabled = false },
{ import = "plugins" },
{ import = "plugins.plugins" },
},
${if colorscheme != "" then "install = { colorscheme = { '${colorscheme}' } }," else ""}
checker = { enabled = true, notify = false },
change_detection = { enabled = true, notify = false },
})
'';
};
# https://github.com/nvim-treesitter/nvim-treesitter#i-get-query-error-invalid-node-type-at-position
xdg.configFile."nvim/parser".source =
let
parsers = pkgs.symlinkJoin {
name = "treesitter-parsers";
paths = (pkgs.vimPlugins.nvim-treesitter.withAllGrammars).dependencies;
};
in
"${parsers}/parser";
# Normal LazyVim config here, see https://github.com/LazyVim/starter/tree/main/lua
xdg.configFile."nvim/lua".source = ./lua;
xdg.configFile."nvim/ftplugin".source = ./ftplugin;
}

View file

@ -1,58 +0,0 @@
{
"nodes": {
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1719994518,
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1720542800,
"narHash": "sha256-ZgnNHuKV6h2+fQ5LuqnUaqZey1Lqqt5dTUAiAnqH0QQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "feb2849fdeb70028c70d73b848214b00d324a497",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1719876945,
"narHash": "sha256-Fm2rDDs86sHy0/1jxTOKB1118Q0O3Uc7EC0iXvXKpbI=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz"
}
},
"root": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

View file

@ -1,35 +0,0 @@
{
description = "A lazyvim configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs =
{ flake-parts, ... }@inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
perSystem =
{ pkgs, ... }:
let
colorscheme = "catppuccin-mocha";
dashieVimModule = {
inherit pkgs colorscheme;
module = import ./default.nix;
nvim = pkgs.neovim;
};
in
{
packages = {
default = dashieVimModule.nvim;
};
};
};
}

View file

@ -1,5 +0,0 @@
local config = {
cmd = { "jdtls" },
root_dir = vim.fs.dirname(vim.fs.find({ "gradlew", ".git", "mvnw" }, { upward = true })[1]),
}
require("jdtls").start_or_attach(config)

View file

@ -1,15 +0,0 @@
-- nvimtree
local function open_nvim_tree(data)
local directory = vim.fn.isdirectory(data.file) == 1
if not directory then
return
end
-- change to the directory
vim.cmd.cd(data.file)
-- open the tree
require("nvim-tree.api").tree.open()
end
vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })

View file

@ -1,202 +0,0 @@
local Util = require("lazyvim.util")
local function map(mode, lhs, rhs, opts)
local keys = require("lazy.core.handler").handlers.keys
---@cast keys LazyKeysHandler
-- do not create the map if a lazy keys handler exists
if not keys.active[keys.parse({ lhs, mode = mode }).id] then
opts = opts or {}
opts.silent = opts.silent ~= false
vim.keymap.set(mode, lhs, rhs, opts)
end
end
local opts = { noremap = true, silent = true }
local term_opts = { silent = true }
-- crimes against humanity, but I don't care
map("n", "j", "h", opts)
map("n", "l", "k", opts)
map("n", "k", "j", opts)
map("n", ";", "l", opts)
map("v", "j", "h", opts)
map("v", "k", "j", opts)
map("v", "l", "k", opts)
map("v", ";", "l", opts)
-- test plugin
map("n", "<leader>OO", ':lua require("test_plugin").test()<CR>', { desc = "Toggle breakpoint" })
-- debug
map("n", "<leader>db", ':lua require("dap").toggle_breakpoint()<CR>', { desc = "Toggle breakpoint" })
map("n", "<leader>do", ':lua require("dap").step_over()<CR>', { desc = "Step over" })
map("n", "<leader>di", ':lua require("dap").step_into()<CR>', { desc = "Step into" })
map("n", "<leader>dc", ':lua require("dap").continue()<CR>', { desc = "Continue" })
map("n", "<leader>du", function()
require("dapui").toggle()
end, { desc = "Toggle DAP UI" })
map("n", "<leader>de", function()
require("dapui").eval()
end, { desc = "DAP Eval" })
-- window movement
map("n", "<A-j>", [[<Cmd>wincmd h<CR>]], opts)
map("n", "<A-;>", [[<Cmd>wincmd l<CR>]], opts)
map("n", "<A-t>", [[<Cmd>wincmd j<CR>]], opts)
map("i", "<A-j>", [[<Cmd>wincmd h<CR>]], opts)
map("i", "<A-;>", [[<Cmd>wincmd l<CR>]], opts)
map("i", "<A-k>", [[<Cmd>wincmd j<CR>]], opts)
-- toggle terminal
local lazyterm = function()
Util.terminal(nil, { cwd = Util.root(), esc_esc = false, ctrl_hjkl = false })
end
map("n", "<c-t>", lazyterm, { desc = "Terminal (root dir)" })
map("t", "<c-t>", "<cmd>close<cr>", { desc = "Hide Terminal" })
-- semicolon thing
-- map("i","<C-m>" ,"<C-o>A;<CR>", {desc = "add semi and newline"})
-- map("i","<C-n>" ,"<C-o>A;<ESC>", {desc = "add semi"})
map("n", "<leader>m", "$a;<CR>", { desc = "add semi and newline" })
map("n", "<leader>n", "$a;<ESC>", { desc = "add semi" })
-- tab switching
map("n", "<F1>", ":BufferLineCyclePrev<CR>", opts)
map("n", "<F2>", ":BufferLineCycleNext<CR>", opts)
-- git
map("n", "<leader>gq", function()
require("telescope.builtin").git_commits()
end, { desc = "Commits" })
map("n", "<leader>gw", function()
require("telescope.builtin").git_bcommits()
end, { desc = "Commits in branch" })
map("n", "<leader>gb", function()
require("telescope.builtin").git_branches()
end, { desc = "Branches" })
map("n", "<leader>gr", function()
require("telescope.builtin").git_status()
end, { desc = "Git status" })
map("n", "<leader>ga", function()
require("telescope.builtin").git_stash()
end, { desc = "Git stash" })
map("n", "<leader>gg", function()
Util.terminal({ "gitui" }, { cwd = Util.root() })
end, { desc = "gitui (root dir)" })
map("n", "<leader>gG", function()
Util.terminal({ "gitui" })
end, { desc = "gitui (cwd)" })
map("n", "<leader>gB", function()
require("gitblame")
vim.cmd(":GitBlameToggle")
end, { desc = "git blame" })
-- harpoon man
map("n", "<leader>h1", function()
require("harpoon.ui").nav_file(1)
end, { desc = "First Harpoon File" })
map("n", "<leader>h2", function()
require("harpoon.ui").nav_file(2)
end, { desc = "Second Harpoon File" })
map("n", "<leader>h3", function()
require("harpoon.ui").nav_file(3)
end, { desc = "First Harpoon File" })
map("n", "<leader>ha", function()
require("harpoon.mark").add_file()
end, { desc = "First Harpoon File" })
map("n", "<leader>hd", function()
require("harpoon.mark").remove_file()
end, { desc = "First Harpoon File" })
map("n", "<leader>hm", ":Telescope harpoon marks<CR>", { noremap = true, silent = true, desc = "Show harpoon marks" })
-- telescope
map("n", "<leader>fb", function()
require("telescope").extensions.file_browser.file_browser({})
end, { desc = "File Browser" })
map("n", "<leader>ff", function()
require("telescope.builtin").find_files()
end, { desc = "Find Files" })
map("n", "<leader>fg", function()
Live_grep_from_project_git_root()
end, { desc = "Live Grep (root)" })
map("n", "<leader>fG", function()
require("telescope.builtin").live_grep()
end, { desc = "Live Grep (cwd)" })
map("n", "<leader>fh", function()
require("telescope.builtin").help_tags()
end, { desc = "Help" })
map("n", "<leader>fp", function()
require("telescope").extensions.project.project({})
end, { noremap = true, silent = true, desc = "Projects" })
map("n", "<leader>z", function()
require("telescope").extensions.zoxide.list({})
end, { desc = "Zoxide" })
-- neoscroll
local t = {}
t["<A-l>"] = { "scroll", { "-vim.wo.scroll", "true", "250" } }
t["<A-k>"] = { "scroll", { "vim.wo.scroll", "true", "250" } }
require("neoscroll.config").set_mappings(t)
-- trouble
map("n", "<leader>t", "<cmd>TroubleToggle<CR>", term_opts)
-- format
map({ "n", "v" }, "<F4>", function()
Util.format({ force = true })
end, { desc = "Format" })
-- better yank
function Better_yank(opts)
local current_line = unpack(vim.api.nvim_win_get_cursor(0))
vim.api.nvim_command(current_line .. "," .. (opts.count - (current_line - 1)) .. "y")
end
vim.api.nvim_create_user_command("BetterYank", Better_yank, { count = 1 })
map("n", "by", ":BetterYank<CR>", term_opts)
-- better delete
function Better_delete(opts)
local current_line = unpack(vim.api.nvim_win_get_cursor(0))
vim.api.nvim_command(current_line .. "," .. (opts.count - (current_line - 1)) .. "d")
end
vim.api.nvim_create_user_command("BetterDelete", Better_delete, { count = 1 })
map("n", "bd", ":BetterDelete<CR>", term_opts)
-- neovide zoom
local change_scale_factor = function(delta)
vim.g.neovide_scale_factor = vim.g.neovide_scale_factor * delta
end
vim.keymap.set("n", "<C-=>", function()
change_scale_factor(1.25)
end)
vim.keymap.set("n", "<C-->", function()
change_scale_factor(1 / 1.25)
end)
-- neovide paste
vim.g.neovide_input_use_logo = 1
vim.api.nvim_set_keymap("i", "<C-S-V>", "<ESC>p<CR>I", { noremap = true, silent = true })
function Get_git_root()
local opts = {}
local function is_git_repo()
vim.fn.system("git rev-parse --is-inside-work-tree")
return vim.v.shell_error == 0
end
if is_git_repo() then
local dot_git_path = vim.fn.finddir(".git", ".;")
local root = vim.fn.fnamemodify(dot_git_path, ":h")
opts = {
cwd = root,
}
end
return opts
end
function Live_grep_from_project_git_root()
local opts = Get_git_root()
require("telescope.builtin").live_grep(opts)
end

View file

@ -1,55 +0,0 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable",
lazypath,
})
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
require("lazy").setup({
spec = {
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
{ import = "lazyvim.plugins.extras.ui.alpha" },
-- { import = "lazyvim.plugins.extras.ui.edgy" },
{ import = "plugins" },
{ import = "plugins.plugins" },
{ import = "lazyvim.plugins.extras.lang.rust" },
{ import = "lazyvim.plugins.extras.lang.tailwind" },
{ import = "lazyvim.plugins.extras.lang.java" },
{ import = "lazyvim.plugins.extras.lang.go" },
{ import = "lazyvim.plugins.extras.lang.clangd" },
{ import = "lazyvim.plugins.extras.lang.typescript" },
{ import = "lazyvim.plugins.extras.lang.python" },
{ import = "lazyvim.plugins.extras.lang.markdown" },
{ import = "lazyvim.plugins.extras.lang.cmake" },
{ import = "lazyvim.plugins.extras.lang.omnisharp" },
{ import = "lazyvim.plugins.extras.lang.json" },
{ import = "lazyvim.plugins.extras.lang.tex" },
{ import = "lazyvim.plugins.extras.util.dot" },
{ import = "lazyvim.plugins.extras.dap.core" },
{ import = "lazyvim.plugins.extras.test.core" },
},
defaults = {
lazy = true,
version = false,
},
checker = { enabled = true, notify = false },
change_detection = { enabled = true, notify = false },
performance = {
rtp = {
disabled_plugins = {
"gzip",
"netrw",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
})

View file

@ -1,126 +0,0 @@
local M = {}
---@type PluginLspKeys
M._keys = nil
---@return (LazyKeys|{has?:string})[]
function M.get()
local format = function()
require("lazyvim.util").format({ force = true })
end
if not M._keys then
---@class PluginLspKeys
M._keys = {
{ "<leader>cld", vim.diagnostic.open_float, desc = "Line Diagnostics" },
{ "<leader>cl", "<cmd>LspInfo<cr>", desc = "Lsp Info" },
{ "<leader>ca", "<cmd>Telescope lsp_definitions<cr>", desc = "Goto Definition", has = "definition" },
{ "<leader>cs", "<cmd>Telescope lsp_references<cr>", desc = "References" },
{ "<leader>cA", vim.lsp.buf.declaration, desc = "Goto Declaration" },
{ "<leader>cf", "<cmd>Telescope lsp_implementations<cr>", desc = "Goto Implementation" },
{ "<leader>cd", "<cmd>Telescope lsp_type_definitions<cr>", desc = "Goto Type Definition" },
{ "<leader>ce", vim.lsp.buf.hover, desc = "Hover" },
{ "<leader>cw", vim.lsp.buf.signature_help, desc = "Signature Help", has = "signatureHelp" },
{ "<c-k>", vim.lsp.buf.signature_help, mode = "i", desc = "Signature Help", has = "signatureHelp" },
{ "]d", M.diagnostic_goto(true), desc = "Next Diagnostic" },
{ "[d", M.diagnostic_goto(false), desc = "Prev Diagnostic" },
{ "]e", M.diagnostic_goto(true, "ERROR"), desc = "Next Error" },
{ "[e", M.diagnostic_goto(false, "ERROR"), desc = "Prev Error" },
{ "]w", M.diagnostic_goto(true, "WARN"), desc = "Next Warning" },
{ "[w", M.diagnostic_goto(false, "WARN"), desc = "Prev Warning" },
{ "<F4>", format, desc = "Format Range", mode = "v", has = "documentRangeFormatting" },
{ "<leader>cr", ":IncRename ", desc = "Rename", has = "rename" },
{
"<leader>cq",
function()
vim.lsp.buf.code_action({
context = {
only = {
"quickfix",
"quickfix.ltex",
"source",
"source.fixAll",
"source.organizeImports",
"",
},
},
})
end,
desc = "Fix",
mode = { "n", "v" },
has = "codeAction",
},
{
"<leader>cQ",
function()
vim.lsp.buf.code_action({
context = {
only = {
"refactor",
"refactor.inline",
"refactor.extract",
"refactor.rewrite",
},
},
})
end,
desc = "Refactor",
mode = { "n", "v" },
has = "codeAction",
},
}
end
return M._keys
end
---@param method string
function M.has(buffer, method)
method = method:find("/") and method or "textDocument/" .. method
local clients = require("lazyvim.util").lsp.get_clients({ bufnr = buffer })
for _, client in ipairs(clients) do
if client.supports_method(method) then
return true
end
end
return false
end
---@return (LazyKeys|{has?:string})[]
function M.resolve(buffer)
local Keys = require("lazy.core.handler.keys")
if not Keys.resolve then
return {}
end
local spec = M.get()
local opts = require("lazyvim.util").opts("nvim-lspconfig")
local clients = require("lazyvim.util").lsp.get_clients({ bufnr = buffer })
for _, client in ipairs(clients) do
local maps = opts.servers[client.name] and opts.servers[client.name].keys or {}
vim.list_extend(spec, maps)
end
return Keys.resolve(spec)
end
function M.on_attach(_, buffer)
local Keys = require("lazy.core.handler.keys")
local keymaps = M.resolve(buffer)
for _, keys in pairs(keymaps) do
if not keys.has or M.has(buffer, keys.has) then
local opts = Keys.opts(keys)
opts.has = nil
opts.silent = opts.silent ~= false
opts.buffer = buffer
vim.keymap.set(keys.mode or "n", keys.lhs, keys.rhs, opts)
end
end
end
function M.diagnostic_goto(next, severity)
local go = next and vim.diagnostic.goto_next or vim.diagnostic.goto_prev
severity = severity and vim.diagnostic.severity[severity] or nil
return function()
go({ severity = severity })
end
end
return M

View file

@ -1,34 +0,0 @@
-- Options are automatically loaded before lazy.nvim startup
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
-- Add any additional options here
local options = {
fileencoding = "utf-8",
number = true,
showmode = true,
termguicolors = true,
spelllang = "en_us",
shell = "fish",
relativenumber = false,
scrolloff = 5,
scrolljump = 5,
wrap = false,
}
vim.filetype.add({
extension = {
typst = "typst",
typ = "typst",
},
})
vim.o.guifont = "JetBrainsMono Nerd Font:h14"
vim.g.neovide_refresh_rate_idle = 180
vim.g.neovide_refresh_rate_idle = 5
vim.g.neovide_hide_mouse_when_typing = true
vim.g.mkdp_browser = "/usr/bin/firefox"
vim.g.mkdp_auto_start = 1
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
vim.g.autoformat = false
for k, v in pairs(options) do
vim.opt[k] = v
end

View file

@ -1,143 +0,0 @@
return {
{
"L3MON4D3/LuaSnip",
build = (not jit.os:find("Windows"))
and "echo -e 'NOTE: jsregexp is optional, so not a big deal if it fails to build\n'; make install_jsregexp"
or nil,
dependencies = {
"rafamadriz/friendly-snippets",
config = function()
require("luasnip.loaders.from_vscode").lazy_load()
end,
},
opts = {
history = true,
delete_check_events = "TextChanged",
updateevents = "TextChanged,TextChangedI",
enable_autosnippets = true,
},
keys = function()
return {}
end,
config = function(_, opts)
require("luasnip").setup(opts)
end,
},
{
"hrsh7th/nvim-cmp",
version = false,
event = "InsertEnter",
dependencies = {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"FelipeLema/cmp-async-path",
"saadparwaiz1/cmp_luasnip",
"Saecki/crates.nvim",
},
opts = function()
vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true })
local cmp = require("cmp")
local defaults = require("cmp.config.default")()
local luasnip = require("luasnip")
local compare = require("cmp.config.compare")
return {
preselect = cmp.PreselectMode.None,
completion = {
-- completeopt = "menu,menuone,noinsert",
},
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
mapping = {
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = false }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
["<S-CR>"] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Replace,
select = false,
}), -- Accept cur
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item({ behavior = cmp.SelectBehavior.Insert })
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item({ behavior = cmp.SelectBehavior.Insert })
else
fallback()
end
end, {
"i",
"s",
}),
["<C-j>"] = cmp.mapping(function(fallback)
if luasnip.expandable() then
luasnip.expand()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end, {
"i",
"s",
}),
["<C-k>"] = cmp.mapping(function(fallback)
if luasnip.expand_or_jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, {
"i",
"s",
}),
},
sources = cmp.config.sources({
{ name = "nvim_lsp", priority = 99 },
{ name = "luasnip", priority = 3, max_item_count = 3 },
{ name = "buffer", priority = 2, max_item_count = 2, keyword_length = 5 },
{ name = "async_path", priority = 1, max_item_count = 2, keyword_length = 3, trigger_characters = {} },
{ name = "crates" },
}),
sorting = {
priority_weight = 90,
comparators = {
compare.exact,
compare.score,
compare.offset,
compare.kind,
},
},
formatting = {
preselect = cmp.PreselectMode.None,
format = function(entry, item)
local icons = require("lazyvim.config").icons.kinds
if icons[item.kind] then
item.kind = icons[item.kind] .. item.kind
end
return require("tailwindcss-colorizer-cmp").formatter(entry, item)
end,
},
experimental = {
ghost_text = {
hl_group = "CmpGhostText",
},
},
}
end,
config = function(_, opts)
local cmp = require("cmp")
require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/snippets" })
cmp.setup(opts)
end,
},
}

View file

@ -1,100 +0,0 @@
return {
{
"goolord/alpha-nvim",
event = "VimEnter",
opts = function()
local alpha = require("alpha")
local dashboard = require("alpha.themes.dashboard")
dashboard.section.header.val = {
[[ _______ ___ _______. __ __ __ _______ ]],
[[| \ / \ / || | | | | | | ____|]],
[[| .--. | / ^ \ | (----`| |__| | | | | |__ ]],
[[| | | | / /_\ \ \ \ | __ | | | | __| ]],
[[| '--' | / _____ \ .----) | | | | | | | | |____ ]],
[[|_______/ /__/ \__\ |_______/ |__| |__| |__| |_______|]],
[[ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⢤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ]],
[[ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠪⣍⣒⠒⠦⠤⠤⠤⠄⠠⡜⡐⠁⠪⡢⡀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠤⢄⠀⠀⠀⠀⠀⠀⠀ ]],
[[ ⠀⠀⠀⠈⠛⠯⣉⠁⣐⣂⠐⠮⠥⠟⣓⣲⣾⣿⣿⣿⣶⡃⠀⠀⠈⢞⢆⠀⠀⠀⠀⠀⠀⡰⢁⠂⠄⣇⠀⠀⠀⠀⠀⠀ ]],
[[ ⠀⠀⠀⠀⣠⠤⠤⠭⠷⠎⡡⠔⠒⠘⠀⢹⣿⣿⣿⣿⣿⠀⠈⠀⠀⠀⢢⢣⠀⠀⠀⠀⢀⡇⠈⠀⢰⢰⠀⠀⠀⠀⠀⠀ ]],
[[ ⠀⠀⠀⢸⢰⠀⠀⠀⡩⢋⣀⣤⣤⣤⣤⣤⣿⣿⠟⠿⣿⡀⠀⠀⠀⠀⠀⠆⢳⠀⠀⠀⢸⠀⠂⠀⠀⡈⡆⠀⠀⠀⠀⠀ ]],
[[ ⠀⠀⠀⠀⢣⢂⠀⠮⡪⠛⠉⢋⠝⠻⢿⢿⡿⢁⠔⢋⣸⠇⠀⠀⠀⠀⠀⡘⣆⢣⠀⠀⡼⠀⠀⠀⠀⡇⣇⠀⠀⠀⠀⠀ ]],
[[ ⠀⠀⠀⠀⠀⡣⢲⡊⠀⠀⠀⠀⠀⡴⠃⣼⠡⢪⠔⠋⠀⠀⠀⢀⠀⠀⠀⢸⣿⡄⢆⠀⡇⠀⠀⠀⠀⠁⢸⠀⠀⠀⠀⠀ ]],
[[ ⠀⠀⠀⠀⢰⢡⡇⠀⠀⢀⠔⠠⠊⣰⠞⡇⢠⠃⠀⣠⣶⣿⣷⣷⣷⠄⠀⠈⡟⣷⡸⡄⡇⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀ ]],
[[ ⠀⠀⠀⠀⡇⣾⠀⣀⠔⣁⣤⣦⢺⣿⡆⡆⡃⠀⢨⠃⢸⣿⣿⣿⠏⠀⠠⢀⢠⣿⡇⣧⡇⠀⠀⠀⠀⠀⢸⣆⢔⡲⡆⠀ ]],
[[ ⠀⠀⣠⠞⠼⠧⢙⡒⣾⣿⣿⡷⡘⣟⣷⣜⡃⠀⡼⠀⠀⠷⠗⠋⠀⠀⠀⢀⡟⣿⣿⢀⠓⠀⠀⠀⠀⠀⢸⢋⠊⠀⡇⠀ ]],
[[ ⠘⠛⠒⠒⠉⠉⠁⡇⣿⣽⣿⡇⠈⢹⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⣠⠟⠀⣷⣿⣇⠱⡀⠀⠀⠀⡄⢀⠃⠀⡄⡇⠀ ]],
[[ ⠀⠀⠀⠀⠀⠀⠀⡇⢸⣏⢀⣧⠀⠈⠆⠀⠀⠀⠀⠀⠀⠀⠀⡠⢊⡴⡟⠀⡼⢁⢸⡙⣠⠁⠀⠀⠀⢇⠆⠀⢀⢳⡇⠀ ]],
[[ ⠀⠀⠀⠀⠀⠀⠀⢳⢀⣵⢸⣯⣷⣤⣀⠀⠀⠀⠀⠀⢀⣐⠮⠔⡎⠘⠀⠈⢀⢮⣿⣷⠁⠇⠠⠀⢰⠎⠀⠀⡘⣸⠀⠀ ]],
[[ ⠀⠀⠀⠀⠀⠀⢀⠎⢬⢘⣯⠛⢻⠏⣿⣿⣶⣶⡶⠋⠉⠀⠀⢸⠀⠀⡔⠀⣪⣿⣿⢻⠀⠸⠈⡇⠛⠀⠠⢀⢃⡇⠀⠀ ]],
[[ ⠀⠀⠀⠀⠀⠈⡹⡡⣪⡏⠛⠀⠀⢠⡟⢻⣿⣿⡇⠀⠀⠀⠀⢼⡆⠠⡇⢰⣿⣿⣿⣻⡄⠀⡆⠁⠀⣠⠃⠌⠼⠤⠤⡀ ]],
[[ ⠀⠀⠀⣀⡠⢞⣳⣽⢸⡇⠀⡇⠀⠸⠀⣼⣿⣿⡇⠀⠀⠀⠀⠈⡇⣰⠃⣶⡍⣼⣿⣏⠃⠀⠁⢠⠊⣀⣜⠤⠐⢂⢆⠇ ]],
[[ ⠀⠀⠈⠉⠉⠁⠀⢇⢸⡟⠀⡇⠀⡇⢸⢷⣹⣿⡇⠀⠀⠀⠀⠀⢳⡽⠃⡞⣇⣿⣧⣿⠀⠀⢸⠃⢠⠃⠀⢀⠤⢢⠞⠀ ]],
[[ ⠀⠀⠀⠀⠀⠀⠀⢸⡀⡇⠀⠁⢠⠁⣿⠈⣿⣿⠇⠀⠀⠀⠀⠀⠀⠁⡆⡇⣾⠿⣹⣿⠀⠀⠃⡰⠃⡰⢔⣡⠞⠁⠀⠀ ]],
[[ ⠀⠀⠀⠀⠀⠀⠀⠀⢇⢠⠀⠂⡌⠀⢽⠁⣟⡟⠀⠀⠀⠀⠀⠀⠀⠀⣇⢶⢹⣤⣿⠇⠀⣀⣈⠝⡱⠒⠉⠀⠀⠀⠀⠀ ]],
[[ ⠀⠀⠀⠀⠀⠀⠀⠀⠈⣎⡄⠀⡷⠀⢸⠀⢹⠇⠀⠀⠀⠀⠀⠀⠀⠀⠫⣼⣾⣿⢋⠤⠤⠥⢆⡞⠀⠀⠀⠀⠀⠀⠀⠀ ]],
[[ ⠀⠀⠀⠀⠀⠀⠀⠀⢀⢫⣡⢸⠎⢃⢘⠀⢈⡄⠀⠀⠀⠀⠀⠀⠀⠀⢀⡽⣽⢀⡋⠉⠑⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀ ]],
[[ ⠀⠀⠀⠀⠀⠀⠀⠀⠘⠉⠳⡯⣇⢆⠻⣆⠈⣤⠀⠀⠀⠀⣀⡀⠤⢚⡨⠷⣝⠗⠑⢄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ]],
[[ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠫⣗⠳⡜⠵⠀⡍⡥⠤⠤⠤⠄⠒⠉⠀⠀⠀⠉⠉⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ]],
[[ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠫⡆⣇⠇⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ]],
[[ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⡙⡰⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ]],
[[ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣦⠞⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ]],
}
dashboard.section.buttons.val = {
dashboard.button("f", " Find file", ":lua require('telescope.builtin').find_files()<CR>"),
dashboard.button("y", " Yazi", ":lua require('yazi').yazi()<CR>"),
dashboard.button("p", " Find project", ":lua require('telescope').extensions.project.project{}<CR>"),
dashboard.button("t", " Zoxide", ":lua require('telescope').extensions.zoxide.list{}<CR>"),
dashboard.button("c", " Configuration", ":e ~/.config/nvim/init.lua <CR>"),
dashboard.button("q", " Quit Neovim", ":qa<CR>"),
}
local function footer()
return "dashie@dashie.org"
end
dashboard.section.footer.val = footer()
dashboard.section.footer.opts.hl = "Type"
dashboard.section.header.opts.hl = "Include"
dashboard.section.buttons.opts.hl = "Keyword"
dashboard.opts.opts.noautocmd = true
-- alpha.pad_margin(dashboard.section.header.val, dashboard.opts , 0, 0)
alpha.setup(dashboard.opts)
end,
config = function(_, dashboard)
-- close Lazy and re-open when the dashboard is ready
if vim.o.filetype == "lazy" then
vim.cmd.close()
vim.api.nvim_create_autocmd("User", {
pattern = "AlphaReady",
callback = function()
require("lazy").show()
end,
})
end
require("alpha").setup({
layout = {
{ type = "padding", val = 1 },
dashboard.section.header,
{ type = "padding", val = 1 },
dashboard.section.buttons,
{ type = "padding", val = 1 },
dashboard.section.footer,
},
})
vim.api.nvim_create_autocmd("User", {
pattern = "LazyVimStarted",
callback = function()
local stats = require("lazy").stats()
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
dashboard.section.footer.val = "⚡ Neovim loaded " .. stats.count .. " plugins in " .. ms .. "ms"
pcall(vim.cmd.AlphaRedraw)
end,
})
end,
},
}

View file

@ -1,9 +0,0 @@
return {
{
{ "rcarriga/nvim-notify", enabled = false },
},
{ { "folke/noice.nvim", enabled = false } },
{ { "nvimtools/none-ls.nvim", enabled = false } },
{ { "nvimdev/dashboard-nvim", enabled = false } },
{ { "nvim-neo-tree/neo-tree.nvim", enabled = false } },
}

View file

@ -1,239 +0,0 @@
return {
{
"williamboman/mason.nvim",
},
{
"neovim/nvim-lspconfig",
---@class PluginLspOpts
opts = function(_, opts)
local path = vim.fn.stdpath("config") .. "/spell/ltex.dictionary.en-US.txt"
local words = {}
local file, err = io.open(path, "r")
if err ~= nil then
os.execute("mkdir " .. vim.fn.stdpath("config") .. "/spell")
file = io.open(path, "w")
file:write("")
file:close()
file = io.open(path, "r")
end
for word in file:lines() do
table.insert(words, word)
end
local new_opts = {
format_notify = false,
-- LSP Server Settings
---@type lspconfig.options
servers = {
marksman = {
mason = false,
},
clangd = {
mason = false,
},
jdtls = {
mason = false,
},
gopls = {
mason = false,
},
pyright = {
mason = false,
},
ruff_lsp = {
mason = false,
},
texlab = {
mason = false,
},
taplo = {
keys = {
{
"K",
function()
if vim.fn.expand("%:t") == "Cargo.toml" and require("crates").popup_available() then
require("crates").show_popup()
else
vim.lsp.buf.hover()
end
end,
desc = "Show Crate Documentation",
},
},
mason = false,
},
bashls = {
mason = false,
},
ansiblels = {
mason = false,
},
omnisharp = {
mason = false,
handlers = {
["textDocument/definition"] = function(...)
return require("omnisharp_extended").handler(...)
end,
},
keys = {
{
"<leader>oe",
function()
require("omnisharp_extended").telescope_lsp_definitions()
end,
desc = "Goto Definition",
},
},
cmd = {
-- no comment
"OmniSharp",
"-z",
"--hostPID",
tostring(vim.fn.getpid()),
"DotNet:enablePackageRestore=false",
"--encoding",
"utf-8",
"--languageserver",
"FormattingOptions:EnableEditorConfigSupport=true",
"FormattingOptions:OrganizeImports=true",
"RoslynExtensionsOptions:EnableAnalyzersSupport=true",
"RoslynExtensionsOptions:EnableImportCompletion=true",
-- inlay hints are bugged until next release.....
-- "RoslynExtensionsOptions:InlayHintsOptions:EnableForParameters=true",
-- "RoslynExtensionsOptions:InlayHintsOptions:ForLiteralParameters=true",
-- "RoslynExtensionsOptions:InlayHintsOptions:ForIndexerParameters=true",
-- "RoslynExtensionsOptions:InlayHintsOptions:ForObjectCreationParameters=true",
-- "RoslynExtensionsOptions:InlayHintsOptions:ForOtherParameters=true",
-- "RoslynExtensionsOptions:InlayHintsOptions:SuppressForParametersThatDifferOnlyBySuffix=false",
-- "RoslynExtensionsOptions:InlayHintsOptions:SuppressForParametersThatMatchMethodIntent=false",
-- "RoslynExtensionsOptions:InlayHintsOptions:SuppressForParametersThatMatchArgumentName=false",
-- "RoslynExtensionsOptions:InlayHintsOptions:EnableForTypes=true",
-- "RoslynExtensionsOptions:InlayHintsOptions:ForImplicitVariableTypes=true",
-- "RoslynExtensionsOptions:InlayHintsOptions:ForLambdaParameterTypes=true",
-- "RoslynExtensionsOptions:InlayHintsOptions:ForImplicitObjectCreation=true",
"Sdk:IncludePrereleases=true",
},
},
tinymist = {
settings = {
formatterMode = "typstyle",
exportPdf = "onSave",
},
mason = false,
},
nixd = {
settings = {
["nixd"] = {
formatting = {
command = { "nixpkgs-fmt" },
},
},
},
mason = false,
},
ltex = {
settings = {
ltex = {
checkFrequency = "save",
dictionary = {
["en-US"] = words,
},
},
},
filetypes = {
"bib",
"gitcommit",
"markdown",
"org",
"plaintex",
"rst",
"rnoweb",
"tex",
"pandoc",
"typst",
"typ",
"text",
},
mason = false,
},
sqls = {
mason = false,
},
lemminx = {
mason = false,
},
opencl_ls = {
mason = false,
},
yamlls = {
mason = false,
},
zls = {
mason = false,
},
jsonls = {
mason = false,
cmd = { "vscode-json-languageserver", "--stdio" },
},
cssls = {
mason = false,
cmd = { "css-languageserver", "--stdio" },
},
lua_ls = {
mason = false,
{
Lua = {
workspace = {
checkThirdParty = false,
},
completion = {
callSnippet = "Replace",
},
},
},
},
},
}
return vim.tbl_deep_extend("keep", new_opts, opts)
end,
init = function()
local keys = require("lazyvim.plugins.lsp.keymaps").get()
local my_keys = require("config.lsp-keymap").get()
local count = 0
for _ in pairs(my_keys) do
keys[#keys + 1] = my_keys[count]
count = count + 1
end
end,
},
{
"stevearc/conform.nvim",
opts = {
keys = {
{
"<leader>cF",
function()
require("conform").format({ async = true, lsp_fallback = true })
end,
mode = "",
numberdesc = "Format buffer",
},
},
formatters = {
mdformat = {
prepend_args = { "--number" },
},
},
formatters_by_ft = {
nix = { "nixpkgs-fmt" },
lua = { "stylua" },
sh = { "shfmt" },
cs = { "dotnet-csharpier" },
markdown = { "mdformat" },
sql = { "sql-formatter" },
json = { "jq" },
yaml = { "yamlfmt" },
},
},
},
}

View file

@ -1,292 +0,0 @@
return {
{
"nvim-telescope/telescope.nvim",
cmd = "Telescope",
keys = function()
return {}
end,
opts = {
defaults = {
layout_strategy = "flex",
layout_config = {
flex = {
height = 0.95,
width = 0.95,
flip_columns = 100,
},
vertical = { preview_height = 0.5, preview_cutoff = 5 },
horizontal = { preview_width = 0.7, preview_cutoff = 99 },
},
},
},
},
{
"nvim-telescope/telescope-project.nvim",
lazy = true,
},
{
"nvim-telescope/telescope-file-browser.nvim",
lazy = true,
config = function()
require("telescope").load_extension("file_browser")
end,
},
{
"jvgrootveld/telescope-zoxide",
lazy = true,
config = function()
local z_utils = require("telescope._extensions.zoxide.utils")
local t = require("telescope")
-- Configure the extension
t.setup({
extensions = {
zoxide = {
prompt_title = "[ Queries ]",
mappings = {
default = {
after_action = function(selection)
print("Update to (" .. selection.z_score .. ") " .. selection.path)
end,
},
["<C-s>"] = {
before_action = function(selection)
print("before C-s")
end,
action = function(selection)
vim.cmd("edit " .. selection.path)
end,
},
["<C-q>"] = { action = z_utils.create_basic_command("split") },
},
},
},
})
-- Load the extension
t.load_extension("zoxide")
end,
},
{
"lervag/vimtex",
config = function()
vim.cmd("let g:vimtex_quickfix_mode=0")
vim.cmd("let g:vimtex_view_general_viewer = 'evince'")
vim.cmd("let g:vimtex_compiler_method = 'latexmk'")
vim.cmd(
"let g:vimtex_compiler_latexmk = {'options': ['-pdf', '-shell-escape', '-file-line-error', '--extra-mem-bot=10000000', '-synctex=1', '-interaction=nonstopmode',],}"
)
end,
},
{
"jbyuki/instant.nvim",
config = function()
vim.cmd("let g:instant_username = 'dashie'")
end,
},
{
"nvim-treesitter/nvim-treesitter",
config = function(_, _)
local opts = {
ensure_installed = {},
-- parser_install_dir = "~/.config/nvim",
textobjects = {
select = {
enable = true,
lookahead = true,
keymaps = {
-- You can use the capture groups defined in textobjects.scm
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner",
},
},
},
}
require("nvim-treesitter.configs").setup(opts)
end,
},
{
"karb94/neoscroll.nvim",
config = function()
require("neoscroll").setup()
end,
},
{
"kaarmu/typst.vim",
lazy = true,
event = "FileType typst",
},
{
"folke/which-key.nvim",
event = "VeryLazy",
opts = {
plugins = { spelling = true },
defaults = {
mode = { "n", "v" },
["g"] = { name = "+goto" },
["gz"] = { name = "+surround" },
["]"] = { name = "+next" },
["["] = { name = "+prev" },
["<leader><tab>"] = { name = "+tabs" },
["<leader>b"] = { name = "+buffer" },
["<leader>c"] = { name = "+code" },
["<leader>f"] = { name = "+file/find" },
["<leader>g"] = { name = "+git" },
["<leader>gh"] = { name = "+hunks" },
["<leader>q"] = { name = "+quit/session" },
["<leader>s"] = { name = "+search" },
["<leader>u"] = { name = "+ui" },
["<leader>w"] = { name = "+windows" },
["<leader>x"] = { name = "+diagnostics/quickfix" },
["<leader>h"] = { name = "+harpoon" },
["<leader>d"] = { name = "+DAP" },
},
},
config = function(_, opts)
local wk = require("which-key")
wk.setup(opts)
wk.register(opts.defaults)
end,
},
{
"f-person/git-blame.nvim",
lazy = true,
},
{
"mg979/vim-visual-multi",
},
{
"barreiroleo/ltex_extra.nvim",
ft = { "tex", "typst", "typ" },
lazy = true,
},
{
"smjonas/inc-rename.nvim",
lazy = true,
event = "BufEnter",
config = function()
require("inc_rename").setup({
cmd_name = "IncRename", -- the name of the command
hl_group = "Substitute", -- the highlight group used for highlighting the identifier's new name
preview_empty_name = true, -- whether an empty new name should be previewed; if false the command preview will be cancelled instead
show_message = true, -- whether to display a `Renamed m instances in n files` message after a rename operation
input_buffer_type = nil, -- the type of the external input buffer to use (the only supported value is currently "dressing")
post_hook = nil, -- callback to run after renaming, receives the result table (from LSP handler) as an argument
})
end,
},
{
"nvim-tree/nvim-tree.lua",
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
require("nvim-tree").setup({
renderer = {
group_empty = true,
},
view = {
side = "right",
},
diagnostics = {
enable = true,
},
})
end,
keys = {
{
"<leader>fe",
function()
require("nvim-tree.api").tree.toggle()
end,
desc = "Explorer NvimTree (root dir)",
},
{
"<leader>fE",
function()
require("nvim-tree.api").tree.toggle()
end,
desc = "Explorer NvimTree (cwd)",
},
{ "<A-f>", "<leader>fe", desc = "Explorer NvimTree (root dir)", remap = true },
{ "<A-F>", "<leader>fE", desc = "Explorer NvimTree (cwd)", remap = true },
},
},
{
"rcarriga/nvim-dap-ui",
keys = {
{
"<leader>dk",
function()
require("dap").down()
end,
desc = "Down",
},
{
"<leader>dl",
function()
require("dap").up()
end,
desc = "Up",
},
{
"<leader>d;",
function()
require("dap").run_last()
end,
desc = "Run Last",
},
},
},
{
"nvim-neotest/neotest",
dependencies = {
"rcasia/neotest-java",
},
opts = {
adapters = {
["neotest-java"] = {
ignore_wrapper = false, -- whether to ignore maven/gradle wrapper
junit_jar = "/home/dashie/.local/share/nvim/mason/bin/junit-standalone.jar",
-- default: .local/share/nvim/neotest-java/junit-platform-console-standalone-[version].jar
},
},
},
},
{
"DreamMaoMao/yazi.nvim",
dependencies = {
"nvim-telescope/telescope.nvim",
"nvim-lua/plenary.nvim",
},
keys = {
{ "<leader>fy", "<cmd>Yazi<CR>", desc = "Toggle Yazi" },
},
},
{
"sindrets/diffview.nvim",
keys = {
{ "<leader>gd", "<cmd>DiffviewOpen<CR>", desc = "Toggle Difftool" },
},
},
{ "akinsho/git-conflict.nvim", version = "*", config = true },
{ "Hoffs/omnisharp-extended-lsp.nvim" },
{
"barreiroleo/ltex_extra.nvim",
branch = "dev",
ft = { "tex", "typst", "text" },
-- this causes an error with fsharp since
-- they use markdown to show lsp messages
config = function()
require("ltex_extra").setup({
load_langs = { "en-US" },
path = vim.fn.stdpath("config") .. "/spell",
})
end,
},
{ "ionide/Ionide-vim", ft = "fsharp" },
{
"mrcjkb/haskell-tools.nvim",
version = "^3",
lazy = false,
},
}