neovim cleanup
This commit is contained in:
48
flake.lock
generated
48
flake.lock
generated
@@ -8,11 +8,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1763759067,
|
"lastModified": 1769996383,
|
||||||
"narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=",
|
"narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0",
|
"rev": "57928607ea566b5db3ad13af0e57e921e6b12381",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -70,11 +70,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764544324,
|
"lastModified": 1771625283,
|
||||||
"narHash": "sha256-GVBGjO7UsmzLrlOJV8NlKSxukHaHencrJqWkCA6FkqI=",
|
"narHash": "sha256-1T88/PSNKpRNtaiXATTae0hpRnBpjmIL0b1QfGO6HBA=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "e4e25a8c310fa45f2a8339c7972dc43d2845a612",
|
"rev": "a913ae61bf3b9f4312f6097b68cdf0a0fa699279",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -90,11 +90,11 @@
|
|||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764547590,
|
"lastModified": 1771545891,
|
||||||
"narHash": "sha256-PDVKI5QCPfzVCPY/ZYAQTHGwC9ksT8ISNVaVZDVzb54=",
|
"narHash": "sha256-aaVUfc/9q2pCsELZmYhf+uvYRMCUlBvccgL1VS27R+o=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "neovim-nightly-overlay",
|
"repo": "neovim-nightly-overlay",
|
||||||
"rev": "71ba04d8a26327031fd58284af4a4891d7b3c842",
|
"rev": "917b72d5e27bc217440655b81f701d7062bdd198",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -106,11 +106,11 @@
|
|||||||
"neovim-src": {
|
"neovim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764519732,
|
"lastModified": 1771541613,
|
||||||
"narHash": "sha256-R0UspjBwPi5St0Dxq9Ej9ejJ34K8ivF5WeCS9dMvvVQ=",
|
"narHash": "sha256-1Rpt5B4pNW/MNkWoEamqwCa5I4/9G84dSqp4eHS5zsA=",
|
||||||
"owner": "neovim",
|
"owner": "neovim",
|
||||||
"repo": "neovim",
|
"repo": "neovim",
|
||||||
"rev": "d62bbe24cbe5311ce595d73a0c40dc87af989666",
|
"rev": "e3d46a63375c84b7bd409f1f07ef56eb985eae50",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -141,11 +141,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1771177547,
|
"lastModified": 1771207753,
|
||||||
"narHash": "sha256-trTtk3WTOHz7hSw89xIIvahkgoFJYQ0G43IlqprFoMA=",
|
"narHash": "sha256-b9uG8yN50DRQ6A7JdZBfzq718ryYrlmGgqkRm9OOwCE=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "ac055f38c798b0d87695240c7b761b82fc7e5bc2",
|
"rev": "d1c15b7d5806069da59e819999d70e1cec0760bf",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -157,11 +157,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764517877,
|
"lastModified": 1771369470,
|
||||||
"narHash": "sha256-pp3uT4hHijIC8JUK5MEqeAWmParJrgBVzHLNfJDZxg4=",
|
"narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "2d293cbfa5a793b4c50d17c05ef9e385b90edf6c",
|
"rev": "0182a361324364ae3f436a63005877674cf45efb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -173,11 +173,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764517877,
|
"lastModified": 1771369470,
|
||||||
"narHash": "sha256-pp3uT4hHijIC8JUK5MEqeAWmParJrgBVzHLNfJDZxg4=",
|
"narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "2d293cbfa5a793b4c50d17c05ef9e385b90edf6c",
|
"rev": "0182a361324364ae3f436a63005877674cf45efb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -215,11 +215,11 @@
|
|||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764594412,
|
"lastModified": 1771623723,
|
||||||
"narHash": "sha256-UKE1AYol3ukmVWataOlWyGwvaqi5PrFnXzQsRgye8J8=",
|
"narHash": "sha256-ho72AZHUwai/ZNBEu0fw9gW4myoADFdytVjEF4FLKu0=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "a3d24f328cb9b47971dd7b236084a1afaf7733dd",
|
"rev": "2ffcfb9eefe66009163e779a487240fdca03637f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -1,125 +0,0 @@
|
|||||||
{ pkgs, config, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
deferred-clipboard-nvim = pkgs.vimUtils.buildVimPlugin {
|
|
||||||
name = "deferred-clipboard-nvim";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "EtiamNullam";
|
|
||||||
repo = "deferred-clipboard.nvim";
|
|
||||||
rev = "f58d9a20fe5d5891c61773814a1f3051ce43c006";
|
|
||||||
hash = "sha256-HTk70Fb4n/F4nVkfxSKRsgrXnoFwMpSV276WvDt5uY0=";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
mkLuaConfig = file: args:
|
|
||||||
builtins.readFile (pkgs.replaceVars file args);
|
|
||||||
in {
|
|
||||||
home.sessionVariables = { EDITOR = "nvim"; };
|
|
||||||
|
|
||||||
programs.neovim = {
|
|
||||||
enable = true;
|
|
||||||
vimAlias = true;
|
|
||||||
vimdiffAlias = true;
|
|
||||||
withNodeJs = true;
|
|
||||||
withPython3 = true;
|
|
||||||
plugins = (with pkgs.vimPlugins; [
|
|
||||||
catppuccin-nvim
|
|
||||||
cmp-buffer
|
|
||||||
cmp-conjure
|
|
||||||
cmp-nvim-lua
|
|
||||||
cmp-nvim-lsp
|
|
||||||
cmp-path
|
|
||||||
cmp_luasnip
|
|
||||||
conform-nvim
|
|
||||||
conjure
|
|
||||||
comment-nvim
|
|
||||||
deferred-clipboard-nvim
|
|
||||||
dropbar-nvim
|
|
||||||
friendly-snippets
|
|
||||||
lazy-nvim
|
|
||||||
lean-nvim
|
|
||||||
leap-nvim
|
|
||||||
lspkind-nvim
|
|
||||||
lualine-lsp-progress
|
|
||||||
lualine-nvim
|
|
||||||
luasnip
|
|
||||||
markdown-preview-nvim
|
|
||||||
neoconf-nvim
|
|
||||||
neodev-nvim
|
|
||||||
neoscroll-nvim
|
|
||||||
nvim-autopairs
|
|
||||||
nvim-cmp
|
|
||||||
nvim-lspconfig
|
|
||||||
nvim-surround
|
|
||||||
nvim-tree-lua
|
|
||||||
nvim-treesitter-textobjects
|
|
||||||
nvim-ts-context-commentstring
|
|
||||||
nvim-web-devicons
|
|
||||||
oil-nvim
|
|
||||||
plenary-nvim
|
|
||||||
rainbow-delimiters-nvim
|
|
||||||
telescope-fzf-native-nvim
|
|
||||||
telescope-nvim
|
|
||||||
vimtex
|
|
||||||
which-key-nvim
|
|
||||||
|
|
||||||
]) ++ [
|
|
||||||
(pkgs.vimPlugins.nvim-treesitter.withPlugins
|
|
||||||
(plugins: pkgs.tree-sitter.allGrammars))
|
|
||||||
];
|
|
||||||
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
ripgrep
|
|
||||||
fd
|
|
||||||
codespell
|
|
||||||
prettierd
|
|
||||||
# Lua
|
|
||||||
lua-language-server
|
|
||||||
stylua
|
|
||||||
# Haskell
|
|
||||||
haskell-language-server
|
|
||||||
ghc
|
|
||||||
stack
|
|
||||||
cabal-install
|
|
||||||
haskellPackages.fourmolu
|
|
||||||
# Lean
|
|
||||||
lean
|
|
||||||
# Python
|
|
||||||
ruff
|
|
||||||
pyright
|
|
||||||
isort
|
|
||||||
python311Packages.autopep8
|
|
||||||
# LaTeX
|
|
||||||
texlab
|
|
||||||
xdotool
|
|
||||||
pplatex
|
|
||||||
neovim-remote
|
|
||||||
# Nix
|
|
||||||
nixd
|
|
||||||
nixfmt-rfc-style
|
|
||||||
# Rust
|
|
||||||
rust-analyzer
|
|
||||||
# Bash
|
|
||||||
nodePackages.bash-language-server
|
|
||||||
shellcheck
|
|
||||||
shellharden
|
|
||||||
# sh
|
|
||||||
shfmt
|
|
||||||
# Scheme
|
|
||||||
chez
|
|
||||||
nerd-fonts.jetbrains-mono
|
|
||||||
texliveFull
|
|
||||||
clang-tools
|
|
||||||
];
|
|
||||||
|
|
||||||
extraLuaConfig = mkLuaConfig ./init.lua {
|
|
||||||
path = "${pkgs.vimUtils.packDir
|
|
||||||
config.programs.neovim.finalPackage.passthru.packpathDirs}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.configFile."nvim/lua" = {
|
|
||||||
recursive = true;
|
|
||||||
source = ./lua;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
vim.g.mapleader = " "
|
|
||||||
require("lazy").setup({
|
|
||||||
spec = {
|
|
||||||
-- Import plugins from lua/plugins
|
|
||||||
{ import = "plugins" },
|
|
||||||
},
|
|
||||||
performance = {
|
|
||||||
reset_packpath = false,
|
|
||||||
rtp = {
|
|
||||||
reset = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
dev = {
|
|
||||||
path = "@path@/pack/myNeovimPackages/start",
|
|
||||||
patterns = {
|
|
||||||
"folke",
|
|
||||||
"catppuccin",
|
|
||||||
"geodimm",
|
|
||||||
"Julian",
|
|
||||||
"hrsh7th",
|
|
||||||
"neovim",
|
|
||||||
"rafamadriz",
|
|
||||||
"saadparwaiz1",
|
|
||||||
"L3MON4D3",
|
|
||||||
"onsails",
|
|
||||||
"nvim-lua",
|
|
||||||
"Olical",
|
|
||||||
"PaterJason",
|
|
||||||
"iamcco",
|
|
||||||
"nvim-treesitter",
|
|
||||||
"HiPhish",
|
|
||||||
"lervag",
|
|
||||||
"windwp",
|
|
||||||
"kylechui",
|
|
||||||
"numToStr",
|
|
||||||
"JoosepAlviste",
|
|
||||||
"stevearc",
|
|
||||||
"nvim-tree",
|
|
||||||
"tpope",
|
|
||||||
"karb94",
|
|
||||||
"akinsho",
|
|
||||||
"nvim-lualine",
|
|
||||||
"arkav",
|
|
||||||
"nvimdev",
|
|
||||||
"ggandor",
|
|
||||||
"Bekaboo",
|
|
||||||
"nvim-telescope",
|
|
||||||
"aserowy",
|
|
||||||
"3rd",
|
|
||||||
"epwalsh",
|
|
||||||
"preservim",
|
|
||||||
"elkowar",
|
|
||||||
"dynamotn",
|
|
||||||
"LhKipp",
|
|
||||||
"Fanael",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
install = {
|
|
||||||
-- Safeguard in case we forget to install a plugin with Nix
|
|
||||||
missing = false,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
require("config/options")
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
local opt = vim.opt
|
|
||||||
|
|
||||||
opt.clipboard = "unnamedplus"
|
|
||||||
opt.cursorline = true -- Enable highlighting of the current line
|
|
||||||
opt.expandtab = true -- Use spaces instead of tabs
|
|
||||||
opt.list = true -- Show some invisible characters (tabs...
|
|
||||||
opt.mouse = "a" -- Enable mouse mode
|
|
||||||
opt.number = true -- Print line number
|
|
||||||
opt.relativenumber = true -- Relative line numbers
|
|
||||||
opt.shiftround = true -- Round indent
|
|
||||||
opt.shiftwidth = 2 -- Size of an indent
|
|
||||||
opt.smartindent = true -- Insert indents automatically
|
|
||||||
opt.spelllang = { "en" }
|
|
||||||
opt.tabstop = 2 -- Number of spaces tabs count for
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"catppuccin/nvim",
|
|
||||||
name = "catppuccin-nvim",
|
|
||||||
priority = 1000,
|
|
||||||
config = function()
|
|
||||||
require("catppuccin").setup()
|
|
||||||
vim.cmd.colorscheme("catppuccin-mocha")
|
|
||||||
end,
|
|
||||||
opts = {
|
|
||||||
flavor = "mocha",
|
|
||||||
integrations = {
|
|
||||||
nvimtree = true,
|
|
||||||
dashboard = true,
|
|
||||||
which_key = true,
|
|
||||||
cmp = true,
|
|
||||||
markdown = true,
|
|
||||||
leap = true,
|
|
||||||
telescope = {
|
|
||||||
enabled = true,
|
|
||||||
},
|
|
||||||
treesitter = true,
|
|
||||||
rainbow_delimiters = true,
|
|
||||||
dropbar = {
|
|
||||||
enabled = false,
|
|
||||||
color_mode = false, -- enable color for kind's texts, not just kind's icons
|
|
||||||
},
|
|
||||||
native_lsp = {
|
|
||||||
enabled = true,
|
|
||||||
virtual_text = {
|
|
||||||
errors = { "italic" },
|
|
||||||
hints = { "italic" },
|
|
||||||
warnings = { "italic" },
|
|
||||||
information = { "italic" },
|
|
||||||
},
|
|
||||||
underlines = {
|
|
||||||
errors = { "underline" },
|
|
||||||
hints = { "underline" },
|
|
||||||
warnings = { "underline" },
|
|
||||||
information = { "underline" },
|
|
||||||
},
|
|
||||||
inlay_hints = {
|
|
||||||
background = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"stevearc/conform.nvim",
|
|
||||||
event = { "BufWritePre" },
|
|
||||||
cmd = "ConformInfo",
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>cF",
|
|
||||||
function()
|
|
||||||
require("conform").format({ formatters = { "injected" } })
|
|
||||||
end,
|
|
||||||
mode = { "n", "v" },
|
|
||||||
desc = "Format Injected Langs",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("conform").setup({
|
|
||||||
format_on_save = {
|
|
||||||
-- These options will be passed to conform.format()
|
|
||||||
timeout_ms = 500,
|
|
||||||
lsp_fallback = true,
|
|
||||||
},
|
|
||||||
formatters_by_ft = {
|
|
||||||
lua = { "stylua" },
|
|
||||||
python = { "isort", "autopep8" },
|
|
||||||
haskell = { "fourmolu" },
|
|
||||||
bash = { "shellcheck", "shellharden" },
|
|
||||||
sh = { "shfmt" },
|
|
||||||
markdown = { "prettierd" },
|
|
||||||
json = { "prettierd" },
|
|
||||||
yaml = { "prettierd" },
|
|
||||||
nix = { "nixfmt-rfc-style" },
|
|
||||||
tex = { "latexindent" },
|
|
||||||
c = { "clang_format" },
|
|
||||||
cpp = { "clang_format" },
|
|
||||||
-- ["*"] = { "codespell" },
|
|
||||||
["_"] = { "trim_whitespace" },
|
|
||||||
},
|
|
||||||
formatters = {
|
|
||||||
stylua = {
|
|
||||||
inherit = true,
|
|
||||||
prepend_args = { "--indent-type", "Spaces", "--indent-width", "2" },
|
|
||||||
},
|
|
||||||
codespell = {
|
|
||||||
inherit = true,
|
|
||||||
prepend_args = { "-L", "launch" },
|
|
||||||
},
|
|
||||||
latexindent = {
|
|
||||||
inherit = true,
|
|
||||||
prepend_args = { "-y=\"defaultIndent:' '\"" },
|
|
||||||
},
|
|
||||||
clang_format = {
|
|
||||||
prepend_args = {
|
|
||||||
"--fallback-style=LLVM",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"Olical/conjure",
|
|
||||||
ft = { "lua", "python", "scheme" },
|
|
||||||
dependencies = {
|
|
||||||
{
|
|
||||||
"PaterJason/cmp-conjure",
|
|
||||||
config = function()
|
|
||||||
local cmp = require("cmp")
|
|
||||||
local config = cmp.get_config()
|
|
||||||
table.insert(config.sources, {
|
|
||||||
name = "buffer",
|
|
||||||
option = {
|
|
||||||
sources = {
|
|
||||||
{ name = "conjure" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
cmp.setup(config)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("conjure.main").main()
|
|
||||||
require("conjure.mapping")["on-filetype"]()
|
|
||||||
vim.g["conjure#debug"] = false
|
|
||||||
vim.g["conjure#client#scheme#stdio#command"] = "scheme"
|
|
||||||
vim.g["conjure#client#scheme#stdio#prompt_pattern"] = "> $?"
|
|
||||||
vim.g["conjure#mapping#prefix"] = "<leader>,"
|
|
||||||
vim.g["conjure#extract#tree_sitter#enabled"] = true
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"Bekaboo/dropbar.nvim",
|
|
||||||
-- optional, but required for fuzzy finder support
|
|
||||||
dependencies = {
|
|
||||||
"nvim-telescope/telescope-fzf-native.nvim",
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
vim.keymap.set("n", "<leader>bs", function()
|
|
||||||
require("dropbar.api").pick(vim.v.count ~= 0 and vim.v.count)
|
|
||||||
end)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
'mrccjkb/haskell-tools.nvim',
|
|
||||||
version = '^3',
|
|
||||||
lazy = false,
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
return {
|
|
||||||
"Julian/lean.nvim",
|
|
||||||
event = { "BufReadPre *.lean", "BufNewFile *.lean" },
|
|
||||||
|
|
||||||
dependencies = {
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
-- you also will likely want nvim-cmp or some completion engine
|
|
||||||
},
|
|
||||||
|
|
||||||
-- see details below for full configuration options
|
|
||||||
opts = {
|
|
||||||
lsp = {
|
|
||||||
on_attach = on_attach,
|
|
||||||
},
|
|
||||||
mappings = true,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"ggandor/leap.nvim",
|
|
||||||
config = function()
|
|
||||||
local leap = require("leap")
|
|
||||||
|
|
||||||
leap.opts.special_keys.prev_target = "<bs>"
|
|
||||||
leap.opts.special_keys.prev_group = "<bs>"
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"nvim-lualine/lualine.nvim",
|
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons", "arkav/lualine-lsp-progress" },
|
|
||||||
config = function()
|
|
||||||
require("lualine").setup({
|
|
||||||
options = {
|
|
||||||
theme = "catppuccin",
|
|
||||||
},
|
|
||||||
sections = {
|
|
||||||
lualine_c = {
|
|
||||||
"lsp_progress",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"iamcco/markdown-preview.nvim",
|
|
||||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
|
||||||
ft = { "markdown" },
|
|
||||||
config = function()
|
|
||||||
vim.g.mkdp_theme = "dark"
|
|
||||||
vim.g.mkdp_echo_preview_url = 1
|
|
||||||
vim.g.mkdp_browser = "luakit"
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"karb94/neoscroll.nvim",
|
|
||||||
config = function()
|
|
||||||
require("neoscroll").setup({
|
|
||||||
-- All these keys will be mapped to their corresponding default scrolling animation
|
|
||||||
mappings = { "<C-u>", "<C-d>", "<C-b>", "<C-f>", "<C-y>", "<C-e>", "zt", "zz", "zb" },
|
|
||||||
hide_cursor = true, -- Hide cursor while scrolling
|
|
||||||
stop_eof = true, -- Stop at <EOF> when scrolling downwards
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"windwp/nvim-autopairs",
|
|
||||||
event = { "InsertEnter" },
|
|
||||||
dependencies = {
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
-- import nvim-autopairs
|
|
||||||
local autopairs = require("nvim-autopairs")
|
|
||||||
|
|
||||||
-- configure autopairs
|
|
||||||
autopairs.setup({
|
|
||||||
check_ts = true, -- enable treesitter
|
|
||||||
})
|
|
||||||
|
|
||||||
-- import nvim-autopairs completion functionality
|
|
||||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
|
||||||
|
|
||||||
-- import nvim-cmp plugin (completions plugin)
|
|
||||||
local cmp = require("cmp")
|
|
||||||
|
|
||||||
-- make autopairs and completion work together
|
|
||||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
return {
|
|
||||||
-- auto completion
|
|
||||||
{
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
event = "InsertEnter",
|
|
||||||
dependencies = {
|
|
||||||
"hrsh7th/cmp-buffer", -- source for text in buffer
|
|
||||||
"hrsh7th/cmp-path", -- source for file system paths
|
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
|
||||||
"L3MON4D3/LuaSnip", -- snippet engine
|
|
||||||
"saadparwaiz1/cmp_luasnip", -- for autocompletion
|
|
||||||
"rafamadriz/friendly-snippets", -- useful snippets
|
|
||||||
"onsails/lspkind.nvim", -- vs-code like pictograms
|
|
||||||
"PaterJason/cmp-conjure", -- nvim-cmp source for conjure.
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
local cmp = require("cmp")
|
|
||||||
local luasnip = require("luasnip")
|
|
||||||
local lspkind = require("lspkind")
|
|
||||||
|
|
||||||
-- loads vscode style snippets from installed plugins (e.g. friendly-snippets)
|
|
||||||
require("luasnip.loaders.from_vscode").lazy_load()
|
|
||||||
|
|
||||||
cmp.setup({
|
|
||||||
completion = {
|
|
||||||
completeopt = "menu,menuone,noinsert",
|
|
||||||
},
|
|
||||||
mapping = cmp.mapping.preset.insert({
|
|
||||||
["<C-u>"] = cmp.mapping.scroll_docs(-4), -- Up
|
|
||||||
["<C-d>"] = cmp.mapping.scroll_docs(4), -- Down
|
|
||||||
["<C-Space>"] = cmp.mapping.complete(), -- show completion suggestions
|
|
||||||
["<C-e>"] = cmp.mapping.abort(), -- close completion window
|
|
||||||
["<CR>"] = cmp.mapping.confirm({ select = false }),
|
|
||||||
["<Tab>"] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_next_item()
|
|
||||||
elseif luasnip.expand_or_jumpable() then
|
|
||||||
luasnip.expand_or_jump()
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, { "i", "s" }),
|
|
||||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_prev_item()
|
|
||||||
elseif luasnip.jumpable(-1) then
|
|
||||||
luasnip.jump(-1)
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, { "i", "s" }),
|
|
||||||
}),
|
|
||||||
-- sources for autocompletion
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = "nvim_lsp" },
|
|
||||||
{ name = "luasnip" },
|
|
||||||
{ name = "path" },
|
|
||||||
{ name = "buffer" },
|
|
||||||
{ name = "conjure" },
|
|
||||||
}),
|
|
||||||
snippet = {
|
|
||||||
expand = function(args)
|
|
||||||
luasnip.lsp_expand(args.body)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
-- configure lspkind for vs-code like pictograms in completion menu
|
|
||||||
formatting = {
|
|
||||||
format = lspkind.cmp_format({
|
|
||||||
maxwidth = 50,
|
|
||||||
ellipsis_char = "...",
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,107 +0,0 @@
|
|||||||
return {
|
|
||||||
-- lspconfig
|
|
||||||
{
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
|
||||||
dependencies = {
|
|
||||||
{ "folke/neoconf.nvim", dependencies = { "nvim-lspconfig" } },
|
|
||||||
{ "folke/neodev.nvim", opts = {} },
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
local lspconfig = require("lspconfig")
|
|
||||||
local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
|
||||||
local keymap = vim.keymap
|
|
||||||
|
|
||||||
local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
|
|
||||||
for type, icon in pairs(signs) do
|
|
||||||
local hl = "DiagnosticSign" .. type
|
|
||||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
|
|
||||||
end
|
|
||||||
|
|
||||||
local opts = { noremap = true, silent = true }
|
|
||||||
local on_attach = function(client, bufnr)
|
|
||||||
opts.buffer = bufnr
|
|
||||||
|
|
||||||
-- set keybinds
|
|
||||||
opts.desc = "Show LSP references"
|
|
||||||
keymap.set("n", "gR", "<cmd>Telescope lsp_references<CR>", opts) -- show definition, references
|
|
||||||
|
|
||||||
opts.desc = "Go to declaration"
|
|
||||||
keymap.set("n", "gD", vim.lsp.buf.declaration, opts) -- go to declaration
|
|
||||||
|
|
||||||
opts.desc = "Show LSP definitions"
|
|
||||||
keymap.set("n", "gd", "<cmd>Telescope lsp_definitions<CR>", opts) -- show lsp definitions
|
|
||||||
|
|
||||||
opts.desc = "Show LSP implementations"
|
|
||||||
keymap.set("n", "gi", "<cmd>Telescope lsp_implementations<CR>", opts) -- show lsp implementations
|
|
||||||
|
|
||||||
opts.desc = "Show LSP type definitions"
|
|
||||||
keymap.set("n", "gt", "<cmd>Telescope lsp_type_definitions<CR>", opts) -- show lsp type definitions
|
|
||||||
|
|
||||||
opts.desc = "See available code actions"
|
|
||||||
keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, opts) -- see available code actions, in visual mode will apply to selection
|
|
||||||
|
|
||||||
opts.desc = "Smart rename"
|
|
||||||
keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts) -- smart rename
|
|
||||||
|
|
||||||
opts.desc = "Show buffer diagnostics"
|
|
||||||
keymap.set("n", "<leader>D", "<cmd>Telescope diagnostics bufnr=0<CR>", opts) -- show diagnostics for file
|
|
||||||
|
|
||||||
opts.desc = "Show line diagnostics"
|
|
||||||
keymap.set("n", "<leader>d", vim.diagnostic.open_float, opts) -- show diagnostics for line
|
|
||||||
|
|
||||||
opts.desc = "Go to previous diagnostic"
|
|
||||||
keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) -- jump to previous diagnostic in buffer
|
|
||||||
|
|
||||||
opts.desc = "Go to next diagnostic"
|
|
||||||
keymap.set("n", "]d", vim.diagnostic.goto_next, opts) -- jump to next diagnostic in buffer
|
|
||||||
|
|
||||||
opts.desc = "Show documentation for what is under cursor"
|
|
||||||
keymap.set("n", "K", vim.lsp.buf.hover, opts) -- show documentation for what is under cursor
|
|
||||||
|
|
||||||
opts.desc = "Restart LSP"
|
|
||||||
keymap.set("n", "<leader>rs", ":LspRestart<CR>", opts) -- mapping to restart lsp if necessary
|
|
||||||
end
|
|
||||||
|
|
||||||
local capabilities = cmp_nvim_lsp.default_capabilities()
|
|
||||||
|
|
||||||
lspconfig["lua_ls"].setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
|
||||||
})
|
|
||||||
lspconfig["hls"].setup({
|
|
||||||
filetypes = { "haskell", "lhaskell", "cabal" },
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
|
||||||
})
|
|
||||||
lspconfig["leanls"].setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
|
||||||
})
|
|
||||||
lspconfig["bashls"].setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
|
||||||
})
|
|
||||||
lspconfig["pyright"].setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
|
||||||
})
|
|
||||||
lspconfig["ruff"].setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
|
||||||
})
|
|
||||||
lspconfig["texlab"].setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
|
||||||
})
|
|
||||||
lspconfig["nixd"].setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
|
||||||
})
|
|
||||||
lspconfig["rust_analyzer"].setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"kylechui/nvim-surround",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function()
|
|
||||||
require("nvim-surround").setup({})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"nvim-tree/nvim-tree.lua",
|
|
||||||
lazy = false,
|
|
||||||
keys = {
|
|
||||||
{ "<leader>ft", "<CMD>NvimTreeToggle<CR>", desc = "Nvim Tree" },
|
|
||||||
},
|
|
||||||
dependencies = {
|
|
||||||
"nvim-tree/nvim-web-devicons",
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("nvim-tree").setup({
|
|
||||||
hijack_netrw = false,
|
|
||||||
hijack_unnamed_buffer_when_opening = false,
|
|
||||||
hijack_directories = {
|
|
||||||
enable = false,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
build = ":TSUpdate",
|
|
||||||
config = function()
|
|
||||||
local treesitter = require("nvim-treesitter.configs")
|
|
||||||
|
|
||||||
treesitter.setup({
|
|
||||||
highlight = {
|
|
||||||
enable = true,
|
|
||||||
disable = { "latex" },
|
|
||||||
additional_vim_regex_highlighting = { "latex", "markdown" },
|
|
||||||
},
|
|
||||||
indent = { enable = true },
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
dependencies = {
|
|
||||||
"HiPhish/rainbow-delimiters",
|
|
||||||
name = "rainbow-delimiters.nvim",
|
|
||||||
config = function()
|
|
||||||
-- This module contains a number of default definitions
|
|
||||||
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",
|
|
||||||
},
|
|
||||||
priority = {
|
|
||||||
[""] = 110,
|
|
||||||
lua = 210,
|
|
||||||
},
|
|
||||||
highlight = {
|
|
||||||
"RainbowDelimiterRed",
|
|
||||||
"RainbowDelimiterYellow",
|
|
||||||
"RainbowDelimiterBlue",
|
|
||||||
"RainbowDelimiterOrange",
|
|
||||||
"RainbowDelimiterGreen",
|
|
||||||
"RainbowDelimiterViolet",
|
|
||||||
"RainbowDelimiterCyan",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
|
||||||
dependencies = {
|
|
||||||
{
|
|
||||||
"numToStr/Comment.nvim",
|
|
||||||
name = "comment.nvim",
|
|
||||||
lazy = false,
|
|
||||||
config = function()
|
|
||||||
require("Comment").setup({
|
|
||||||
pre_hook = function()
|
|
||||||
return vim.bo.commentstring
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"stevearc/oil.nvim",
|
|
||||||
opts = {},
|
|
||||||
lazy = false,
|
|
||||||
config = function()
|
|
||||||
require("oil").setup({
|
|
||||||
default_file_explorer = true,
|
|
||||||
delete_to_trash = true,
|
|
||||||
experimental_watch_for_changes = true,
|
|
||||||
use_default_keymaps = true,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
keys = {
|
|
||||||
{ "-", "<CMD>Oil<CR>", desc = "Open parent directory" },
|
|
||||||
},
|
|
||||||
-- Optional dependencies
|
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
return {
|
|
||||||
{ "nvim-lua/plenary.nvim" },
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"nvim-telescope/telescope-fzf-native.nvim",
|
|
||||||
config = function()
|
|
||||||
require("telescope").setup({})
|
|
||||||
-- To get fzf loaded and working with telescope, you need to call
|
|
||||||
-- load_extension, somewhere after setup function:
|
|
||||||
require("telescope").load_extension("fzf")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"nvim-telescope/telescope.nvim",
|
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
|
||||||
config = function()
|
|
||||||
require("telescope").setup({})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"lervag/vimtex",
|
|
||||||
lazy = false, -- lazy-loading will disable inverse search
|
|
||||||
config = function()
|
|
||||||
vim.api.nvim_create_autocmd({ "FileType" }, {
|
|
||||||
group = vim.api.nvim_create_augroup("lazyvim_vimtex_conceal", { clear = true }),
|
|
||||||
pattern = { "bib", "tex" },
|
|
||||||
callback = function()
|
|
||||||
vim.wo.conceallevel = 2
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.g.vimtex_compiler_latexmk = {
|
|
||||||
options = {
|
|
||||||
"-verbose",
|
|
||||||
"-file-line-error",
|
|
||||||
"-synctex=1",
|
|
||||||
"-interaction=nonstopmode",
|
|
||||||
"-shell-escape",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
vim.g.vimtex_mappings_disable = { ["n"] = { "K" } } -- disable `K` as it conflicts with LSP hover
|
|
||||||
vim.g.vimtex_quickfix_method = "pplatex"
|
|
||||||
vim.g.vimtex_view_method = "zathura"
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"folke/which-key.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
init = function()
|
|
||||||
vim.o.timeout = true
|
|
||||||
vim.o.timeoutlen = 300
|
|
||||||
end,
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -30,9 +30,9 @@
|
|||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
texliveFull
|
texliveFull
|
||||||
texlivePackages.standalone
|
texlivePackages.standalone
|
||||||
|
texlivePackages.relsize # needed for BA
|
||||||
# papis-nvim
|
# papis-nvim
|
||||||
]
|
];
|
||||||
;
|
|
||||||
extraConfigVim = ''
|
extraConfigVim = ''
|
||||||
filetype plugin on
|
filetype plugin on
|
||||||
set nocompatible
|
set nocompatible
|
||||||
|
|||||||
Reference in New Issue
Block a user