mirror of
https://github.com/isabelroses/nvim.git
synced 2025-04-09 13:29:34 +00:00
refactor: diy my wrapper
This commit is contained in:
parent
c800282e40
commit
1ff33293c2
47 changed files with 1741 additions and 1893 deletions
132
_sources/generated.json
generated
132
_sources/generated.json
generated
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"alpha-nvim": {
|
||||
"alpha": {
|
||||
"cargoLocks": null,
|
||||
"date": "2024-09-30",
|
||||
"extract": null,
|
||||
"name": "alpha-nvim",
|
||||
"name": "alpha",
|
||||
"passthru": null,
|
||||
"pinned": false,
|
||||
"src": {
|
||||
|
@ -59,6 +59,26 @@
|
|||
},
|
||||
"version": "648aca6d33ec011dc3166e7af3b38820d01a71e4"
|
||||
},
|
||||
"cmp": {
|
||||
"cargoLocks": null,
|
||||
"date": "2024-08-01",
|
||||
"extract": null,
|
||||
"name": "cmp",
|
||||
"passthru": null,
|
||||
"pinned": false,
|
||||
"src": {
|
||||
"deepClone": false,
|
||||
"fetchSubmodules": false,
|
||||
"leaveDotGit": false,
|
||||
"name": null,
|
||||
"owner": "hrsh7th",
|
||||
"repo": "nvim-cmp",
|
||||
"rev": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30",
|
||||
"sha256": "sha256-NcodgUp8obTsjgc+5j2dKr0f3FelYikQTJngfZXRZzo=",
|
||||
"type": "github"
|
||||
},
|
||||
"version": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30"
|
||||
},
|
||||
"cmp-buffer": {
|
||||
"cargoLocks": null,
|
||||
"date": "2022-08-10",
|
||||
|
@ -219,11 +239,11 @@
|
|||
},
|
||||
"version": "8bf8358ee326d5d8c11dcd7ac0bcc9ff97dbc785"
|
||||
},
|
||||
"direnv-nvim": {
|
||||
"direnv": {
|
||||
"cargoLocks": null,
|
||||
"date": "2024-07-08",
|
||||
"extract": null,
|
||||
"name": "direnv-nvim",
|
||||
"name": "direnv",
|
||||
"passthru": null,
|
||||
"pinned": false,
|
||||
"src": {
|
||||
|
@ -299,11 +319,11 @@
|
|||
},
|
||||
"version": "2f7c08f45639a64a5c0abcf67321d52c3f499ae6"
|
||||
},
|
||||
"freeze-nvim": {
|
||||
"freeze": {
|
||||
"cargoLocks": null,
|
||||
"date": "2024-09-06",
|
||||
"extract": null,
|
||||
"name": "freeze-nvim",
|
||||
"name": "freeze",
|
||||
"passthru": null,
|
||||
"pinned": false,
|
||||
"src": {
|
||||
|
@ -399,26 +419,6 @@
|
|||
},
|
||||
"version": "e7a4442e055ec953311e77791546238d1eaae507"
|
||||
},
|
||||
"lazy": {
|
||||
"cargoLocks": null,
|
||||
"date": "2024-10-02",
|
||||
"extract": null,
|
||||
"name": "lazy",
|
||||
"passthru": null,
|
||||
"pinned": false,
|
||||
"src": {
|
||||
"deepClone": false,
|
||||
"fetchSubmodules": false,
|
||||
"leaveDotGit": false,
|
||||
"name": null,
|
||||
"owner": "folke",
|
||||
"repo": "lazy.nvim",
|
||||
"rev": "1159bdccd8910a0fd0914b24d6c3d186689023d9",
|
||||
"sha256": "sha256-WI241RduX495zN/H1vltxNYC88TiDIJSFwZ5UmA+weU=",
|
||||
"type": "github"
|
||||
},
|
||||
"version": "1159bdccd8910a0fd0914b24d6c3d186689023d9"
|
||||
},
|
||||
"lazydev": {
|
||||
"cargoLocks": null,
|
||||
"date": "2024-07-25",
|
||||
|
@ -539,6 +539,26 @@
|
|||
},
|
||||
"version": "e808bee352d1a6fcf902ca1a71cee76e60e24071"
|
||||
},
|
||||
"lz-n": {
|
||||
"cargoLocks": null,
|
||||
"date": "2024-10-13",
|
||||
"extract": null,
|
||||
"name": "lz-n",
|
||||
"passthru": null,
|
||||
"pinned": false,
|
||||
"src": {
|
||||
"deepClone": false,
|
||||
"fetchSubmodules": false,
|
||||
"leaveDotGit": false,
|
||||
"name": null,
|
||||
"owner": "nvim-neorocks",
|
||||
"repo": "lz.n",
|
||||
"rev": "de27f80d43c6e9283d3e5b23d0c42f4fd095b116",
|
||||
"sha256": "sha256-pgbh30eJxVlnxSJdIWp7uaCD9+HYGWJAXeCp9V+ZzWk=",
|
||||
"type": "github"
|
||||
},
|
||||
"version": "de27f80d43c6e9283d3e5b23d0c42f4fd095b116"
|
||||
},
|
||||
"markview": {
|
||||
"cargoLocks": null,
|
||||
"date": "2024-10-09",
|
||||
|
@ -579,26 +599,6 @@
|
|||
},
|
||||
"version": "e1ac1ce5c7499aa4cc2ca9fb1adec9e730dd9394"
|
||||
},
|
||||
"neocord": {
|
||||
"cargoLocks": null,
|
||||
"date": "2024-04-24",
|
||||
"extract": null,
|
||||
"name": "neocord",
|
||||
"passthru": null,
|
||||
"pinned": false,
|
||||
"src": {
|
||||
"deepClone": false,
|
||||
"fetchSubmodules": false,
|
||||
"leaveDotGit": false,
|
||||
"name": null,
|
||||
"owner": "IogaMaster",
|
||||
"repo": "neocord",
|
||||
"rev": "aa7a58023166533da83ca7b11c0d2569e45d7381",
|
||||
"sha256": "sha256-oVWdnQlgXIMzMiybMq7yR/WfEW+Fm5RmhWx0RWprlfQ=",
|
||||
"type": "github"
|
||||
},
|
||||
"version": "aa7a58023166533da83ca7b11c0d2569e45d7381"
|
||||
},
|
||||
"neovim-session-manager": {
|
||||
"cargoLocks": null,
|
||||
"date": "2024-10-09",
|
||||
|
@ -639,31 +639,11 @@
|
|||
},
|
||||
"version": "0e0a940477cc08fa7b1799384a1d668058ed4e61"
|
||||
},
|
||||
"nvim-cmp": {
|
||||
"cargoLocks": null,
|
||||
"date": "2024-08-01",
|
||||
"extract": null,
|
||||
"name": "nvim-cmp",
|
||||
"passthru": null,
|
||||
"pinned": false,
|
||||
"src": {
|
||||
"deepClone": false,
|
||||
"fetchSubmodules": false,
|
||||
"leaveDotGit": false,
|
||||
"name": null,
|
||||
"owner": "hrsh7th",
|
||||
"repo": "nvim-cmp",
|
||||
"rev": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30",
|
||||
"sha256": "sha256-NcodgUp8obTsjgc+5j2dKr0f3FelYikQTJngfZXRZzo=",
|
||||
"type": "github"
|
||||
},
|
||||
"version": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30"
|
||||
},
|
||||
"nvim-colorizer-lua": {
|
||||
"nvim-colorizer": {
|
||||
"cargoLocks": null,
|
||||
"date": "2024-09-11",
|
||||
"extract": null,
|
||||
"name": "nvim-colorizer-lua",
|
||||
"name": "nvim-colorizer",
|
||||
"passthru": null,
|
||||
"pinned": false,
|
||||
"src": {
|
||||
|
@ -739,11 +719,11 @@
|
|||
},
|
||||
"version": "fbef5d32be8466dd76544a257d3f3dce20082a07"
|
||||
},
|
||||
"nvim-tree-lua": {
|
||||
"nvim-tree": {
|
||||
"cargoLocks": null,
|
||||
"date": "2024-10-08",
|
||||
"date": "2024-10-14",
|
||||
"extract": null,
|
||||
"name": "nvim-tree-lua",
|
||||
"name": "nvim-tree",
|
||||
"passthru": null,
|
||||
"pinned": false,
|
||||
"src": {
|
||||
|
@ -753,11 +733,11 @@
|
|||
"name": null,
|
||||
"owner": "nvim-tree",
|
||||
"repo": "nvim-tree.lua",
|
||||
"rev": "50e919426a4a2053f78b2f8ab001c8ad8eb47ef6",
|
||||
"sha256": "sha256-mlk6dskse0LT8NZ7JFDZpQtXM3XaUydzmh9SGt7fnWQ=",
|
||||
"rev": "f5f67892996b280ae78b1b0a2d07c4fa29ae0905",
|
||||
"sha256": "sha256-iYVsOpvKQpPSwVMVRqmKkfsjqU9lsBWWEVkqjT1pH18=",
|
||||
"type": "github"
|
||||
},
|
||||
"version": "50e919426a4a2053f78b2f8ab001c8ad8eb47ef6"
|
||||
"version": "f5f67892996b280ae78b1b0a2d07c4fa29ae0905"
|
||||
},
|
||||
"nvim-treesitter": {
|
||||
"cargoLocks": null,
|
||||
|
@ -1059,11 +1039,11 @@
|
|||
},
|
||||
"version": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0"
|
||||
},
|
||||
"toggleterm-nvim": {
|
||||
"toggleterm": {
|
||||
"cargoLocks": null,
|
||||
"date": "2024-08-08",
|
||||
"extract": null,
|
||||
"name": "toggleterm-nvim",
|
||||
"name": "toggleterm",
|
||||
"passthru": null,
|
||||
"pinned": false,
|
||||
"src": {
|
||||
|
|
92
_sources/generated.nix
generated
92
_sources/generated.nix
generated
|
@ -1,8 +1,8 @@
|
|||
# This file was generated by nvfetcher, please do not modify it manually.
|
||||
{ fetchgit, fetchurl, fetchFromGitHub, dockerTools }:
|
||||
{
|
||||
alpha-nvim = {
|
||||
pname = "alpha-nvim";
|
||||
alpha = {
|
||||
pname = "alpha";
|
||||
version = "bf3c8bb8c02ed3d9644cc5bbc48e2bdc39349cd7";
|
||||
src = fetchFromGitHub {
|
||||
owner = "goolord";
|
||||
|
@ -37,6 +37,18 @@
|
|||
};
|
||||
date = "2024-06-12";
|
||||
};
|
||||
cmp = {
|
||||
pname = "cmp";
|
||||
version = "ae644feb7b67bf1ce4260c231d1d4300b19c6f30";
|
||||
src = fetchFromGitHub {
|
||||
owner = "hrsh7th";
|
||||
repo = "nvim-cmp";
|
||||
rev = "ae644feb7b67bf1ce4260c231d1d4300b19c6f30";
|
||||
fetchSubmodules = false;
|
||||
sha256 = "sha256-NcodgUp8obTsjgc+5j2dKr0f3FelYikQTJngfZXRZzo=";
|
||||
};
|
||||
date = "2024-08-01";
|
||||
};
|
||||
cmp-buffer = {
|
||||
pname = "cmp-buffer";
|
||||
version = "3022dbc9166796b644a841a02de8dd1cc1d311fa";
|
||||
|
@ -133,8 +145,8 @@
|
|||
};
|
||||
date = "2024-09-26";
|
||||
};
|
||||
direnv-nvim = {
|
||||
pname = "direnv-nvim";
|
||||
direnv = {
|
||||
pname = "direnv";
|
||||
version = "3e38d855c764bb1bec230130ed0e026fca54e4c8";
|
||||
src = fetchFromGitHub {
|
||||
owner = "NotAShelf";
|
||||
|
@ -181,8 +193,8 @@
|
|||
};
|
||||
date = "2023-11-09";
|
||||
};
|
||||
freeze-nvim = {
|
||||
pname = "freeze-nvim";
|
||||
freeze = {
|
||||
pname = "freeze";
|
||||
version = "cc8f09454b0ab1904d493f36f39d38528d7fc085";
|
||||
src = fetchFromGitHub {
|
||||
owner = "charm-community";
|
||||
|
@ -241,18 +253,6 @@
|
|||
};
|
||||
date = "2024-10-07";
|
||||
};
|
||||
lazy = {
|
||||
pname = "lazy";
|
||||
version = "1159bdccd8910a0fd0914b24d6c3d186689023d9";
|
||||
src = fetchFromGitHub {
|
||||
owner = "folke";
|
||||
repo = "lazy.nvim";
|
||||
rev = "1159bdccd8910a0fd0914b24d6c3d186689023d9";
|
||||
fetchSubmodules = false;
|
||||
sha256 = "sha256-WI241RduX495zN/H1vltxNYC88TiDIJSFwZ5UmA+weU=";
|
||||
};
|
||||
date = "2024-10-02";
|
||||
};
|
||||
lazydev = {
|
||||
pname = "lazydev";
|
||||
version = "491452cf1ca6f029e90ad0d0368848fac717c6d2";
|
||||
|
@ -325,6 +325,18 @@
|
|||
};
|
||||
date = "2024-09-12";
|
||||
};
|
||||
lz-n = {
|
||||
pname = "lz-n";
|
||||
version = "de27f80d43c6e9283d3e5b23d0c42f4fd095b116";
|
||||
src = fetchFromGitHub {
|
||||
owner = "nvim-neorocks";
|
||||
repo = "lz.n";
|
||||
rev = "de27f80d43c6e9283d3e5b23d0c42f4fd095b116";
|
||||
fetchSubmodules = false;
|
||||
sha256 = "sha256-pgbh30eJxVlnxSJdIWp7uaCD9+HYGWJAXeCp9V+ZzWk=";
|
||||
};
|
||||
date = "2024-10-13";
|
||||
};
|
||||
markview = {
|
||||
pname = "markview";
|
||||
version = "4ef3e11292fdd4191e02ab865de2738d5fbeeba9";
|
||||
|
@ -349,18 +361,6 @@
|
|||
};
|
||||
date = "2024-09-28";
|
||||
};
|
||||
neocord = {
|
||||
pname = "neocord";
|
||||
version = "aa7a58023166533da83ca7b11c0d2569e45d7381";
|
||||
src = fetchFromGitHub {
|
||||
owner = "IogaMaster";
|
||||
repo = "neocord";
|
||||
rev = "aa7a58023166533da83ca7b11c0d2569e45d7381";
|
||||
fetchSubmodules = false;
|
||||
sha256 = "sha256-oVWdnQlgXIMzMiybMq7yR/WfEW+Fm5RmhWx0RWprlfQ=";
|
||||
};
|
||||
date = "2024-04-24";
|
||||
};
|
||||
neovim-session-manager = {
|
||||
pname = "neovim-session-manager";
|
||||
version = "ce43f2eb2a52492157d7742e5f684b9a42bb3e5c";
|
||||
|
@ -385,20 +385,8 @@
|
|||
};
|
||||
date = "2024-10-01";
|
||||
};
|
||||
nvim-cmp = {
|
||||
pname = "nvim-cmp";
|
||||
version = "ae644feb7b67bf1ce4260c231d1d4300b19c6f30";
|
||||
src = fetchFromGitHub {
|
||||
owner = "hrsh7th";
|
||||
repo = "nvim-cmp";
|
||||
rev = "ae644feb7b67bf1ce4260c231d1d4300b19c6f30";
|
||||
fetchSubmodules = false;
|
||||
sha256 = "sha256-NcodgUp8obTsjgc+5j2dKr0f3FelYikQTJngfZXRZzo=";
|
||||
};
|
||||
date = "2024-08-01";
|
||||
};
|
||||
nvim-colorizer-lua = {
|
||||
pname = "nvim-colorizer-lua";
|
||||
nvim-colorizer = {
|
||||
pname = "nvim-colorizer";
|
||||
version = "0671e0eabc6842676d3310370e8fae4e1c51d7f9";
|
||||
src = fetchFromGitHub {
|
||||
owner = "nvchad";
|
||||
|
@ -445,17 +433,17 @@
|
|||
};
|
||||
date = "2024-09-22";
|
||||
};
|
||||
nvim-tree-lua = {
|
||||
pname = "nvim-tree-lua";
|
||||
version = "50e919426a4a2053f78b2f8ab001c8ad8eb47ef6";
|
||||
nvim-tree = {
|
||||
pname = "nvim-tree";
|
||||
version = "f5f67892996b280ae78b1b0a2d07c4fa29ae0905";
|
||||
src = fetchFromGitHub {
|
||||
owner = "nvim-tree";
|
||||
repo = "nvim-tree.lua";
|
||||
rev = "50e919426a4a2053f78b2f8ab001c8ad8eb47ef6";
|
||||
rev = "f5f67892996b280ae78b1b0a2d07c4fa29ae0905";
|
||||
fetchSubmodules = false;
|
||||
sha256 = "sha256-mlk6dskse0LT8NZ7JFDZpQtXM3XaUydzmh9SGt7fnWQ=";
|
||||
sha256 = "sha256-iYVsOpvKQpPSwVMVRqmKkfsjqU9lsBWWEVkqjT1pH18=";
|
||||
};
|
||||
date = "2024-10-08";
|
||||
date = "2024-10-14";
|
||||
};
|
||||
nvim-treesitter = {
|
||||
pname = "nvim-treesitter";
|
||||
|
@ -637,8 +625,8 @@
|
|||
};
|
||||
date = "2024-09-16";
|
||||
};
|
||||
toggleterm-nvim = {
|
||||
pname = "toggleterm-nvim";
|
||||
toggleterm = {
|
||||
pname = "toggleterm";
|
||||
version = "137d06fb103952a0fb567882bb8527e2f92d327d";
|
||||
src = fetchFromGitHub {
|
||||
owner = "akinsho";
|
||||
|
|
|
@ -3,6 +3,7 @@ vim.filetype.add({
|
|||
jq = "jq",
|
||||
tmpl = "gohtmltmpl",
|
||||
rasi = "scss",
|
||||
envrc = "bash",
|
||||
},
|
||||
pattern = {
|
||||
[".*/hypr/.*%.conf"] = "hyprlang",
|
|
@ -1,3 +1,7 @@
|
|||
-- set space as leader
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
|
||||
local map = function(mode, shortcut, command, opt)
|
||||
opt = opt or { noremap = true, silent = true }
|
||||
vim.keymap.set(mode, shortcut, command, opt)
|
|
@ -131,3 +131,10 @@ vim.opt.fillchars:append({
|
|||
|
||||
-- rust save
|
||||
vim.g.rustfmt_autosave = 1
|
||||
|
||||
-- disable remote plugin providers
|
||||
vim.g.loaded_node_provider = 0
|
||||
vim.g.loaded_perl_provider = 0
|
||||
vim.g.loaded_python_provider = 0
|
||||
vim.g.loaded_python3_provider = 0
|
||||
vim.g.loaded_ruby_provider = 0
|
12
config/lua/izvim/init.lua
Normal file
12
config/lua/izvim/init.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
require("izvim.config.autocmds")
|
||||
require("izvim.config.ft")
|
||||
require("izvim.config.keybinds")
|
||||
require("izvim.config.neovide")
|
||||
require("izvim.config.options")
|
||||
|
||||
vim.api.nvim_cmd({
|
||||
cmd = "packadd",
|
||||
args = { "lz-n" },
|
||||
}, {})
|
||||
|
||||
require("lz.n").load(require("izvim.plugins"))
|
101
config/lua/izvim/plugins/alpha.lua
Normal file
101
config/lua/izvim/plugins/alpha.lua
Normal file
|
@ -0,0 +1,101 @@
|
|||
require("session_manager").setup({
|
||||
autoload_mode = require("session_manager.config").AutoloadMode.CurrentDir,
|
||||
})
|
||||
|
||||
local function apply_gradient_hl(text)
|
||||
local lines = {}
|
||||
for i, line in ipairs(text) do
|
||||
local tbl = {
|
||||
type = "text",
|
||||
val = line,
|
||||
opts = {
|
||||
hl = "AlphaHeaderGradient" .. i,
|
||||
shrink_margin = false,
|
||||
position = "center",
|
||||
},
|
||||
}
|
||||
table.insert(lines, tbl)
|
||||
end
|
||||
|
||||
return {
|
||||
type = "group",
|
||||
val = lines,
|
||||
opts = { position = "center" },
|
||||
}
|
||||
end
|
||||
|
||||
local alpha = require("alpha")
|
||||
local dashboard = require("alpha.themes.dashboard")
|
||||
local theta = require("alpha.themes.theta")
|
||||
|
||||
local header = {
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢿⣿⣿⣿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠁⢸⣿⣿⣿⠀⠙⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⡿⠛⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠁⠀⠘⣿⣿⠇⠀⠀⡀⠈⠙⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣿⠀⠀⠈⠙⢿⣿⣿⣿⣿⣿⡿⠛⠒⢊⠁⢰⣿⠏⠀⠀⠀⠈⠁⢒⠂⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣇⠀⠀⠀⠀⢻⣿⣿⡿⠋⠀⠀⠘⠿⠇⣼⠏⠀⠀⠀⠀⠀⠘⠿⠃⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣿⣧⡀⠀⠀⠀⠹⣿⡁⠀⠀⠀⠀⠀⠀⠋⠀⠀⡀⠀⠀⠀⠀⠀⠀⠐⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣦⠀⠀⠙⠇⠀⠀⢠⣶⣤⡄⠀⠀⠀⠉⢶⢀⣰⠆⠀⠀⠀⢀⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⣸⢸⢺⢱⠀⠀⠀⠀⣸⠬⠵⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢿⣭⠀⠀⠀⠲⣻⡘⠘⠀⢦⠀⠀⠔⠁⠀⠀⣀⠤⠚⣱⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣌⠛⢷⣤⡀⠀⢘⣗⠀⠀⠀⠱⣤⣴⣖⠈⠹⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⠟⠋⠙⠻⣿⣿⣿⣿⣿⣷⣦⣬⠃⣴⣿⣽⣷⣄⣀⢀⣿⣿⡿⠷⣤⣤⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⠃⠀⠀⠀⠀⠘⢿⣿⣿⣿⣿⣿⡇⠀⢹⡿⠿⣍⡙⠛⠛⣻⠟⠻⠶⠦⣤⠞⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⠀⠀⠀⠀⠀⠀⠈⢻⣿⣿⣿⣿⣧⣀⠞⠀⠀⠉⠛⠛⠛⢿⠀⠀⠀⠀⠀⠀⢘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠹⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⡀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⡎⠀⠀⠀⢀⡀⠤⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⢨⠃⠀⠀⠀⠀⠀⠀⠀⠀⡸⠀⠀⡠⠒⠉⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⣠⠃⠀⠀⠀⠀⠀⠀⠀⠀⡰⢁⠔⠋⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⣼⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠞⠁⠀⠀⠀⠀⠀⠀⠀⢀⡆⠀⠀⠀⠀⠀⠹⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⡀⠀⠀⠀⠀⠀⢀⡰⠃⠀⠀⠀⠀⠀⠀⠀⣀⣴⣿⣿⡀⠀⠀⠀⠀⠀⢻⣿⣿⣿⣿⣿",
|
||||
}
|
||||
|
||||
local buttons = {
|
||||
type = "group",
|
||||
position = "center",
|
||||
val = {
|
||||
dashboard.button("n", " New file", ":ene <bar> startinsert <cr>"),
|
||||
dashboard.button("f", " Find file", ":Telescope find_files<cr>"),
|
||||
dashboard.button("g", " Live grep", ":Telescope live_grep<cr>"),
|
||||
dashboard.button("s", " Show sessions", ":SessionManager load_session<cr>"),
|
||||
dashboard.button("p", " Projects", ":Telescope project<CR>"),
|
||||
dashboard.button("q", " Quit", ":qa<CR>"),
|
||||
},
|
||||
}
|
||||
|
||||
local v = vim.version()
|
||||
local vStr = string.format("v%d.%d.%d", v.major, v.minor, v.patch)
|
||||
|
||||
local footer = {
|
||||
type = "group",
|
||||
position = "center",
|
||||
val = {
|
||||
{
|
||||
type = "text",
|
||||
val = "neovim " .. vStr,
|
||||
opts = { hl = "Comment", position = "center" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
if vim.g.neovide then
|
||||
table.insert(footer.val, 2, {
|
||||
type = "text",
|
||||
val = "neovide " .. vim.g.neovide_version,
|
||||
opts = { hl = "Comment", position = "center" },
|
||||
})
|
||||
end
|
||||
|
||||
theta.config.layout = {
|
||||
{ type = "padding", val = 4 },
|
||||
apply_gradient_hl(header),
|
||||
{ type = "padding", val = 1 },
|
||||
buttons,
|
||||
{ type = "padding", val = 1 },
|
||||
footer,
|
||||
}
|
||||
|
||||
alpha.setup(theta.config)
|
55
config/lua/izvim/plugins/catppuccin.lua
Normal file
55
config/lua/izvim/plugins/catppuccin.lua
Normal file
|
@ -0,0 +1,55 @@
|
|||
require("catppuccin").setup({
|
||||
flavour = "auto",
|
||||
background = {
|
||||
light = "latte",
|
||||
dark = "mocha",
|
||||
},
|
||||
transparent_background = true,
|
||||
styles = {
|
||||
comments = { "italic" },
|
||||
},
|
||||
integrations = {
|
||||
alpha = true,
|
||||
treesitter = true,
|
||||
treesitter_context = false,
|
||||
native_lsp = {
|
||||
enabled = true,
|
||||
virtual_text = {
|
||||
errors = { "italic" },
|
||||
hints = { "italic" },
|
||||
warnings = { "italic" },
|
||||
information = { "italic" },
|
||||
},
|
||||
underlines = {
|
||||
errors = { "undercurl" },
|
||||
hints = { "undercurl" },
|
||||
warnings = { "undercurl" },
|
||||
information = { "undercurl" },
|
||||
},
|
||||
},
|
||||
telescope = {
|
||||
enabled = true,
|
||||
},
|
||||
cmp = true,
|
||||
lsp_trouble = true,
|
||||
nvimtree = true,
|
||||
which_key = false,
|
||||
indent_blankline = {
|
||||
enabled = true,
|
||||
colored_indent_levels = true,
|
||||
},
|
||||
navic = {
|
||||
enabled = true,
|
||||
custom_bg = "NONE",
|
||||
},
|
||||
gitsigns = false,
|
||||
markdown = true,
|
||||
render_markdown = false,
|
||||
harpoon = true,
|
||||
symbols_outline = true,
|
||||
ts_rainbow = true,
|
||||
notify = true,
|
||||
},
|
||||
})
|
||||
|
||||
vim.cmd.colorscheme("catppuccin")
|
27
config/lua/izvim/plugins/cloak.lua
Normal file
27
config/lua/izvim/plugins/cloak.lua
Normal file
|
@ -0,0 +1,27 @@
|
|||
require("cloak").setup({
|
||||
enabled = true,
|
||||
cloak_character = "*",
|
||||
-- The applied highlight group (colors) on the cloaking, see `:h highlight`.
|
||||
highlight_group = "Comment",
|
||||
patterns = {
|
||||
{
|
||||
-- Match any file starting with ".env".
|
||||
-- This can be a table to match multiple file patterns.
|
||||
file_pattern = {
|
||||
".env",
|
||||
".env.local",
|
||||
".env.dev",
|
||||
".env.development",
|
||||
"wrangler.toml",
|
||||
".dev.vars",
|
||||
"secrets.yaml",
|
||||
"secrets.yml",
|
||||
"*.age",
|
||||
},
|
||||
-- Match an equals sign and any character after it.
|
||||
-- This can also be a table of patterns to cloak,
|
||||
-- example: cloak_pattern = { ":.+", "-.+" } for yaml files.
|
||||
cloak_pattern = { ":.+", "=.+" },
|
||||
},
|
||||
},
|
||||
})
|
42
config/lua/izvim/plugins/copilot.lua
Normal file
42
config/lua/izvim/plugins/copilot.lua
Normal file
|
@ -0,0 +1,42 @@
|
|||
require("copilot").setup({
|
||||
panel = {
|
||||
enabled = false,
|
||||
auto_refresh = false,
|
||||
keymap = {
|
||||
jump_prev = "[[",
|
||||
jump_next = "]]",
|
||||
accept = "<CR>",
|
||||
refresh = "gr",
|
||||
open = "<C-CR>",
|
||||
},
|
||||
layout = {
|
||||
position = "bottom",
|
||||
ratio = 0.4,
|
||||
},
|
||||
},
|
||||
suggestion = {
|
||||
enabled = true,
|
||||
auto_trigger = true,
|
||||
debounce = 75,
|
||||
keymap = {
|
||||
accept = "<C-a>",
|
||||
accept_word = false,
|
||||
accept_line = false,
|
||||
next = "<M-]>",
|
||||
prev = "<M-[>",
|
||||
dismiss = false,
|
||||
},
|
||||
},
|
||||
filetypes = {
|
||||
["*"] = true,
|
||||
help = false,
|
||||
gitcommit = false,
|
||||
gitrebase = false,
|
||||
hgcommit = false,
|
||||
svn = false,
|
||||
cvs = false,
|
||||
["."] = false,
|
||||
},
|
||||
copilot_node_command = "node",
|
||||
server_opts_overrides = {},
|
||||
})
|
15
config/lua/izvim/plugins/evergarden.lua
Normal file
15
config/lua/izvim/plugins/evergarden.lua
Normal file
|
@ -0,0 +1,15 @@
|
|||
require("evergarden").setup({
|
||||
transparent_background = true,
|
||||
contrast_dark = "medium", -- 'hard'|'medium'|'soft'
|
||||
override_terminal = true,
|
||||
style = {
|
||||
tabline = { reverse = true, color = "green" },
|
||||
search = { reverse = false, inc_reverse = true },
|
||||
types = { italic = true },
|
||||
keyword = { italic = true },
|
||||
comment = { italic = false },
|
||||
},
|
||||
overrides = {}, -- add custom overrides
|
||||
})
|
||||
|
||||
vim.cmd.colorscheme("evergarden")
|
11
config/lua/izvim/plugins/freeze.lua
Normal file
11
config/lua/izvim/plugins/freeze.lua
Normal file
|
@ -0,0 +1,11 @@
|
|||
vim.keymap.set("v", "<leader>sc", "<cmd>Freeze<cr>")
|
||||
|
||||
require("freeze").setup({
|
||||
output = function()
|
||||
return vim.fn.getcwd() .. "/" .. os.date("%Y-%m-%d") .. "_freeze.png"
|
||||
end,
|
||||
config = "user",
|
||||
font = {
|
||||
family = "JetBrains Mono",
|
||||
},
|
||||
})
|
16
config/lua/izvim/plugins/harpoon.lua
Normal file
16
config/lua/izvim/plugins/harpoon.lua
Normal file
|
@ -0,0 +1,16 @@
|
|||
local harpoon = require("harpoon")
|
||||
harpoon:setup()
|
||||
|
||||
vim.keymap.set("n", "<leader>d", function()
|
||||
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||
end)
|
||||
|
||||
vim.keymap.set("n", "<leader>a", function()
|
||||
harpoon:list():add()
|
||||
end)
|
||||
|
||||
for i = 0, 4 do
|
||||
vim.keymap.set("n", "<leader>" .. i, function()
|
||||
harpoon:list():select(i)
|
||||
end)
|
||||
end
|
347
config/lua/izvim/plugins/init.lua
Normal file
347
config/lua/izvim/plugins/init.lua
Normal file
|
@ -0,0 +1,347 @@
|
|||
local rq = function(plugin)
|
||||
return function()
|
||||
require("izvim.plugins." .. plugin)
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
-- tree view
|
||||
{
|
||||
"nvim-tree",
|
||||
after = function()
|
||||
require("nvim-tree").setup({
|
||||
sync_root_with_cwd = true,
|
||||
diagnostics = { enable = true },
|
||||
renderer = {
|
||||
indent_markers = { enable = true },
|
||||
icons = { web_devicons = { folder = { enable = true } } },
|
||||
},
|
||||
modified = { enable = true },
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- mini
|
||||
{
|
||||
"mini-surround",
|
||||
event = "InsertEnter",
|
||||
after = function()
|
||||
require("mini.surround").setup({
|
||||
mappings = {
|
||||
add = "S", -- Add surrounding in Normal and Visual modes
|
||||
delete = "ds", -- Delete surrounding
|
||||
find = "sf", -- Find surrounding (to the right)
|
||||
find_left = "sF", -- Find surrounding (to the left)
|
||||
highlight = "sh", -- Highlight surrounding
|
||||
replace = "cs", -- Replace surrounding
|
||||
update_n_lines = "sn", -- Update `n_lines`
|
||||
suffix_last = "", -- Suffix to search with "prev" method
|
||||
suffix_next = "", -- Suffix to search with "next" method
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- markdown stuff
|
||||
{
|
||||
"markview",
|
||||
after = rq("markview"),
|
||||
},
|
||||
{
|
||||
"obsidian-nvim",
|
||||
after = rq("obsidian"),
|
||||
},
|
||||
|
||||
-- rice
|
||||
{
|
||||
"alpha",
|
||||
after = rq("alpha"),
|
||||
},
|
||||
{
|
||||
"neovim-session-manager",
|
||||
priority = 60,
|
||||
},
|
||||
|
||||
{
|
||||
"lualine",
|
||||
after = rq("lualine"),
|
||||
},
|
||||
|
||||
{
|
||||
"catppuccin",
|
||||
priority = 1000,
|
||||
event = "UIEnter",
|
||||
after = rq("catppuccin"),
|
||||
},
|
||||
|
||||
{
|
||||
"fidget",
|
||||
after = function()
|
||||
require("fidget").setup({
|
||||
display = { done_icon = "" },
|
||||
notification = {
|
||||
override_vim_notify = true,
|
||||
window = { winblend = 0 },
|
||||
},
|
||||
progress = {
|
||||
ignore = {
|
||||
"copilot",
|
||||
"null-ls",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"nvim-colorizer",
|
||||
after = function()
|
||||
require("colorizer").setup({
|
||||
user_default_options = {
|
||||
RGB = true,
|
||||
RRGGBB = true,
|
||||
names = false,
|
||||
RRGGBBAA = true,
|
||||
AARRGGBB = false,
|
||||
rgb_fn = false,
|
||||
hsl_fn = false,
|
||||
css = false,
|
||||
css_fn = false,
|
||||
mode = "background",
|
||||
tailwind = "both",
|
||||
sass = {
|
||||
enable = true,
|
||||
},
|
||||
virtualtext = " ",
|
||||
},
|
||||
|
||||
buftypes = {
|
||||
"*",
|
||||
"!dashboard",
|
||||
"!lazy",
|
||||
"!popup",
|
||||
"!prompt",
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"todo-comments",
|
||||
after = function()
|
||||
require("todo-comments").setup()
|
||||
end,
|
||||
},
|
||||
|
||||
-- quicker movement
|
||||
{
|
||||
"telescope",
|
||||
after = rq("telescope"),
|
||||
},
|
||||
|
||||
{
|
||||
"harpoon",
|
||||
after = rq("harpoon"),
|
||||
},
|
||||
|
||||
-- copilot
|
||||
-- copilot-cmp
|
||||
{
|
||||
"copilot-lua",
|
||||
enabled = function()
|
||||
return vim.fn.glob("~/.config/gh/config.yml") ~= "" or vim.fn.glob("$XDG_CONFIG_HOME/gh/config.yml") ~= ""
|
||||
end,
|
||||
event = "InsertEnter",
|
||||
after = rq("copilot"),
|
||||
},
|
||||
|
||||
-- lsp
|
||||
{
|
||||
"nvim-treesitter",
|
||||
after = rq("tree-sitter"),
|
||||
},
|
||||
{ "rainbow-delimiters" },
|
||||
|
||||
-- rust lsp + formmating
|
||||
{
|
||||
"rustaceanvim",
|
||||
ft = "rust",
|
||||
after = rq("rust"),
|
||||
},
|
||||
|
||||
{
|
||||
"nvim-lspconfig",
|
||||
after = rq("lsp"),
|
||||
},
|
||||
|
||||
{
|
||||
"trouble",
|
||||
after = rq("trouble"),
|
||||
},
|
||||
{
|
||||
"lazydev",
|
||||
after = function()
|
||||
require("lazydev").setup()
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"crates",
|
||||
after = function()
|
||||
require("crates").setup({})
|
||||
end,
|
||||
event = "BufRead Cargo.toml",
|
||||
},
|
||||
|
||||
{
|
||||
"go-nvim",
|
||||
ft = {
|
||||
"go",
|
||||
"gomod",
|
||||
"gosum",
|
||||
"gotmpl",
|
||||
"gohtmltmpl",
|
||||
"gotexttmpl",
|
||||
},
|
||||
after = function()
|
||||
-- setup go stuff
|
||||
require("go").setup({
|
||||
disable_defaults = false,
|
||||
icons = {
|
||||
breakpoint = " ",
|
||||
currentpos = " ",
|
||||
},
|
||||
trouble = true,
|
||||
luasnip = true,
|
||||
dap_debug_keymap = false,
|
||||
lsp_cfg = false,
|
||||
lsp_keymaps = false,
|
||||
lsp_inlay_hints = {
|
||||
enable = true,
|
||||
style = "inlay",
|
||||
},
|
||||
})
|
||||
|
||||
require("lspconfig").gopls.setup(require("go.lsp").config())
|
||||
end,
|
||||
},
|
||||
{ "guihua-lua" },
|
||||
|
||||
-- hide my secrets
|
||||
{
|
||||
"cloak",
|
||||
after = rq("cloak"),
|
||||
},
|
||||
|
||||
-- misc
|
||||
{
|
||||
"undotree",
|
||||
after = function()
|
||||
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
|
||||
end,
|
||||
},
|
||||
|
||||
-- track my time coding
|
||||
{
|
||||
"wakatime",
|
||||
enabled = function()
|
||||
return vim.fn.glob("~/.wakatime.cfg") ~= "" or vim.fn.glob("$WAKATIME_HOME/.wakatime.cfg") ~= ""
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"indent-blankline",
|
||||
event = "DeferredUIEnter",
|
||||
after = function()
|
||||
require("ibl").setup({
|
||||
scope = { enabled = false },
|
||||
exclude = {
|
||||
filetypes = {
|
||||
"alpha",
|
||||
"fugitive",
|
||||
"help",
|
||||
"lazy",
|
||||
"NvimTree",
|
||||
"ToggleTerm",
|
||||
"LazyGit",
|
||||
"TelescopePrompt",
|
||||
"prompt",
|
||||
"code-action-menu-menu",
|
||||
"code-action-menu-warning-message",
|
||||
"Trouble",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- cool snippets saving
|
||||
{
|
||||
"sayama-nvim",
|
||||
after = function()
|
||||
require("sayama").setup({
|
||||
dir = vim.fn.glob("$XDG_DATA_HOME/zzz"),
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"freeze",
|
||||
after = rq("freeze"),
|
||||
},
|
||||
|
||||
-- lazygit integration
|
||||
{
|
||||
"toggleterm",
|
||||
after = function()
|
||||
require("toggleterm").setup()
|
||||
|
||||
local Terminal = require("toggleterm.terminal").Terminal
|
||||
local lazygit = Terminal:new({
|
||||
cmd = "lazygit",
|
||||
direction = "float",
|
||||
float_opts = {
|
||||
border = "rounded",
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>gg", function()
|
||||
lazygit:toggle()
|
||||
end, { noremap = true, silent = true })
|
||||
vim.keymap.set("n", "<c-t>", "<cmd>ToggleTerm<cr>", { noremap = true, silent = true })
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"direnv",
|
||||
enabled = function()
|
||||
return vim.fn.executable("direnv") == 1
|
||||
end,
|
||||
after = function()
|
||||
require("direnv").setup({
|
||||
autoload_direnv = true,
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- discord integration
|
||||
{
|
||||
"cord.nvim",
|
||||
after = function()
|
||||
require("cord").setup({
|
||||
editor = { image = "https://raw.githubusercontent.com/IogaMaster/neovim/main/.github/assets/nixvim-dark.webp" },
|
||||
display = { swap_icons = true }, -- place the editor image as the main image
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- deps
|
||||
{
|
||||
"plenary",
|
||||
priority = 100,
|
||||
},
|
||||
{
|
||||
"nvim-web-devicons",
|
||||
after = rq("nvim-web-devicons"),
|
||||
},
|
||||
}
|
428
config/lua/izvim/plugins/lsp.lua
Normal file
428
config/lua/izvim/plugins/lsp.lua
Normal file
|
@ -0,0 +1,428 @@
|
|||
local plugins = {
|
||||
"cmp",
|
||||
"cmp-buffer",
|
||||
"cmp-cmdline",
|
||||
"cmp-nvim-lsp",
|
||||
"cmp-path",
|
||||
"cmp_luasnip",
|
||||
"lspkind",
|
||||
"null-ls",
|
||||
"lsp-status",
|
||||
"ltex-extra",
|
||||
"schemastore",
|
||||
"py_lsp",
|
||||
"typescript-tools",
|
||||
"luasnip",
|
||||
}
|
||||
|
||||
for _, plugin in ipairs(plugins) do
|
||||
vim.api.nvim_cmd({
|
||||
cmd = "packadd",
|
||||
args = { plugin },
|
||||
}, {})
|
||||
end
|
||||
|
||||
local lsp_present, lspconfig = pcall(require, "lspconfig")
|
||||
local cmp_present, cmp = pcall(require, "cmp")
|
||||
local navic_present, navic = pcall(require, "nvim-navic")
|
||||
local luasnip_present, luasnip = pcall(require, "luasnip")
|
||||
|
||||
if not lsp_present then
|
||||
vim.notify("lspnot present", vim.log.levels.ERROR)
|
||||
return
|
||||
end
|
||||
|
||||
if not cmp_present then
|
||||
vim.notify("cmp not present", vim.log.levels.ERROR)
|
||||
return
|
||||
end
|
||||
|
||||
if not luasnip_present then
|
||||
vim.notify("luasnip not present", vim.log.levels.ERROR)
|
||||
return
|
||||
end
|
||||
|
||||
vim.opt.completeopt = "menu,menuone,noselect"
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
|
||||
-- border style
|
||||
require("lspconfig.ui.windows").default_options.border = vim.g.bc.style
|
||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
|
||||
border = vim.g.bc.style,
|
||||
})
|
||||
local cmp_borders = {
|
||||
border = {
|
||||
vim.g.bc.topleft,
|
||||
vim.g.bc.horiz,
|
||||
vim.g.bc.topright,
|
||||
vim.g.bc.vert,
|
||||
vim.g.bc.botright,
|
||||
vim.g.bc.horiz,
|
||||
vim.g.bc.botleft,
|
||||
vim.g.bc.vert,
|
||||
},
|
||||
winhighlight = "Normal:CmpPmenu,FloatBorder:CmpBorder,CursorLine:PmenuSel,Search:None",
|
||||
}
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
window = {
|
||||
completion = cmp_borders,
|
||||
documentation = cmp_borders,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<CR>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
if luasnip.expandable() then
|
||||
luasnip.expand()
|
||||
else
|
||||
cmp.confirm({
|
||||
select = true,
|
||||
})
|
||||
end
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end),
|
||||
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.locally_jumpable(1) then
|
||||
luasnip.jump(1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
-- { name = "copilot" },
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "path" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "buffer" },
|
||||
}),
|
||||
formatting = {
|
||||
fields = { "kind", "abbr", "menu" },
|
||||
format = function(entry, vim_item)
|
||||
local kind = require("lspkind").cmp_format({
|
||||
mode = "symbol_text",
|
||||
ellipsis_char = "…",
|
||||
maxwidth = 50,
|
||||
symbol_map = { Copilot = "" },
|
||||
})(entry, vim_item)
|
||||
local strings = vim.split(kind.kind, "%s", { trimempty = true })
|
||||
|
||||
kind.kind = " " .. (strings[1] or "") .. " "
|
||||
kind.menu = " (" .. (strings[2] or "") .. ")"
|
||||
|
||||
return kind
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("BufRead", {
|
||||
group = vim.api.nvim_create_augroup("CmpSourceCargo", { clear = true }),
|
||||
pattern = "Cargo.toml",
|
||||
callback = function()
|
||||
cmp.setup.buffer({ sources = { { name = "crates" } } })
|
||||
end,
|
||||
})
|
||||
|
||||
cmp.setup.cmdline({ "/", "?" }, {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{ name = "buffer" },
|
||||
},
|
||||
})
|
||||
|
||||
cmp.setup.cmdline(":", {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "path", option = { trailing_slash = true } },
|
||||
}, {
|
||||
{ name = "cmdline" },
|
||||
}),
|
||||
})
|
||||
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
|
||||
callback = function(ev)
|
||||
local client = vim.lsp.get_client_by_id(ev.data.client_id)
|
||||
|
||||
if client == nil then
|
||||
return
|
||||
end
|
||||
|
||||
if navic_present and client.server_capabilities.documentSymbolProvider then
|
||||
navic.attach(client, ev.buf)
|
||||
end
|
||||
|
||||
if client.server_capabilities.inlayHintProvider then
|
||||
vim.lsp.inlay_hint.enable(true, { bufnr = ev.buf })
|
||||
end
|
||||
|
||||
local opts = { buffer = ev.buf }
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
|
||||
vim.keymap.set("n", "<C-k>", vim.lsp.buf.signature_help, opts)
|
||||
vim.keymap.set("n", "<space>rn", vim.lsp.buf.rename, opts)
|
||||
vim.keymap.set({ "n", "v" }, "<space>ca", vim.lsp.buf.code_action, opts)
|
||||
vim.keymap.set("n", "gr", vim.lsp.buf.references, opts)
|
||||
vim.keymap.set("n", "<space>fm", function()
|
||||
vim.lsp.buf.format({ async = true })
|
||||
end, opts)
|
||||
end,
|
||||
})
|
||||
|
||||
local common = { capabilities = capabilities }
|
||||
|
||||
-- setup python
|
||||
pcall(require("py_lsp").setup, common)
|
||||
|
||||
require("typescript-tools").setup({
|
||||
single_file_support = false,
|
||||
root_dir = function(fname)
|
||||
local root_dir = lspconfig.util.root_pattern("package.json", "tsconfig.json")(fname)
|
||||
|
||||
-- this is needed to make sure we don't pick up root_dir inside node_modules
|
||||
local node_modules_index = root_dir and root_dir:find("node_modules", 1, true)
|
||||
if node_modules_index and node_modules_index > 0 then
|
||||
---@diagnostic disable-next-line: need-check-nil
|
||||
root_dir = root_dir:sub(1, node_modules_index - 2)
|
||||
end
|
||||
|
||||
return root_dir
|
||||
end,
|
||||
settings = {
|
||||
expose_as_code_action = {
|
||||
"add_missing_imports",
|
||||
"fix_all",
|
||||
"remove_unused",
|
||||
},
|
||||
tsserver_path = vim.fn.resolve(vim.fn.exepath("tsserver") .. "/../../lib/node_modules/typescript/bin/tsserver"),
|
||||
},
|
||||
})
|
||||
|
||||
local servers = {
|
||||
astro = {},
|
||||
bashls = {},
|
||||
cssls = {},
|
||||
denols = {
|
||||
root_dir = lspconfig.util.root_pattern("deno.json", "deno.jsonc"),
|
||||
single_file_support = false,
|
||||
},
|
||||
dockerls = {},
|
||||
emmet_language_server = {
|
||||
filetypes = {
|
||||
"astro",
|
||||
"css",
|
||||
"eruby",
|
||||
"html",
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"less",
|
||||
"sass",
|
||||
"scss",
|
||||
"pug",
|
||||
"typescriptreact",
|
||||
},
|
||||
},
|
||||
graphql = {
|
||||
filetypes = {
|
||||
"graphql",
|
||||
"typescriptreact",
|
||||
"javascriptreact",
|
||||
"typescript",
|
||||
},
|
||||
},
|
||||
helm_ls = {},
|
||||
hls = {},
|
||||
html = {},
|
||||
intelephense = {},
|
||||
jqls = {},
|
||||
jsonls = {
|
||||
settings = {
|
||||
json = {
|
||||
schemas = require("schemastore").json.schemas(),
|
||||
validate = { enable = true },
|
||||
},
|
||||
},
|
||||
},
|
||||
lua_ls = {
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { "vim" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
ltex = {
|
||||
on_attach = function()
|
||||
require("ltex_extra").setup({
|
||||
load_langs = { "en-US", "en-GB" },
|
||||
init_check = true,
|
||||
path = vim.fn.stdpath("data") .. "/dictionary",
|
||||
})
|
||||
end,
|
||||
settings = {
|
||||
ltex = {
|
||||
language = "en-US",
|
||||
additionalRules = {
|
||||
enablePickyRules = true,
|
||||
motherTongue = "en_GB",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
marksman = {},
|
||||
nil_ls = {
|
||||
autostart = true,
|
||||
capabilities = capabilities,
|
||||
cmd = { "nil" },
|
||||
settings = {
|
||||
["nil"] = {
|
||||
formatting = {
|
||||
command = { "nixfmt" },
|
||||
},
|
||||
nix = { maxMemoryMB = nil },
|
||||
},
|
||||
},
|
||||
},
|
||||
nushell = {},
|
||||
serve_d = {},
|
||||
sourcekit = {},
|
||||
taplo = {},
|
||||
teal_ls = {},
|
||||
tailwindcss = {
|
||||
filetypes = {
|
||||
"astro",
|
||||
"javascriptreact",
|
||||
"typescriptreact",
|
||||
"html",
|
||||
"css",
|
||||
},
|
||||
},
|
||||
volar = {
|
||||
capabilities = {
|
||||
workspace = {
|
||||
didChangeWatchedFiles = {
|
||||
dynamicRegistration = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
root_dir = require("lspconfig.util").root_pattern("package.json"),
|
||||
},
|
||||
yamlls = {
|
||||
settings = {
|
||||
yaml = {
|
||||
completion = true,
|
||||
validate = true,
|
||||
suggest = {
|
||||
parentSkeletonSelectedFirst = true,
|
||||
},
|
||||
schemas = vim.tbl_extend("keep", {
|
||||
["https://json.schemastore.org/github-action"] = ".github/action.{yaml,yml}",
|
||||
["https://json.schemastore.org/github-workflow"] = ".github/workflows/*",
|
||||
["https://gitlab.com/gitlab-org/gitlab/-/raw/master/app/assets/javascripts/editor/schema/ci.json"] = "*lab-ci.{yaml,yml}",
|
||||
["https://json.schemastore.org/helmfile"] = "helmfile.{yaml,yml}",
|
||||
["https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json"] = "docker-compose.{yml,yaml}",
|
||||
["https://goreleaser.com/static/schema.json"] = ".goreleaser.{yml,yaml}",
|
||||
}, require("schemastore").yaml.schemas()),
|
||||
},
|
||||
redhat = {
|
||||
telemetry = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for server, config in pairs(servers) do
|
||||
if config == {} then
|
||||
lspconfig[server].setup(common)
|
||||
else
|
||||
lspconfig[server].setup(vim.tbl_extend("force", common, config))
|
||||
end
|
||||
end
|
||||
|
||||
-- null ls stuff
|
||||
local null_present, null = pcall(require, "null-ls")
|
||||
|
||||
if not null_present then
|
||||
return
|
||||
end
|
||||
|
||||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
||||
|
||||
local sources = {
|
||||
-- general
|
||||
null.builtins.formatting.treefmt.with({
|
||||
condition = function(utils)
|
||||
return utils.root_has_file("treefmt.toml")
|
||||
end,
|
||||
}),
|
||||
|
||||
-- nix
|
||||
null.builtins.formatting.nixfmt,
|
||||
null.builtins.diagnostics.statix,
|
||||
null.builtins.diagnostics.deadnix,
|
||||
|
||||
-- go
|
||||
null.builtins.formatting.gofumpt,
|
||||
|
||||
-- webdev
|
||||
null.builtins.formatting.prettier.with({
|
||||
filetypes = {
|
||||
"html",
|
||||
"astro",
|
||||
"vue",
|
||||
},
|
||||
}),
|
||||
|
||||
-- shell
|
||||
null.builtins.formatting.shfmt,
|
||||
|
||||
-- lua
|
||||
null.builtins.formatting.stylua,
|
||||
|
||||
-- docs
|
||||
null.builtins.diagnostics.alex,
|
||||
null.builtins.diagnostics.proselint,
|
||||
}
|
||||
|
||||
null.setup({
|
||||
sources = sources,
|
||||
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,
|
||||
filter = function(c)
|
||||
return c.name == "null-ls"
|
||||
end,
|
||||
})
|
||||
end,
|
||||
})
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
local toggle_formatters = function()
|
||||
null.toggle({ methods = null.methods.FORMATTING })
|
||||
end
|
||||
|
||||
vim.api.nvim_create_user_command("ToggleFormatters", toggle_formatters, {})
|
43
config/lua/izvim/plugins/lualine.lua
Normal file
43
config/lua/izvim/plugins/lualine.lua
Normal file
|
@ -0,0 +1,43 @@
|
|||
require("lualine").setup({
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = "auto",
|
||||
component_separators = { left = "", right = "" },
|
||||
section_separators = { left = "", right = "" },
|
||||
always_divide_middle = true,
|
||||
globalstatus = true,
|
||||
refresh = {
|
||||
statusline = 1000,
|
||||
tabline = 1000,
|
||||
winbar = 1000,
|
||||
},
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { "mode" },
|
||||
lualine_b = { "branch", "diff", "diagnostics" },
|
||||
lualine_c = { "searchcount" },
|
||||
lualine_x = { "filetype" },
|
||||
lualine_y = { "progress" },
|
||||
lualine_z = { "location" },
|
||||
},
|
||||
tabline = {},
|
||||
winbar = {
|
||||
lualine_c = { "navic" },
|
||||
lualine_x = {
|
||||
{
|
||||
function()
|
||||
return " "
|
||||
end,
|
||||
cond = function()
|
||||
local present, navic = pcall(require, "nvim-navic")
|
||||
if not present then
|
||||
return false
|
||||
end
|
||||
return navic.is_available()
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
inactive_winbar = {},
|
||||
extensions = {},
|
||||
})
|
27
config/lua/izvim/plugins/markview.lua
Normal file
27
config/lua/izvim/plugins/markview.lua
Normal file
|
@ -0,0 +1,27 @@
|
|||
local p = require("markview.presets")
|
||||
|
||||
require("markview").setup({
|
||||
-- allows us to use hybrid mode
|
||||
modes = { "n", "i", "no", "c" },
|
||||
hybrid_modes = { "i" },
|
||||
callbacks = {
|
||||
on_enable = function(_, win)
|
||||
vim.wo[win].conceallevel = 2
|
||||
vim.wo[win].concealcursor = "nc"
|
||||
end,
|
||||
},
|
||||
|
||||
headings = p.headings.glow,
|
||||
checkboxes = p.checkboxes.nerd,
|
||||
horizontal_rules = p.horizontal_rules.thin,
|
||||
code_blocks = {
|
||||
pad_amount = 1,
|
||||
},
|
||||
list_items = {
|
||||
-- indent_size = 0,
|
||||
marker_minus = { add_padding = false },
|
||||
marker_plus = { add_padding = false },
|
||||
marker_star = { add_padding = false },
|
||||
marker_dot = { add_padding = false },
|
||||
},
|
||||
})
|
42
config/lua/izvim/plugins/nvim-web-devicons.lua
Normal file
42
config/lua/izvim/plugins/nvim-web-devicons.lua
Normal file
|
@ -0,0 +1,42 @@
|
|||
local ctp_present, ctp_pallets = pcall(require, "catppuccin.palettes")
|
||||
|
||||
if ctp_present then
|
||||
local C = ctp_pallets.get_palette()
|
||||
|
||||
local justfile = {
|
||||
icon = "",
|
||||
name = "Justfile",
|
||||
color = C.peach,
|
||||
}
|
||||
|
||||
require("nvim-web-devicons").setup({
|
||||
override_by_filename = {
|
||||
[".ecrc"] = {
|
||||
icon = "",
|
||||
name = "EditorConfigChecker",
|
||||
color = C.green,
|
||||
},
|
||||
[".envrc"] = {
|
||||
icon = "",
|
||||
name = "envrc",
|
||||
color = C.yellow,
|
||||
},
|
||||
[".editorconfig"] = {
|
||||
icon = "",
|
||||
name = "EditorConfig",
|
||||
color = C.green,
|
||||
},
|
||||
[".luacheckrc"] = {
|
||||
icon = "",
|
||||
name = "LuacheckRC",
|
||||
color = C.blue,
|
||||
},
|
||||
[".Justfile"] = justfile,
|
||||
[".justfile"] = justfile,
|
||||
["Justfile"] = justfile,
|
||||
["justfile"] = justfile,
|
||||
},
|
||||
})
|
||||
else
|
||||
require("nvim-web-devicons").setup()
|
||||
end
|
16
config/lua/izvim/plugins/obsidian.lua
Normal file
16
config/lua/izvim/plugins/obsidian.lua
Normal file
|
@ -0,0 +1,16 @@
|
|||
require("obsidian").setup({
|
||||
workspaces = {
|
||||
{
|
||||
name = "default",
|
||||
path = "~/Documents/obsidian",
|
||||
},
|
||||
{
|
||||
name = "default",
|
||||
path = "~/documents/obsidian",
|
||||
},
|
||||
{
|
||||
name = "cssuffering",
|
||||
path = "~/dev/cssuffering/notes",
|
||||
},
|
||||
},
|
||||
})
|
129
config/lua/izvim/plugins/telescope.lua
Normal file
129
config/lua/izvim/plugins/telescope.lua
Normal file
|
@ -0,0 +1,129 @@
|
|||
-- so quircky but we need to load this before telescope
|
||||
local exts = {
|
||||
"project",
|
||||
"ui-select",
|
||||
"fzf-native.nvim",
|
||||
}
|
||||
|
||||
for _, ext in ipairs(exts) do
|
||||
vim.api.nvim_cmd({
|
||||
cmd = "packadd",
|
||||
args = { "telescope-" .. ext },
|
||||
}, {})
|
||||
end
|
||||
|
||||
local bc = vim.g.bc
|
||||
|
||||
local no_preview = function(opts)
|
||||
local defaults = require("telescope.themes").get_dropdown({
|
||||
-- stylua: ignore
|
||||
borderchars = {
|
||||
{ bc.horiz, bc.vert, bc.horiz, bc.vert, bc.topleft, bc.topright, bc.botright, bc.botleft },
|
||||
prompt = { bc.horiz, bc.vert, " ", bc.vert, bc.topleft, bc.topright, bc.vert, bc.vert },
|
||||
results = { bc.horiz, bc.vert, bc.horiz, bc.vert, bc.vertright, bc.vertleft, bc.botright, bc.botleft },
|
||||
preview = { bc.horiz, bc.vert, bc.horiz, bc.vert, bc.topleft, bc.topright, bc.botright, bc.botleft },
|
||||
},
|
||||
width = 0.8,
|
||||
previewer = false,
|
||||
prompt_title = false,
|
||||
results_title = false,
|
||||
})
|
||||
return vim.tbl_deep_extend("keep", opts or {}, defaults)
|
||||
end
|
||||
|
||||
local project_actions = require("telescope._extensions.project.actions")
|
||||
local telescope = require("telescope")
|
||||
|
||||
telescope.load_extension("fzf")
|
||||
telescope.load_extension("project")
|
||||
telescope.load_extension("ui-select")
|
||||
|
||||
telescope.setup({
|
||||
defaults = {
|
||||
prompt_prefix = " ",
|
||||
selection_caret = " ",
|
||||
multi_icon = "│",
|
||||
file_ignore_patterns = {
|
||||
"%.npz",
|
||||
"%.pyc",
|
||||
"%.luac",
|
||||
"%.ipynb",
|
||||
"vendor/*",
|
||||
"%.lock",
|
||||
"__pycache__/*",
|
||||
"%.sqlite3",
|
||||
"%.ipynb",
|
||||
"node_modules/*",
|
||||
"%.min.js",
|
||||
"%.jpg",
|
||||
"%.jpeg",
|
||||
"%.png",
|
||||
"%.age",
|
||||
"%.svg",
|
||||
"%.otf",
|
||||
"%.ttf",
|
||||
"\\.git/",
|
||||
"%.webp",
|
||||
"\\.dart_tool/",
|
||||
"\\.gradle/",
|
||||
"\\.idea/",
|
||||
"\\.settings/",
|
||||
"\\.vscode/",
|
||||
"__pycache__/",
|
||||
"build/",
|
||||
"env/",
|
||||
"gradle/",
|
||||
"node_modules/",
|
||||
"target/",
|
||||
"%.pdb",
|
||||
"%.dll",
|
||||
"%.class",
|
||||
"%.exe",
|
||||
"%.so",
|
||||
"%.cache",
|
||||
"%.ico",
|
||||
"%.pdf",
|
||||
"%.dylib",
|
||||
"%.jar",
|
||||
"%.docx",
|
||||
"%.met",
|
||||
"smalljre_*/*",
|
||||
"\\.vale/",
|
||||
"_sources/",
|
||||
"tmp/",
|
||||
},
|
||||
-- stylua: ignore
|
||||
borderchars = { bc.horiz, bc.vert, bc.horiz, bc.vert, bc.topleft, bc.topright, bc.botright, bc.botleft },
|
||||
},
|
||||
pickers = {
|
||||
find_files = no_preview(),
|
||||
live_grep = no_preview({
|
||||
previewer = true,
|
||||
}),
|
||||
load_session = no_preview(),
|
||||
},
|
||||
extensions = {
|
||||
["ui-select"] = no_preview(),
|
||||
fzf = {
|
||||
fuzzy = true,
|
||||
override_generic_sorter = true,
|
||||
override_file_sorter = true,
|
||||
case_mode = "smart_case",
|
||||
},
|
||||
project = {
|
||||
search_by = { "path", "title" },
|
||||
hidden_files = true, -- default: false
|
||||
sync_with_nvim_tree = true, -- default false
|
||||
base_dirs = {
|
||||
{ "~/dev/aur/", max_depth = 2 },
|
||||
{ "~/dev/ctp/", max_depth = 1 },
|
||||
{ "~/dev/cssuffering/", max_depth = 1 },
|
||||
{ "~/dev/public/", max_depth = 1 },
|
||||
{ "~/dev/private/", max_depth = 1 },
|
||||
},
|
||||
on_project_selected = function(prompt_bufnr)
|
||||
project_actions.change_working_directory(prompt_bufnr, false)
|
||||
end,
|
||||
},
|
||||
},
|
||||
})
|
25
config/lua/izvim/plugins/tree-sitter.lua
Normal file
25
config/lua/izvim/plugins/tree-sitter.lua
Normal file
|
@ -0,0 +1,25 @@
|
|||
---@diagnostic disable: missing-fields
|
||||
require("nvim-treesitter.configs").setup({
|
||||
auto_install = false,
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
rainbow = {
|
||||
enable = true,
|
||||
extended_mode = true,
|
||||
max_file_lines = 8192,
|
||||
},
|
||||
})
|
||||
|
||||
vim.o.foldmethod = "expr"
|
||||
vim.o.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
vim.o.foldenable = false
|
||||
|
||||
-- remove treesitter commands
|
||||
vim.api.nvim_del_user_command("TSUpdate")
|
||||
vim.api.nvim_del_user_command("TSUpdateSync")
|
||||
vim.api.nvim_del_user_command("TSInstall")
|
||||
vim.api.nvim_del_user_command("TSInstallSync")
|
||||
vim.api.nvim_del_user_command("TSInstallFromGrammar")
|
||||
vim.api.nvim_del_user_command("TSUninstall")
|
14
config/lua/izvim/plugins/trouble.lua
Normal file
14
config/lua/izvim/plugins/trouble.lua
Normal file
|
@ -0,0 +1,14 @@
|
|||
local trouble = require("trouble")
|
||||
trouble.setup({})
|
||||
|
||||
vim.keymap.set("n", "<leader>tt", function()
|
||||
trouble.toggle()
|
||||
end, { noremap = true, silent = true })
|
||||
|
||||
vim.keymap.set("n", "[d", function()
|
||||
trouble.next({ skip_groups = true, jump = true })
|
||||
end, { noremap = true, silent = true })
|
||||
|
||||
vim.keymap.set("n", "]d", function()
|
||||
trouble.previous({ skip_groups = true, jump = true })
|
||||
end, { noremap = true, silent = true })
|
1
config/plugin/init.lua
Normal file
1
config/plugin/init.lua
Normal file
|
@ -0,0 +1 @@
|
|||
require("izvim")
|
110
flake.lock
generated
110
flake.lock
generated
|
@ -21,97 +21,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727826117,
|
||||
"narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"git-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": [],
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1728092656,
|
||||
"narHash": "sha256-eMeCTJZ5xBeQ0f9Os7K8DThNVSo9gy4umZLDfF5q6OM=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "1211305a5b237771e13fcca0c51e60ad47326a9a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"git-hooks",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709087332,
|
||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"neovim-nix": {
|
||||
"inputs": {
|
||||
"example": [],
|
||||
"flake-parts": [
|
||||
"flake-parts"
|
||||
],
|
||||
"git-hooks": [
|
||||
"git-hooks"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726122135,
|
||||
"narHash": "sha256-go26fmPdyBgwzHMostxKFAg23HekfD/L/U2Fnl00JN8=",
|
||||
"owner": "willruggiano",
|
||||
"repo": "neovim.nix",
|
||||
"rev": "867d08bf296925a35a217f1d90975d0522142b9c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "willruggiano",
|
||||
"repo": "neovim.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1728241625,
|
||||
|
@ -128,28 +37,9 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1720386169,
|
||||
"narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "194846768975b7ad2c4988bdb82572c00222c0d7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-24.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"beapkgs": "beapkgs",
|
||||
"flake-parts": "flake-parts",
|
||||
"git-hooks": "git-hooks",
|
||||
"neovim-nix": "neovim-nix",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"systems": "systems"
|
||||
}
|
||||
|
|
155
flake.nix
155
flake.nix
|
@ -3,18 +3,6 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-parts = {
|
||||
url = "github:hercules-ci/flake-parts";
|
||||
inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
git-hooks = {
|
||||
url = "github:cachix/git-hooks.nix";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
flake-compat.follows = "";
|
||||
};
|
||||
};
|
||||
|
||||
beapkgs = {
|
||||
url = "github:isabelroses/beapkgs";
|
||||
|
@ -24,100 +12,71 @@
|
|||
};
|
||||
};
|
||||
|
||||
# neovim-nightly-overlay = {
|
||||
# url = "github:nix-community/neovim-nightly-overlay";
|
||||
# inputs = {
|
||||
# nixpkgs.follows = "nixpkgs";
|
||||
# flake-parts.follows = "flake-parts";
|
||||
# git-hooks.follows = "pre-commit-nix";
|
||||
# flake-compat.follows = "";
|
||||
# };
|
||||
# };
|
||||
|
||||
neovim-nix = {
|
||||
url = "github:willruggiano/neovim.nix";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
flake-parts.follows = "flake-parts";
|
||||
git-hooks.follows = "git-hooks";
|
||||
example.follows = "";
|
||||
};
|
||||
};
|
||||
|
||||
systems.url = "github:nix-systems/default";
|
||||
};
|
||||
|
||||
outputs =
|
||||
inputs:
|
||||
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = import inputs.systems;
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
systems,
|
||||
beapkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (nixpkgs.lib) genAttrs;
|
||||
|
||||
imports = [
|
||||
inputs.neovim-nix.flakeModule
|
||||
./neovim.nix
|
||||
] ++ inputs.nixpkgs.lib.optional (inputs.git-hooks ? flakeModule) inputs.git-hooks.flakeModule;
|
||||
forAllSystems =
|
||||
function:
|
||||
genAttrs (import systems) (
|
||||
system:
|
||||
function (
|
||||
import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
overlays = [ beapkgs.overlays.default ];
|
||||
}
|
||||
)
|
||||
);
|
||||
in
|
||||
{
|
||||
|
||||
perSystem =
|
||||
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
|
||||
|
||||
packages = forAllSystems (
|
||||
pkgs:
|
||||
let
|
||||
neovim = pkgs.callPackage ./pkgs/neovim.nix { };
|
||||
in
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
self',
|
||||
config,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
{
|
||||
_module.args.pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
overlays = [ inputs.beapkgs.overlays.default ];
|
||||
};
|
||||
|
||||
formatter = pkgs.nixfmt-rfc-style;
|
||||
|
||||
packages =
|
||||
let
|
||||
neovim = config.neovim.final;
|
||||
in
|
||||
{
|
||||
inherit neovim;
|
||||
default = neovim;
|
||||
nvim-treesitter = pkgs.callPackage ./pkgs/nvim-treesitter { };
|
||||
};
|
||||
|
||||
devShells = {
|
||||
default = pkgs.mkShellNoCC {
|
||||
inherit (self'.checks.pre-commit-check) shellHook;
|
||||
buildInputs = with pkgs; [
|
||||
self'.formatter
|
||||
nvfetcher
|
||||
];
|
||||
};
|
||||
|
||||
generate-treesitter = pkgs.mkShellNoCC {
|
||||
packages = with pkgs; [
|
||||
nvfetcher
|
||||
(writeShellApplication {
|
||||
name = "generate";
|
||||
runtimeInputs = [ (callPackage ./pkgs/nvim-treesitter/neovim.nix { }) ];
|
||||
|
||||
text = ''
|
||||
nvim --headless -l ${./pkgs/nvim-treesitter/generate-nvfetcher.lua}
|
||||
'';
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
inherit neovim;
|
||||
default = neovim;
|
||||
nvim-treesitter = pkgs.callPackage ./pkgs/nvim-treesitter { };
|
||||
}
|
||||
// lib.optionalAttrs (inputs.git-hooks ? flakeModule) {
|
||||
checks.pre-commit-check = inputs.git-hooks.lib.${system}.run {
|
||||
src = ./.;
|
||||
excludes = [ "_sources/.+" ];
|
||||
hooks = {
|
||||
nixfmt-rfc-style.enable = true;
|
||||
stylua.enable = true;
|
||||
};
|
||||
};
|
||||
);
|
||||
|
||||
devShells = forAllSystems (pkgs: {
|
||||
default = pkgs.mkShellNoCC {
|
||||
packages = [
|
||||
self.formatter.${pkgs.stdenv.hostPlatform.system}
|
||||
pkgs.nvfetcher
|
||||
];
|
||||
};
|
||||
|
||||
generate-treesitter = pkgs.mkShellNoCC {
|
||||
packages = [
|
||||
pkgs.nvfetcher
|
||||
|
||||
(pkgs.writeShellApplication {
|
||||
name = "generate";
|
||||
runtimeInputs = [ (pkgs.callPackage ./pkgs/nvim-treesitter/neovim.nix { }) ];
|
||||
|
||||
text = ''
|
||||
nvim --headless -l ${./pkgs/nvim-treesitter/generate-nvfetcher.lua}
|
||||
'';
|
||||
})
|
||||
];
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
79
neovim.nix
79
neovim.nix
|
@ -1,79 +0,0 @@
|
|||
{
|
||||
config.perSystem =
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
# inputs',
|
||||
...
|
||||
}:
|
||||
{
|
||||
neovim = {
|
||||
# package = inputs'.neovim-nightly-overlay.packages.default;
|
||||
package = pkgs.neovim-unwrapped;
|
||||
|
||||
paths = with pkgs; [
|
||||
# external deps
|
||||
fd
|
||||
ripgrep
|
||||
|
||||
# lua
|
||||
stylua
|
||||
lua-language-server
|
||||
|
||||
# webdev
|
||||
emmet-language-server
|
||||
tailwindcss-language-server
|
||||
typescript
|
||||
vscode-langservers-extracted
|
||||
nodePackages.graphql-language-service-cli
|
||||
nodejs-slim
|
||||
|
||||
# markdown / latex
|
||||
ltex-ls
|
||||
nodePackages.alex
|
||||
marksman
|
||||
|
||||
# nix
|
||||
nil
|
||||
statix
|
||||
deadnix
|
||||
nixfmt-rfc-style
|
||||
|
||||
# shell
|
||||
shfmt
|
||||
shellcheck
|
||||
bash-language-server
|
||||
|
||||
# etc
|
||||
nodePackages.prettier
|
||||
proselint
|
||||
taplo # toml
|
||||
yaml-language-server # yaml
|
||||
dockerfile-language-server-nodejs
|
||||
];
|
||||
|
||||
build = lib.mkForce {
|
||||
before = pkgs.writeTextFile {
|
||||
name = "before.lua";
|
||||
text = ''
|
||||
-- set space as leader
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
|
||||
-- disable remote plugin providers
|
||||
vim.g.loaded_node_provider = 0
|
||||
vim.g.loaded_perl_provider = 0
|
||||
vim.g.loaded_python_provider = 0
|
||||
vim.g.loaded_python3_provider = 0
|
||||
vim.g.loaded_ruby_provider = 0
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
lazy = {
|
||||
settings.dev.path = "~/dev/nvim";
|
||||
plugins = import ./plugins { inherit pkgs; };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
[alpha-nvim]
|
||||
[alpha]
|
||||
fetch.github = "goolord/alpha-nvim"
|
||||
src.git = "https://github.com/goolord/alpha-nvim"
|
||||
|
||||
|
@ -10,6 +10,10 @@ src.git = "https://github.com/catppuccin/nvim"
|
|||
fetch.github = "laytan/cloak.nvim"
|
||||
src.git = "https://github.com/laytan/cloak.nvim"
|
||||
|
||||
[cmp]
|
||||
fetch.github = "hrsh7th/nvim-cmp"
|
||||
src.git = "https://github.com/hrsh7th/nvim-cmp"
|
||||
|
||||
[cmp-buffer]
|
||||
fetch.github = "hrsh7th/cmp-buffer"
|
||||
src.git = "https://github.com/hrsh7th/cmp-buffer"
|
||||
|
@ -42,7 +46,7 @@ src.git = "https://github.com/zbirenbaum/copilot.lua"
|
|||
fetch.github = "saecki/crates.nvim"
|
||||
src.git = "https://github.com/saecki/crates.nvim"
|
||||
|
||||
[direnv-nvim]
|
||||
[direnv]
|
||||
fetch.github = "NotAShelf/direnv.nvim"
|
||||
src.git = "https://github.com/NotAShelf/direnv.nvim"
|
||||
|
||||
|
@ -59,7 +63,7 @@ fetch.github = "j-hui/fidget.nvim"
|
|||
src.git = "https://github.com/j-hui/fidget.nvim"
|
||||
src.branch = "legacy"
|
||||
|
||||
[freeze-nvim]
|
||||
[freeze]
|
||||
fetch.github = "charm-community/freeze.nvim"
|
||||
src.git = "https://github.com/charm-community/freeze.nvim"
|
||||
|
||||
|
@ -80,10 +84,6 @@ src.branch = "harpoon2"
|
|||
fetch.github = "lukas-reineke/indent-blankline.nvim"
|
||||
src.git = "https://github.com/lukas-reineke/indent-blankline.nvim"
|
||||
|
||||
[lazy]
|
||||
fetch.github = "folke/lazy.nvim"
|
||||
src.git = "https://github.com/folke/lazy.nvim"
|
||||
|
||||
[lazydev]
|
||||
fetch.github = "folke/lazydev.nvim"
|
||||
src.git = "https://github.com/folke/lazydev.nvim"
|
||||
|
@ -108,6 +108,10 @@ src.git = "https://github.com/nvim-lualine/lualine.nvim"
|
|||
fetch.github = "L3MON4D3/LuaSnip"
|
||||
src.git = "https://github.com/L3MON4D3/LuaSnip"
|
||||
|
||||
[lz-n]
|
||||
fetch.github = "nvim-neorocks/lz.n"
|
||||
src.git = "https://github.com/nvim-neorocks/lz.n"
|
||||
|
||||
[markview]
|
||||
fetch.github = "OXY2DEV/markview.nvim"
|
||||
src.git = "https://github.com/OXY2DEV/markview.nvim"
|
||||
|
@ -116,10 +120,6 @@ src.git = "https://github.com/OXY2DEV/markview.nvim"
|
|||
fetch.github = "echasnovski/mini.surround"
|
||||
src.git = "https://github.com/echasnovski/mini.surround"
|
||||
|
||||
[neocord]
|
||||
fetch.github = "IogaMaster/neocord"
|
||||
src.git = "https://github.com/IogaMaster/neocord"
|
||||
|
||||
[neovim-session-manager]
|
||||
fetch.github = "Shatur/neovim-session-manager"
|
||||
src.git = "https://github.com/Shatur/neovim-session-manager"
|
||||
|
@ -128,11 +128,7 @@ src.git = "https://github.com/Shatur/neovim-session-manager"
|
|||
fetch.github = "nvimtools/none-ls.nvim"
|
||||
src.git = "https://github.com/nvimtools/none-ls.nvim"
|
||||
|
||||
[nvim-cmp]
|
||||
fetch.github = "hrsh7th/nvim-cmp"
|
||||
src.git = "https://github.com/hrsh7th/nvim-cmp"
|
||||
|
||||
[nvim-colorizer-lua]
|
||||
[nvim-colorizer]
|
||||
fetch.github = "nvchad/nvim-colorizer.lua"
|
||||
src.git = "https://github.com/nvchad/nvim-colorizer.lua"
|
||||
|
||||
|
@ -148,7 +144,7 @@ src.git = "https://github.com/SmiteshP/nvim-navic"
|
|||
fetch.github = "rcarriga/nvim-notify"
|
||||
src.git = "https://github.com/rcarriga/nvim-notify"
|
||||
|
||||
[nvim-tree-lua]
|
||||
[nvim-tree]
|
||||
fetch.github = "nvim-tree/nvim-tree.lua"
|
||||
src.git = "https://github.com/nvim-tree/nvim-tree.lua"
|
||||
|
||||
|
@ -208,14 +204,14 @@ src.git = "https://github.com/nvim-telescope/telescope-ui-select.nvim"
|
|||
fetch.github = "rachartier/tiny-devicons-auto-colors.nvim"
|
||||
src.git = "https://github.com/rachartier/tiny-devicons-auto-colors.nvim"
|
||||
|
||||
[toggleterm-nvim]
|
||||
fetch.github = "akinsho/toggleterm.nvim"
|
||||
src.git = "https://github.com/akinsho/toggleterm.nvim"
|
||||
|
||||
[todo-comments]
|
||||
fetch.github = "folke/todo-comments.nvim"
|
||||
src.git = "https://github.com/folke/todo-comments.nvim"
|
||||
|
||||
[toggleterm]
|
||||
fetch.github = "akinsho/toggleterm.nvim"
|
||||
src.git = "https://github.com/akinsho/toggleterm.nvim"
|
||||
|
||||
[trouble]
|
||||
fetch.github = "folke/trouble.nvim"
|
||||
src.git = "https://github.com/folke/trouble.nvim"
|
||||
|
@ -233,6 +229,6 @@ fetch.github = "tpope/vim-fugitive"
|
|||
src.git = "https://github.com/tpope/vim-fugitive"
|
||||
|
||||
[wakatime]
|
||||
pinned = true
|
||||
fetch.github = "wakatime/vim-wakatime"
|
||||
src.git = "https://github.com/wakatime/vim-wakatime"
|
||||
pinned = true
|
||||
|
|
207
pkgs/neovim.nix
Normal file
207
pkgs/neovim.nix
Normal file
|
@ -0,0 +1,207 @@
|
|||
{
|
||||
# extra utils for building the derivation
|
||||
lib,
|
||||
callPackage,
|
||||
runCommandLocal,
|
||||
symlinkJoin,
|
||||
makeWrapper,
|
||||
|
||||
# neovim
|
||||
pname ? "izvim",
|
||||
basePackage ? neovim-unwrapped, # you can choose the base, i choose neovim-unwrapped
|
||||
neovim-unwrapped,
|
||||
vimUtils,
|
||||
|
||||
# path, see there explanation below
|
||||
fd,
|
||||
ripgrep,
|
||||
stylua,
|
||||
lua-language-server,
|
||||
emmet-language-server,
|
||||
tailwindcss-language-server,
|
||||
typescript,
|
||||
vscode-langservers-extracted,
|
||||
ltex-ls,
|
||||
marksman,
|
||||
gonvim-tools,
|
||||
nil,
|
||||
statix,
|
||||
deadnix,
|
||||
nixfmt-rfc-style,
|
||||
shfmt,
|
||||
shellcheck,
|
||||
bash-language-server,
|
||||
proselint,
|
||||
taplo,
|
||||
yaml-language-server,
|
||||
dockerfile-language-server-nodejs,
|
||||
lazygit,
|
||||
nodePackages,
|
||||
|
||||
# for our extra plugins
|
||||
vimPlugins,
|
||||
|
||||
# our custom treesitter plugin
|
||||
treesitter ? (callPackage ./nvim-treesitter { }).override {
|
||||
grammars = [
|
||||
"astro"
|
||||
"bash"
|
||||
"c"
|
||||
"cpp"
|
||||
"css"
|
||||
"csv"
|
||||
"diff"
|
||||
"dockerfile"
|
||||
"git_rebase"
|
||||
"gitattributes"
|
||||
"gitcommit"
|
||||
"gitignore"
|
||||
"go"
|
||||
"gomod"
|
||||
"gosum"
|
||||
"gotmpl"
|
||||
"graphql"
|
||||
"haskell"
|
||||
"html"
|
||||
"javascript"
|
||||
"jsdoc"
|
||||
"json"
|
||||
"jsonc"
|
||||
"just"
|
||||
"lua"
|
||||
"make"
|
||||
"markdown"
|
||||
"markdown_inline"
|
||||
"nix"
|
||||
"nu"
|
||||
"php"
|
||||
"php_only"
|
||||
"python"
|
||||
"rust"
|
||||
"scss"
|
||||
"svelte"
|
||||
"toml"
|
||||
"tsv"
|
||||
"tsx"
|
||||
"typescript"
|
||||
"vim"
|
||||
"vue"
|
||||
"yaml"
|
||||
"yuck"
|
||||
"zig"
|
||||
];
|
||||
},
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.lists) flatten;
|
||||
inherit (lib.strings) concatMapStringsSep makeBinPath;
|
||||
inherit (builtins)
|
||||
baseNameOf
|
||||
typeOf
|
||||
mapAttrs
|
||||
attrValues
|
||||
removeAttrs
|
||||
;
|
||||
|
||||
externalDeps = [
|
||||
# external deps
|
||||
fd
|
||||
ripgrep
|
||||
|
||||
# lua
|
||||
stylua
|
||||
lua-language-server
|
||||
|
||||
# webdev
|
||||
emmet-language-server
|
||||
tailwindcss-language-server
|
||||
typescript
|
||||
vscode-langservers-extracted
|
||||
nodePackages.graphql-language-service-cli
|
||||
|
||||
# markdown / latex
|
||||
ltex-ls
|
||||
nodePackages.alex
|
||||
marksman
|
||||
|
||||
# go
|
||||
gonvim-tools
|
||||
|
||||
# nix
|
||||
nil
|
||||
statix
|
||||
deadnix
|
||||
nixfmt-rfc-style
|
||||
|
||||
# shell
|
||||
shfmt
|
||||
shellcheck
|
||||
bash-language-server
|
||||
|
||||
# etc
|
||||
nodePackages.prettier
|
||||
proselint
|
||||
taplo # toml
|
||||
yaml-language-server # yaml
|
||||
dockerfile-language-server-nodejs
|
||||
lazygit
|
||||
];
|
||||
|
||||
mkPlugin =
|
||||
pname: attrs:
|
||||
vimUtils.buildVimPlugin {
|
||||
inherit pname;
|
||||
inherit (attrs) src version;
|
||||
};
|
||||
|
||||
nv = removeAttrs (callPackage ../_sources/generated.nix { }) [
|
||||
"override"
|
||||
"overrideDerivation"
|
||||
];
|
||||
|
||||
nvPlugins = mapAttrs mkPlugin nv;
|
||||
|
||||
packDir = runCommandLocal "packdir" { } ''
|
||||
mkdir -pv $out/pack/${pname}/{start,opt}
|
||||
|
||||
${concatMapStringsSep "\n" (p: ''
|
||||
ln -vsfT ${p} $out/pack/${pname}/opt/${
|
||||
if typeOf p == "path" then baseNameOf p else (p.pname or p.name)
|
||||
}
|
||||
'') plugins}
|
||||
|
||||
ln -vsfT ${../config} $out/pack/${pname}/start/init-plugin
|
||||
'';
|
||||
|
||||
plugins = flatten [
|
||||
(attrValues nvPlugins)
|
||||
treesitter
|
||||
|
||||
# extra plugsns beacuse they often fail or need extra steps
|
||||
vimPlugins.cord-nvim
|
||||
vimPlugins.telescope-fzf-native-nvim
|
||||
];
|
||||
in
|
||||
symlinkJoin {
|
||||
name = pname;
|
||||
|
||||
paths = [ basePackage ];
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/nvim \
|
||||
--prefix PATH : ${makeBinPath externalDeps} \
|
||||
--add-flags '-u' \
|
||||
--add-flags 'NORC' \
|
||||
--add-flags '--cmd' \
|
||||
--add-flags '"lua vim.loader.enable()"' \
|
||||
--add-flags '--cmd' \
|
||||
--add-flags '"set packpath^=${packDir} | set runtimepath^=${packDir}"' \
|
||||
--set 'NVIM_APPNAME=${pname}'
|
||||
|
||||
ln -s $out/bin/nvim $out/bin/${pname}
|
||||
'';
|
||||
|
||||
meta.mainProgram = "nvim";
|
||||
}
|
|
@ -1,108 +0,0 @@
|
|||
return function()
|
||||
require("session_manager").setup({
|
||||
autoload_mode = require("session_manager.config").AutoloadMode.CurrentDir,
|
||||
})
|
||||
|
||||
local function apply_gradient_hl(text)
|
||||
local lines = {}
|
||||
for i, line in ipairs(text) do
|
||||
local tbl = {
|
||||
type = "text",
|
||||
val = line,
|
||||
opts = {
|
||||
hl = "AlphaHeaderGradient" .. i,
|
||||
shrink_margin = false,
|
||||
position = "center",
|
||||
},
|
||||
}
|
||||
table.insert(lines, tbl)
|
||||
end
|
||||
|
||||
return {
|
||||
type = "group",
|
||||
val = lines,
|
||||
opts = { position = "center" },
|
||||
}
|
||||
end
|
||||
|
||||
local alpha = require("alpha")
|
||||
local theta = require("alpha.themes.theta")
|
||||
local dashboard = require("alpha.themes.dashboard")
|
||||
|
||||
local header = {
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢿⣿⣿⣿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠁⢸⣿⣿⣿⠀⠙⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⡿⠛⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠁⠀⠘⣿⣿⠇⠀⠀⡀⠈⠙⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣿⠀⠀⠈⠙⢿⣿⣿⣿⣿⣿⡿⠛⠒⢊⠁⢰⣿⠏⠀⠀⠀⠈⠁⢒⠂⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣇⠀⠀⠀⠀⢻⣿⣿⡿⠋⠀⠀⠘⠿⠇⣼⠏⠀⠀⠀⠀⠀⠘⠿⠃⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣿⣧⡀⠀⠀⠀⠹⣿⡁⠀⠀⠀⠀⠀⠀⠋⠀⠀⡀⠀⠀⠀⠀⠀⠀⠐⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣦⠀⠀⠙⠇⠀⠀⢠⣶⣤⡄⠀⠀⠀⠉⢶⢀⣰⠆⠀⠀⠀⢀⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⣸⢸⢺⢱⠀⠀⠀⠀⣸⠬⠵⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢿⣭⠀⠀⠀⠲⣻⡘⠘⠀⢦⠀⠀⠔⠁⠀⠀⣀⠤⠚⣱⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣌⠛⢷⣤⡀⠀⢘⣗⠀⠀⠀⠱⣤⣴⣖⠈⠹⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⠟⠋⠙⠻⣿⣿⣿⣿⣿⣷⣦⣬⠃⣴⣿⣽⣷⣄⣀⢀⣿⣿⡿⠷⣤⣤⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⠃⠀⠀⠀⠀⠘⢿⣿⣿⣿⣿⣿⡇⠀⢹⡿⠿⣍⡙⠛⠛⣻⠟⠻⠶⠦⣤⠞⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⠀⠀⠀⠀⠀⠀⠈⢻⣿⣿⣿⣿⣧⣀⠞⠀⠀⠉⠛⠛⠛⢿⠀⠀⠀⠀⠀⠀⢘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠹⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⡀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⡎⠀⠀⠀⢀⡀⠤⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⢨⠃⠀⠀⠀⠀⠀⠀⠀⠀⡸⠀⠀⡠⠒⠉⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⣠⠃⠀⠀⠀⠀⠀⠀⠀⠀⡰⢁⠔⠋⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⣼⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠞⠁⠀⠀⠀⠀⠀⠀⠀⢀⡆⠀⠀⠀⠀⠀⠹⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⡀⠀⠀⠀⠀⠀⢀⡰⠃⠀⠀⠀⠀⠀⠀⠀⣀⣴⣿⣿⡀⠀⠀⠀⠀⠀⢻⣿⣿⣿⣿⣿",
|
||||
}
|
||||
|
||||
local buttons = {
|
||||
type = "group",
|
||||
position = "center",
|
||||
val = {
|
||||
dashboard.button("n", " New file", ":ene <bar> startinsert <cr>"),
|
||||
dashboard.button("f", " Find file", ":Telescope find_files<cr>"),
|
||||
dashboard.button("g", " Live grep", ":Telescope live_grep<cr>"),
|
||||
dashboard.button("s", " Show sessions", ":SessionManager load_session<cr>"),
|
||||
dashboard.button("p", " Projects", ":Telescope project<CR>"),
|
||||
dashboard.button("q", " Quit", ":qa<CR>"),
|
||||
},
|
||||
}
|
||||
|
||||
local v = vim.version()
|
||||
local vStr = string.format("v%d.%d.%d", v.major, v.minor, v.patch)
|
||||
|
||||
local footer = {
|
||||
type = "group",
|
||||
position = "center",
|
||||
val = {
|
||||
{
|
||||
type = "text",
|
||||
val = "neovim " .. vStr,
|
||||
opts = { hl = "Comment", position = "center" },
|
||||
},
|
||||
{
|
||||
type = "text",
|
||||
val = require("lazy").stats().count .. " plugins",
|
||||
opts = { hl = "Comment", position = "center" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
if vim.g.neovide then
|
||||
table.insert(footer.val, 2, {
|
||||
type = "text",
|
||||
val = "neovide " .. vim.g.neovide_version,
|
||||
opts = { hl = "Comment", position = "center" },
|
||||
})
|
||||
end
|
||||
|
||||
theta.config.layout = {
|
||||
{ type = "padding", val = 4 },
|
||||
apply_gradient_hl(header),
|
||||
{ type = "padding", val = 1 },
|
||||
buttons,
|
||||
{ type = "padding", val = 1 },
|
||||
footer,
|
||||
}
|
||||
|
||||
alpha.setup(theta.config)
|
||||
end
|
|
@ -1,57 +0,0 @@
|
|||
return function()
|
||||
require("catppuccin").setup({
|
||||
flavour = "auto",
|
||||
background = {
|
||||
light = "latte",
|
||||
dark = "mocha",
|
||||
},
|
||||
transparent_background = true,
|
||||
styles = {
|
||||
comments = { "italic" },
|
||||
},
|
||||
integrations = {
|
||||
alpha = true,
|
||||
treesitter = true,
|
||||
treesitter_context = false,
|
||||
native_lsp = {
|
||||
enabled = true,
|
||||
virtual_text = {
|
||||
errors = { "italic" },
|
||||
hints = { "italic" },
|
||||
warnings = { "italic" },
|
||||
information = { "italic" },
|
||||
},
|
||||
underlines = {
|
||||
errors = { "undercurl" },
|
||||
hints = { "undercurl" },
|
||||
warnings = { "undercurl" },
|
||||
information = { "undercurl" },
|
||||
},
|
||||
},
|
||||
telescope = {
|
||||
enabled = true,
|
||||
},
|
||||
cmp = true,
|
||||
lsp_trouble = true,
|
||||
nvimtree = true,
|
||||
which_key = false,
|
||||
indent_blankline = {
|
||||
enabled = true,
|
||||
colored_indent_levels = true,
|
||||
},
|
||||
navic = {
|
||||
enabled = true,
|
||||
custom_bg = "NONE",
|
||||
},
|
||||
gitsigns = false,
|
||||
markdown = true,
|
||||
render_markdown = false,
|
||||
harpoon = true,
|
||||
symbols_outline = true,
|
||||
ts_rainbow = true,
|
||||
notify = true,
|
||||
},
|
||||
})
|
||||
|
||||
vim.cmd.colorscheme("catppuccin")
|
||||
end
|
|
@ -1,29 +0,0 @@
|
|||
return function()
|
||||
require("cloak").setup({
|
||||
enabled = true,
|
||||
cloak_character = "*",
|
||||
-- The applied highlight group (colors) on the cloaking, see `:h highlight`.
|
||||
highlight_group = "Comment",
|
||||
patterns = {
|
||||
{
|
||||
-- Match any file starting with ".env".
|
||||
-- This can be a table to match multiple file patterns.
|
||||
file_pattern = {
|
||||
".env",
|
||||
".env.local",
|
||||
".env.dev",
|
||||
".env.development",
|
||||
"wrangler.toml",
|
||||
".dev.vars",
|
||||
"secrets.yaml",
|
||||
"secrets.yml",
|
||||
"*.age",
|
||||
},
|
||||
-- Match an equals sign and any character after it.
|
||||
-- This can also be a table of patterns to cloak,
|
||||
-- example: cloak_pattern = { ":.+", "-.+" } for yaml files.
|
||||
cloak_pattern = { ":.+", "=.+" },
|
||||
},
|
||||
},
|
||||
})
|
||||
end
|
|
@ -1,44 +0,0 @@
|
|||
return function()
|
||||
require("copilot").setup({
|
||||
panel = {
|
||||
enabled = false,
|
||||
auto_refresh = false,
|
||||
keymap = {
|
||||
jump_prev = "[[",
|
||||
jump_next = "]]",
|
||||
accept = "<CR>",
|
||||
refresh = "gr",
|
||||
open = "<C-CR>",
|
||||
},
|
||||
layout = {
|
||||
position = "bottom",
|
||||
ratio = 0.4,
|
||||
},
|
||||
},
|
||||
suggestion = {
|
||||
enabled = true,
|
||||
auto_trigger = true,
|
||||
debounce = 75,
|
||||
keymap = {
|
||||
accept = "<C-a>",
|
||||
accept_word = false,
|
||||
accept_line = false,
|
||||
next = "<M-]>",
|
||||
prev = "<M-[>",
|
||||
dismiss = false,
|
||||
},
|
||||
},
|
||||
filetypes = {
|
||||
["*"] = true,
|
||||
help = false,
|
||||
gitcommit = false,
|
||||
gitrebase = false,
|
||||
hgcommit = false,
|
||||
svn = false,
|
||||
cvs = false,
|
||||
["."] = false,
|
||||
},
|
||||
copilot_node_command = "node",
|
||||
server_opts_overrides = {},
|
||||
})
|
||||
end
|
|
@ -1,464 +0,0 @@
|
|||
{ pkgs }:
|
||||
let
|
||||
srcs = builtins.mapAttrs (_: pkg: pkg.src) (pkgs.callPackage ../_sources/generated.nix { });
|
||||
in
|
||||
rec {
|
||||
config = {
|
||||
src = ../config;
|
||||
lazy = false;
|
||||
priority = 1000;
|
||||
};
|
||||
|
||||
# tree view
|
||||
nvim-tree = {
|
||||
src = srcs.nvim-tree-lua;
|
||||
event = "VeryLazy";
|
||||
config = {
|
||||
sync_root_with_cwd = true;
|
||||
diagnostics.enable = true;
|
||||
renderer.indent_markers.enable = true;
|
||||
modified.enable = true;
|
||||
renderer.icons.web_devicons.folder.enable = true;
|
||||
};
|
||||
dependencies = {
|
||||
inherit plenary nvim-web-devicons;
|
||||
};
|
||||
};
|
||||
|
||||
# mini
|
||||
mini-surround = {
|
||||
src = srcs.mini-surround;
|
||||
main = "mini.surround";
|
||||
event = "InsertEnter";
|
||||
config.mappings = {
|
||||
add = "S"; # Add surrounding in Normal and Visual modes
|
||||
delete = "ds"; # Delete surrounding
|
||||
find = "sf"; # Find surrounding (to the right)
|
||||
find_left = "sF"; # Find surrounding (to the left)
|
||||
highlight = "sh"; # Highlight surrounding
|
||||
replace = "cs"; # Replace surrounding
|
||||
update_n_lines = "sn"; # Update `n_lines`
|
||||
suffix_last = ""; # Suffix to search with "prev" method
|
||||
suffix_next = ""; # Suffix to search with "next" method
|
||||
};
|
||||
};
|
||||
|
||||
# markdown stuff
|
||||
markview = {
|
||||
src = srcs.markview;
|
||||
config = ./markview.lua;
|
||||
lazy = false; # it handles lazy loading itself
|
||||
dependencies = {
|
||||
inherit nvim-web-devicons;
|
||||
};
|
||||
};
|
||||
|
||||
obsidian-nvim = {
|
||||
src = srcs.obsidian-nvim;
|
||||
config = ./obsidian.lua;
|
||||
dependencies = {
|
||||
inherit plenary;
|
||||
};
|
||||
};
|
||||
|
||||
# rice
|
||||
alpha = {
|
||||
src = srcs.alpha-nvim;
|
||||
config = ./alpha.lua;
|
||||
dependencies = {
|
||||
neovim-session-manager = {
|
||||
src = srcs.neovim-session-manager;
|
||||
dependencies = {
|
||||
inherit plenary;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
lualine = {
|
||||
src = srcs.lualine;
|
||||
config = ./lualine.lua;
|
||||
dependencies = {
|
||||
navic = {
|
||||
src = srcs.nvim-navic;
|
||||
|
||||
config = {
|
||||
highlight = true;
|
||||
separator = " ";
|
||||
icons = {
|
||||
File = " ";
|
||||
Module = " ";
|
||||
Namespace = " ";
|
||||
Package = " ";
|
||||
Class = " ";
|
||||
Method = " ";
|
||||
Property = " ";
|
||||
Field = " ";
|
||||
Constructor = " ";
|
||||
Enum = " ";
|
||||
Interface = " ";
|
||||
Function = " ";
|
||||
Variable = " ";
|
||||
Constant = " ";
|
||||
String = " ";
|
||||
Number = " ";
|
||||
Boolean = " ";
|
||||
Array = " ";
|
||||
Object = " ";
|
||||
Key = " ";
|
||||
Null = " ";
|
||||
EnumMember = " ";
|
||||
Struct = " ";
|
||||
Event = " ";
|
||||
Operator = " ";
|
||||
TypeParameter = " ";
|
||||
};
|
||||
};
|
||||
|
||||
dependencies = {
|
||||
inherit nvim-web-devicons;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
catppuccin = {
|
||||
src = srcs.catppuccin;
|
||||
config = ./catppuccin.lua;
|
||||
priority = 1000;
|
||||
};
|
||||
|
||||
# evergarden = {
|
||||
# src = srcs.evergarden;
|
||||
# config = ./evergarden.lua;
|
||||
# priority = 1000;
|
||||
# };
|
||||
|
||||
fidget = {
|
||||
src = srcs.fidget;
|
||||
event = "VeryLazy";
|
||||
|
||||
config = {
|
||||
display.done_icon = "";
|
||||
notification = {
|
||||
override_vim_notify = true;
|
||||
window.winblend = 0;
|
||||
};
|
||||
progress.ignore = [
|
||||
"copilot"
|
||||
"null-ls"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
nvim-colorizer = {
|
||||
src = srcs.nvim-colorizer-lua;
|
||||
event = "VeryLazy";
|
||||
|
||||
config = {
|
||||
user_default_options = {
|
||||
RGB = true;
|
||||
RRGGBB = true;
|
||||
names = false;
|
||||
RRGGBBAA = true;
|
||||
AARRGGBB = false;
|
||||
rgb_fn = false;
|
||||
hsl_fn = false;
|
||||
css = false;
|
||||
css_fn = false;
|
||||
mode = "background";
|
||||
tailwind = "both";
|
||||
sass = {
|
||||
enable = true;
|
||||
};
|
||||
virtualtext = " ";
|
||||
};
|
||||
|
||||
buftypes = [
|
||||
"*"
|
||||
"!dashboard"
|
||||
"!lazy"
|
||||
"!popup"
|
||||
"!prompt"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
todo-comments = {
|
||||
src = srcs.todo-comments;
|
||||
config = true;
|
||||
event = "VeryLazy";
|
||||
};
|
||||
|
||||
# quicker movement
|
||||
telescope = {
|
||||
src = srcs.telescope;
|
||||
config = ./telescope.lua;
|
||||
dependencies = {
|
||||
inherit plenary nvim-web-devicons;
|
||||
telescope-fzf-native.package = pkgs.vimPlugins.telescope-fzf-native-nvim;
|
||||
telescope-project.src = srcs.telescope-project;
|
||||
telescope-ui-select.src = srcs.telescope-ui-select;
|
||||
};
|
||||
};
|
||||
|
||||
harpoon = {
|
||||
src = srcs.harpoon;
|
||||
config = ./harpoon.lua;
|
||||
dependencies = {
|
||||
inherit plenary;
|
||||
};
|
||||
};
|
||||
|
||||
# copilot
|
||||
# copilot-cmp.src = srcs.copilot-cmp;
|
||||
copilot-lua = {
|
||||
src = srcs.copilot-lua;
|
||||
enabled = # lua
|
||||
''
|
||||
function()
|
||||
return vim.fn.glob("~/.config/gh/config.yml") ~= "" or vim.fn.glob("$XDG_CONFIG_HOME/gh/config.yml") ~= ""
|
||||
end
|
||||
'';
|
||||
config = ./copilot.lua;
|
||||
event = "InsertEnter";
|
||||
};
|
||||
|
||||
# lsp
|
||||
nvim-treesitter = {
|
||||
config = ./tree-sitter.lua;
|
||||
event = "VeryLazy";
|
||||
dependencies.rainbow-delimiters.src = srcs.rainbow-delimiters;
|
||||
package = (pkgs.callPackage ../pkgs/nvim-treesitter { }).override {
|
||||
grammars = [
|
||||
"astro"
|
||||
"bash"
|
||||
"c"
|
||||
"cpp"
|
||||
"css"
|
||||
"csv"
|
||||
"diff"
|
||||
"dockerfile"
|
||||
"git_rebase"
|
||||
"gitattributes"
|
||||
"gitcommit"
|
||||
"gitignore"
|
||||
"go"
|
||||
"gomod"
|
||||
"gosum"
|
||||
"gotmpl"
|
||||
"graphql"
|
||||
"haskell"
|
||||
"html"
|
||||
"javascript"
|
||||
"jsdoc"
|
||||
"json"
|
||||
"jsonc"
|
||||
"just"
|
||||
"lua"
|
||||
"make"
|
||||
"markdown"
|
||||
"markdown_inline"
|
||||
"nix"
|
||||
"nu"
|
||||
"php"
|
||||
"php_only"
|
||||
"python"
|
||||
"rust"
|
||||
"scss"
|
||||
"svelte"
|
||||
"toml"
|
||||
"tsv"
|
||||
"tsx"
|
||||
"typescript"
|
||||
"vim"
|
||||
"vue"
|
||||
"yaml"
|
||||
"yuck"
|
||||
"zig"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# rust lsp + formmating
|
||||
rustaceanvim = {
|
||||
src = srcs.rustaceanvim;
|
||||
config = ./rust.lua;
|
||||
ft = "rust";
|
||||
};
|
||||
|
||||
nvim-lspconfig = {
|
||||
src = srcs.nvim-lspconfig;
|
||||
config = ./lsp.lua;
|
||||
|
||||
event = "VeryLazy";
|
||||
dependencies = {
|
||||
# inherit copilot-cmp;
|
||||
cmp.src = srcs.nvim-cmp;
|
||||
cmp-buffer.src = srcs.cmp-buffer;
|
||||
cmp-cmdline.src = srcs.cmp-cmdline;
|
||||
cmp-nvim-lsp.src = srcs.cmp-nvim-lsp;
|
||||
cmp-path.src = srcs.cmp-path;
|
||||
cmp_luasnip.src = srcs.cmp_luasnip;
|
||||
lspkind.src = srcs.lspkind;
|
||||
null-ls.src = srcs.null-ls;
|
||||
lsp-status.src = srcs.lsp-status;
|
||||
ltex-extra.src = srcs.ltex-extra;
|
||||
schemastore.src = srcs.schemastore;
|
||||
py_lsp.src = srcs.py_lsp;
|
||||
typescript-tools.src = srcs.typescript-tools;
|
||||
luasnip.src = srcs.luasnip;
|
||||
|
||||
trouble = {
|
||||
src = srcs.trouble;
|
||||
config = ./trouble.lua;
|
||||
};
|
||||
|
||||
lazydev = {
|
||||
src = srcs.lazydev;
|
||||
config = true;
|
||||
};
|
||||
|
||||
crates = {
|
||||
src = srcs.crates;
|
||||
config = true;
|
||||
event = "BufRead Cargo.toml";
|
||||
};
|
||||
|
||||
go-nvim = {
|
||||
src = srcs.go-nvim;
|
||||
event = "CmdlineEnter";
|
||||
ft = [
|
||||
"go"
|
||||
"gomod"
|
||||
"gosum"
|
||||
"gotmpl"
|
||||
"gohtmltmpl"
|
||||
"gotexttmpl"
|
||||
];
|
||||
paths = [ pkgs.gonvim-tools ];
|
||||
dependencies.guihua-lua.src = srcs.guihua-lua;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# hide my secrets
|
||||
cloak = {
|
||||
src = srcs.cloak;
|
||||
event = "VeryLazy";
|
||||
config = ./cloak.lua;
|
||||
};
|
||||
|
||||
# misc
|
||||
undotree = {
|
||||
src = srcs.undotree;
|
||||
event = "VeryLazy";
|
||||
config = ''
|
||||
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
|
||||
'';
|
||||
};
|
||||
|
||||
# track my time coding
|
||||
wakatime = {
|
||||
enabled = # lua
|
||||
''
|
||||
function()
|
||||
return vim.fn.glob("~/.wakatime.cfg") ~= "" or vim.fn.glob("$WAKATIME_HOME/.wakatime.cfg") ~= ""
|
||||
end
|
||||
'';
|
||||
src = srcs.wakatime;
|
||||
event = "VeryLazy";
|
||||
paths = [ pkgs.wakatime-cli ];
|
||||
};
|
||||
|
||||
ibl = {
|
||||
src = srcs.indent-blankline;
|
||||
main = "ibl";
|
||||
config = {
|
||||
scope.enabled = false;
|
||||
exclude.filetypes = [
|
||||
"alpha"
|
||||
"fugitive"
|
||||
"help"
|
||||
"lazy"
|
||||
"NvimTree"
|
||||
"ToggleTerm"
|
||||
"LazyGit"
|
||||
"TelescopePrompt"
|
||||
"prompt"
|
||||
"code-action-menu-menu"
|
||||
"code-action-menu-warning-message"
|
||||
"Trouble"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# cool snippets saving
|
||||
sayama-nvim = {
|
||||
src = srcs.sayama-nvim;
|
||||
event = "VeryLazy";
|
||||
config.dir = "$XDG_DATA_HOME/zzz";
|
||||
};
|
||||
|
||||
freeze = {
|
||||
src = srcs.freeze-nvim;
|
||||
paths = [ pkgs.charm-freeze ];
|
||||
lazy = true;
|
||||
config = ./freeze.lua;
|
||||
};
|
||||
|
||||
# lazygit integration
|
||||
toggleterm = {
|
||||
src = srcs.toggleterm-nvim;
|
||||
event = "VeryLazy";
|
||||
paths = [ pkgs.lazygit ];
|
||||
config = # lua
|
||||
''
|
||||
function()
|
||||
require("toggleterm").setup()
|
||||
|
||||
local Terminal = require('toggleterm.terminal').Terminal
|
||||
local lazygit = Terminal:new({
|
||||
cmd = "lazygit",
|
||||
direction = "float",
|
||||
float_opts = {
|
||||
border = "rounded",
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>gg", function() lazygit:toggle() end, {noremap = true, silent = true})
|
||||
vim.keymap.set("n", "<c-t>", "<cmd>ToggleTerm<cr>", {noremap = true, silent = true})
|
||||
end
|
||||
'';
|
||||
};
|
||||
|
||||
direnv = {
|
||||
src = srcs.direnv-nvim;
|
||||
enabled = # lua
|
||||
''
|
||||
function()
|
||||
return vim.fn.executable("direnv") == 1
|
||||
end
|
||||
'';
|
||||
config.autoload_direnv = true;
|
||||
};
|
||||
|
||||
# discord integration
|
||||
cord = {
|
||||
src = pkgs.vimPlugins.cord-nvim;
|
||||
event = "VeryLazy";
|
||||
config = {
|
||||
editor.image = "https://raw.githubusercontent.com/IogaMaster/neovim/main/.github/assets/nixvim-dark.webp";
|
||||
display.swap_icons = true; # place the editor image as the main image
|
||||
};
|
||||
};
|
||||
|
||||
# deps
|
||||
plenary.src = srcs.plenary;
|
||||
|
||||
nvim-web-devicons = {
|
||||
src = srcs.nvim-web-devicons;
|
||||
config = ./nvim-web-devicons.lua;
|
||||
event = "VeryLazy";
|
||||
};
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
return function()
|
||||
require("evergarden").setup({
|
||||
transparent_background = true,
|
||||
contrast_dark = "medium", -- 'hard'|'medium'|'soft'
|
||||
override_terminal = true,
|
||||
style = {
|
||||
tabline = { reverse = true, color = "green" },
|
||||
search = { reverse = false, inc_reverse = true },
|
||||
types = { italic = true },
|
||||
keyword = { italic = true },
|
||||
comment = { italic = false },
|
||||
},
|
||||
overrides = {}, -- add custom overrides
|
||||
})
|
||||
|
||||
vim.cmd.colorscheme("evergarden")
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
return function()
|
||||
vim.keymap.set("v", "<leader>sc", "<cmd>Freeze<cr>")
|
||||
|
||||
require("freeze").setup({
|
||||
output = function()
|
||||
return vim.fn.getcwd() .. "/" .. os.date("%Y-%m-%d") .. "_freeze.png"
|
||||
end,
|
||||
config = "user",
|
||||
font = {
|
||||
family = "JetBrains Mono",
|
||||
},
|
||||
})
|
||||
end
|
|
@ -1,18 +0,0 @@
|
|||
return function()
|
||||
local harpoon = require("harpoon")
|
||||
harpoon:setup()
|
||||
|
||||
vim.keymap.set("n", "<leader>d", function()
|
||||
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||
end)
|
||||
|
||||
vim.keymap.set("n", "<leader>a", function()
|
||||
harpoon:list():add()
|
||||
end)
|
||||
|
||||
for i = 0, 4 do
|
||||
vim.keymap.set("n", "<leader>" .. i, function()
|
||||
harpoon:list():select(i)
|
||||
end)
|
||||
end
|
||||
end
|
416
plugins/lsp.lua
416
plugins/lsp.lua
|
@ -1,416 +0,0 @@
|
|||
return function()
|
||||
local lsp_present, lspconfig = pcall(require, "lspconfig")
|
||||
local cmp_present, cmp = pcall(require, "cmp")
|
||||
local navic_present, navic = pcall(require, "nvim-navic")
|
||||
local luasnip_present, luasnip = pcall(require, "luasnip")
|
||||
|
||||
if not (cmp_present and lsp_present and luasnip_present) then
|
||||
vim.notify("lsp, cmp, luasnip not present", vim.log.levels.ERROR)
|
||||
return
|
||||
end
|
||||
|
||||
vim.opt.completeopt = "menu,menuone,noselect"
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
|
||||
-- border style
|
||||
require("lspconfig.ui.windows").default_options.border = vim.g.bc.style
|
||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
|
||||
border = vim.g.bc.style,
|
||||
})
|
||||
local cmp_borders = {
|
||||
border = {
|
||||
vim.g.bc.topleft,
|
||||
vim.g.bc.horiz,
|
||||
vim.g.bc.topright,
|
||||
vim.g.bc.vert,
|
||||
vim.g.bc.botright,
|
||||
vim.g.bc.horiz,
|
||||
vim.g.bc.botleft,
|
||||
vim.g.bc.vert,
|
||||
},
|
||||
winhighlight = "Normal:CmpPmenu,FloatBorder:CmpBorder,CursorLine:PmenuSel,Search:None",
|
||||
}
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
window = {
|
||||
completion = cmp_borders,
|
||||
documentation = cmp_borders,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<CR>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
if luasnip.expandable() then
|
||||
luasnip.expand()
|
||||
else
|
||||
cmp.confirm({
|
||||
select = true,
|
||||
})
|
||||
end
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end),
|
||||
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.locally_jumpable(1) then
|
||||
luasnip.jump(1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
-- { name = "copilot" },
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "path" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "buffer" },
|
||||
}),
|
||||
formatting = {
|
||||
fields = { "kind", "abbr", "menu" },
|
||||
format = function(entry, vim_item)
|
||||
local kind = require("lspkind").cmp_format({
|
||||
mode = "symbol_text",
|
||||
ellipsis_char = "…",
|
||||
maxwidth = 50,
|
||||
symbol_map = { Copilot = "" },
|
||||
})(entry, vim_item)
|
||||
local strings = vim.split(kind.kind, "%s", { trimempty = true })
|
||||
|
||||
kind.kind = " " .. (strings[1] or "") .. " "
|
||||
kind.menu = " (" .. (strings[2] or "") .. ")"
|
||||
|
||||
return kind
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("BufRead", {
|
||||
group = vim.api.nvim_create_augroup("CmpSourceCargo", { clear = true }),
|
||||
pattern = "Cargo.toml",
|
||||
callback = function()
|
||||
cmp.setup.buffer({ sources = { { name = "crates" } } })
|
||||
end,
|
||||
})
|
||||
|
||||
cmp.setup.cmdline({ "/", "?" }, {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{ name = "buffer" },
|
||||
},
|
||||
})
|
||||
|
||||
cmp.setup.cmdline(":", {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "path", option = { trailing_slash = true } },
|
||||
}, {
|
||||
{ name = "cmdline" },
|
||||
}),
|
||||
})
|
||||
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
|
||||
callback = function(ev)
|
||||
local client = vim.lsp.get_client_by_id(ev.data.client_id)
|
||||
|
||||
if client == nil then
|
||||
return
|
||||
end
|
||||
|
||||
if navic_present and client.server_capabilities.documentSymbolProvider then
|
||||
navic.attach(client, ev.buf)
|
||||
end
|
||||
|
||||
if client.server_capabilities.inlayHintProvider then
|
||||
vim.lsp.inlay_hint.enable(true, { bufnr = ev.buf })
|
||||
end
|
||||
|
||||
local opts = { buffer = ev.buf }
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
|
||||
vim.keymap.set("n", "<C-k>", vim.lsp.buf.signature_help, opts)
|
||||
vim.keymap.set("n", "<space>rn", vim.lsp.buf.rename, opts)
|
||||
vim.keymap.set({ "n", "v" }, "<space>ca", vim.lsp.buf.code_action, opts)
|
||||
vim.keymap.set("n", "gr", vim.lsp.buf.references, opts)
|
||||
vim.keymap.set("n", "<space>fm", function()
|
||||
vim.lsp.buf.format({ async = true })
|
||||
end, opts)
|
||||
end,
|
||||
})
|
||||
|
||||
local common = { capabilities = capabilities }
|
||||
|
||||
-- setup python
|
||||
pcall(require("py_lsp").setup, common)
|
||||
|
||||
require("typescript-tools").setup({
|
||||
single_file_support = false,
|
||||
root_dir = function(fname)
|
||||
local root_dir = lspconfig.util.root_pattern("package.json", "tsconfig.json")(fname)
|
||||
|
||||
-- this is needed to make sure we don't pick up root_dir inside node_modules
|
||||
local node_modules_index = root_dir and root_dir:find("node_modules", 1, true)
|
||||
if node_modules_index and node_modules_index > 0 then
|
||||
---@diagnostic disable-next-line: need-check-nil
|
||||
root_dir = root_dir:sub(1, node_modules_index - 2)
|
||||
end
|
||||
|
||||
return root_dir
|
||||
end,
|
||||
settings = {
|
||||
expose_as_code_action = {
|
||||
"add_missing_imports",
|
||||
"fix_all",
|
||||
"remove_unused",
|
||||
},
|
||||
tsserver_path = vim.fn.resolve(vim.fn.exepath("tsserver") .. "/../../lib/node_modules/typescript/bin/tsserver"),
|
||||
},
|
||||
})
|
||||
|
||||
local servers = {
|
||||
astro = {},
|
||||
bashls = {},
|
||||
cssls = {},
|
||||
denols = {
|
||||
root_dir = lspconfig.util.root_pattern("deno.json", "deno.jsonc"),
|
||||
single_file_support = false,
|
||||
},
|
||||
dockerls = {},
|
||||
emmet_language_server = {
|
||||
filetypes = {
|
||||
"astro",
|
||||
"css",
|
||||
"eruby",
|
||||
"html",
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"less",
|
||||
"sass",
|
||||
"scss",
|
||||
"pug",
|
||||
"typescriptreact",
|
||||
},
|
||||
},
|
||||
graphql = {
|
||||
filetypes = {
|
||||
"graphql",
|
||||
"typescriptreact",
|
||||
"javascriptreact",
|
||||
"typescript",
|
||||
},
|
||||
},
|
||||
helm_ls = {},
|
||||
hls = {},
|
||||
html = {},
|
||||
intelephense = {},
|
||||
jqls = {},
|
||||
jsonls = {
|
||||
settings = {
|
||||
json = {
|
||||
schemas = require("schemastore").json.schemas(),
|
||||
validate = { enable = true },
|
||||
},
|
||||
},
|
||||
},
|
||||
lua_ls = {
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { "vim" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
ltex = {
|
||||
on_attach = function()
|
||||
require("ltex_extra").setup({
|
||||
load_langs = { "en-US", "en-GB" },
|
||||
init_check = true,
|
||||
path = vim.fn.stdpath("data") .. "/dictionary",
|
||||
})
|
||||
end,
|
||||
settings = {
|
||||
ltex = {
|
||||
language = "en-US",
|
||||
additionalRules = {
|
||||
enablePickyRules = true,
|
||||
motherTongue = "en_GB",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
marksman = {},
|
||||
nil_ls = {
|
||||
autostart = true,
|
||||
capabilities = capabilities,
|
||||
cmd = { "nil" },
|
||||
settings = {
|
||||
["nil"] = {
|
||||
formatting = {
|
||||
command = { "nixfmt" },
|
||||
},
|
||||
nix = { maxMemoryMB = nil },
|
||||
},
|
||||
},
|
||||
},
|
||||
nushell = {},
|
||||
serve_d = {},
|
||||
sourcekit = {},
|
||||
taplo = {},
|
||||
teal_ls = {},
|
||||
tailwindcss = {
|
||||
filetypes = {
|
||||
"astro",
|
||||
"javascriptreact",
|
||||
"typescriptreact",
|
||||
"html",
|
||||
"css",
|
||||
},
|
||||
},
|
||||
volar = {
|
||||
capabilities = {
|
||||
workspace = {
|
||||
didChangeWatchedFiles = {
|
||||
dynamicRegistration = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
root_dir = require("lspconfig.util").root_pattern("package.json"),
|
||||
},
|
||||
yamlls = {
|
||||
settings = {
|
||||
yaml = {
|
||||
completion = true,
|
||||
validate = true,
|
||||
suggest = {
|
||||
parentSkeletonSelectedFirst = true,
|
||||
},
|
||||
schemas = vim.tbl_extend("keep", {
|
||||
["https://json.schemastore.org/github-action"] = ".github/action.{yaml,yml}",
|
||||
["https://json.schemastore.org/github-workflow"] = ".github/workflows/*",
|
||||
["https://gitlab.com/gitlab-org/gitlab/-/raw/master/app/assets/javascripts/editor/schema/ci.json"] = "*lab-ci.{yaml,yml}",
|
||||
["https://json.schemastore.org/helmfile"] = "helmfile.{yaml,yml}",
|
||||
["https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json"] = "docker-compose.{yml,yaml}",
|
||||
["https://goreleaser.com/static/schema.json"] = ".goreleaser.{yml,yaml}",
|
||||
}, require("schemastore").yaml.schemas()),
|
||||
},
|
||||
redhat = {
|
||||
telemetry = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for server, config in pairs(servers) do
|
||||
if config == {} then
|
||||
lspconfig[server].setup(common)
|
||||
else
|
||||
lspconfig[server].setup(vim.tbl_extend("force", common, config))
|
||||
end
|
||||
end
|
||||
|
||||
-- null ls stuff
|
||||
local null_present, null = pcall(require, "null-ls")
|
||||
|
||||
if not null_present then
|
||||
return
|
||||
end
|
||||
|
||||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
||||
|
||||
local sources = {
|
||||
-- general
|
||||
null.builtins.formatting.treefmt.with({
|
||||
condition = function(utils)
|
||||
return utils.root_has_file("treefmt.toml")
|
||||
end,
|
||||
}),
|
||||
|
||||
-- nix
|
||||
null.builtins.formatting.nixfmt,
|
||||
null.builtins.diagnostics.statix,
|
||||
null.builtins.diagnostics.deadnix,
|
||||
|
||||
-- go
|
||||
null.builtins.formatting.gofumpt,
|
||||
|
||||
-- webdev
|
||||
null.builtins.formatting.prettier.with({
|
||||
filetypes = {
|
||||
"html",
|
||||
"astro",
|
||||
"vue",
|
||||
},
|
||||
}),
|
||||
|
||||
-- shell
|
||||
null.builtins.formatting.shfmt,
|
||||
|
||||
-- lua
|
||||
null.builtins.formatting.stylua,
|
||||
|
||||
-- docs
|
||||
null.builtins.diagnostics.alex,
|
||||
null.builtins.diagnostics.proselint,
|
||||
}
|
||||
|
||||
null.setup({
|
||||
sources = sources,
|
||||
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,
|
||||
filter = function(c)
|
||||
return c.name == "null-ls"
|
||||
end,
|
||||
})
|
||||
end,
|
||||
})
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
local toggle_formatters = function()
|
||||
null.toggle({ methods = null.methods.FORMATTING })
|
||||
end
|
||||
|
||||
vim.api.nvim_create_user_command("ToggleFormatters", toggle_formatters, {})
|
||||
|
||||
-- setup go stuff
|
||||
require("go").setup({
|
||||
disable_defaults = false,
|
||||
icons = {
|
||||
breakpoint = " ",
|
||||
currentpos = " ",
|
||||
},
|
||||
trouble = true,
|
||||
luasnip = true,
|
||||
dap_debug_keymap = false,
|
||||
lsp_cfg = false,
|
||||
lsp_keymaps = false,
|
||||
lsp_inlay_hints = {
|
||||
enable = true,
|
||||
style = "inlay",
|
||||
},
|
||||
})
|
||||
|
||||
require("lspconfig").gopls.setup(require("go.lsp").config())
|
||||
end
|
|
@ -1,45 +0,0 @@
|
|||
return function()
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = "auto",
|
||||
component_separators = { left = "", right = "" },
|
||||
section_separators = { left = "", right = "" },
|
||||
always_divide_middle = true,
|
||||
globalstatus = true,
|
||||
refresh = {
|
||||
statusline = 1000,
|
||||
tabline = 1000,
|
||||
winbar = 1000,
|
||||
},
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { "mode" },
|
||||
lualine_b = { "branch", "diff", "diagnostics" },
|
||||
lualine_c = { "searchcount" },
|
||||
lualine_x = { "filetype" },
|
||||
lualine_y = { "progress" },
|
||||
lualine_z = { "location" },
|
||||
},
|
||||
tabline = {},
|
||||
winbar = {
|
||||
lualine_c = { "navic" },
|
||||
lualine_x = {
|
||||
{
|
||||
function()
|
||||
return " "
|
||||
end,
|
||||
cond = function()
|
||||
local present, navic = pcall(require, "nvim-navic")
|
||||
if not present then
|
||||
return false
|
||||
end
|
||||
return navic.is_available()
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
inactive_winbar = {},
|
||||
extensions = {},
|
||||
})
|
||||
end
|
|
@ -1,29 +0,0 @@
|
|||
return function()
|
||||
local p = require("markview.presets")
|
||||
|
||||
require("markview").setup({
|
||||
-- allows us to use hybrid mode
|
||||
modes = { "n", "i", "no", "c" },
|
||||
hybrid_modes = { "i" },
|
||||
callbacks = {
|
||||
on_enable = function(_, win)
|
||||
vim.wo[win].conceallevel = 2
|
||||
vim.wo[win].concealcursor = "nc"
|
||||
end,
|
||||
},
|
||||
|
||||
headings = p.headings.glow,
|
||||
checkboxes = p.checkboxes.nerd,
|
||||
horizontal_rules = p.horizontal_rules.thin,
|
||||
code_blocks = {
|
||||
pad_amount = 1,
|
||||
},
|
||||
list_items = {
|
||||
-- indent_size = 0,
|
||||
marker_minus = { add_padding = false },
|
||||
marker_plus = { add_padding = false },
|
||||
marker_star = { add_padding = false },
|
||||
marker_dot = { add_padding = false },
|
||||
},
|
||||
})
|
||||
end
|
|
@ -1,44 +0,0 @@
|
|||
return function()
|
||||
local ctp_present, ctp_pallets = pcall(require, "catppuccin.palettes")
|
||||
|
||||
if ctp_present then
|
||||
local C = ctp_pallets.get_palette()
|
||||
|
||||
local justfile = {
|
||||
icon = "",
|
||||
name = "Justfile",
|
||||
color = C.peach,
|
||||
}
|
||||
|
||||
require("nvim-web-devicons").setup({
|
||||
override_by_filename = {
|
||||
[".ecrc"] = {
|
||||
icon = "",
|
||||
name = "EditorConfigChecker",
|
||||
color = C.green,
|
||||
},
|
||||
[".envrc"] = {
|
||||
icon = "",
|
||||
name = "envrc",
|
||||
color = C.yellow,
|
||||
},
|
||||
[".editorconfig"] = {
|
||||
icon = "",
|
||||
name = "EditorConfig",
|
||||
color = C.green,
|
||||
},
|
||||
[".luacheckrc"] = {
|
||||
icon = "",
|
||||
name = "LuacheckRC",
|
||||
color = C.blue,
|
||||
},
|
||||
[".Justfile"] = justfile,
|
||||
[".justfile"] = justfile,
|
||||
["Justfile"] = justfile,
|
||||
["justfile"] = justfile,
|
||||
},
|
||||
})
|
||||
else
|
||||
require("nvim-web-devicons").setup()
|
||||
end
|
||||
end
|
|
@ -1,22 +0,0 @@
|
|||
return function()
|
||||
require("obsidian").setup({
|
||||
workspaces = {
|
||||
{
|
||||
name = "default",
|
||||
path = "~/Documents/obsidian",
|
||||
},
|
||||
{
|
||||
name = "default",
|
||||
path = "~/documents/obsidian",
|
||||
},
|
||||
{
|
||||
name = "cssuffering",
|
||||
path = "~/dev/cssuffering/notes",
|
||||
},
|
||||
},
|
||||
completion = {
|
||||
min_chars = 2,
|
||||
nvim_cmp = true,
|
||||
},
|
||||
})
|
||||
end
|
|
@ -1,117 +0,0 @@
|
|||
return function()
|
||||
local bc = vim.g.bc
|
||||
|
||||
local no_preview = function(opts)
|
||||
local defaults = require("telescope.themes").get_dropdown({
|
||||
-- stylua: ignore
|
||||
borderchars = {
|
||||
{ bc.horiz, bc.vert, bc.horiz, bc.vert, bc.topleft, bc.topright, bc.botright, bc.botleft },
|
||||
prompt = { bc.horiz, bc.vert, " ", bc.vert, bc.topleft, bc.topright, bc.vert, bc.vert },
|
||||
results = { bc.horiz, bc.vert, bc.horiz, bc.vert, bc.vertright, bc.vertleft, bc.botright, bc.botleft },
|
||||
preview = { bc.horiz, bc.vert, bc.horiz, bc.vert, bc.topleft, bc.topright, bc.botright, bc.botleft },
|
||||
},
|
||||
width = 0.8,
|
||||
previewer = false,
|
||||
prompt_title = false,
|
||||
results_title = false,
|
||||
})
|
||||
return vim.tbl_deep_extend("keep", opts or {}, defaults)
|
||||
end
|
||||
|
||||
local telescope = require("telescope")
|
||||
local project_actions = require("telescope._extensions.project.actions")
|
||||
|
||||
telescope.load_extension("fzf")
|
||||
telescope.load_extension("project")
|
||||
telescope.load_extension("ui-select")
|
||||
|
||||
telescope.setup({
|
||||
defaults = {
|
||||
prompt_prefix = " ",
|
||||
selection_caret = " ",
|
||||
multi_icon = "│",
|
||||
file_ignore_patterns = {
|
||||
"%.npz",
|
||||
"%.pyc",
|
||||
"%.luac",
|
||||
"%.ipynb",
|
||||
"vendor/*",
|
||||
"%.lock",
|
||||
"__pycache__/*",
|
||||
"%.sqlite3",
|
||||
"%.ipynb",
|
||||
"node_modules/*",
|
||||
"%.min.js",
|
||||
"%.jpg",
|
||||
"%.jpeg",
|
||||
"%.png",
|
||||
"%.age",
|
||||
"%.svg",
|
||||
"%.otf",
|
||||
"%.ttf",
|
||||
"\\.git/",
|
||||
"%.webp",
|
||||
"\\.dart_tool/",
|
||||
"\\.gradle/",
|
||||
"\\.idea/",
|
||||
"\\.settings/",
|
||||
"\\.vscode/",
|
||||
"__pycache__/",
|
||||
"build/",
|
||||
"env/",
|
||||
"gradle/",
|
||||
"node_modules/",
|
||||
"target/",
|
||||
"%.pdb",
|
||||
"%.dll",
|
||||
"%.class",
|
||||
"%.exe",
|
||||
"%.so",
|
||||
"%.cache",
|
||||
"%.ico",
|
||||
"%.pdf",
|
||||
"%.dylib",
|
||||
"%.jar",
|
||||
"%.docx",
|
||||
"%.met",
|
||||
"smalljre_*/*",
|
||||
"\\.vale/",
|
||||
"_sources/",
|
||||
"tmp/",
|
||||
},
|
||||
-- stylua: ignore
|
||||
borderchars = { bc.horiz, bc.vert, bc.horiz, bc.vert, bc.topleft, bc.topright, bc.botright, bc.botleft },
|
||||
},
|
||||
pickers = {
|
||||
find_files = no_preview(),
|
||||
live_grep = no_preview({
|
||||
previewer = true,
|
||||
}),
|
||||
load_session = no_preview(),
|
||||
},
|
||||
extensions = {
|
||||
["ui-select"] = no_preview(),
|
||||
fzf = {
|
||||
fuzzy = true,
|
||||
override_generic_sorter = true,
|
||||
override_file_sorter = true,
|
||||
case_mode = "smart_case",
|
||||
},
|
||||
project = {
|
||||
search_by = { "path", "title" },
|
||||
hidden_files = true, -- default: false
|
||||
sync_with_nvim_tree = true, -- default false
|
||||
base_dirs = {
|
||||
{ "~/dev/aur/", max_depth = 2 },
|
||||
{ "~/dev/ctp/", max_depth = 1 },
|
||||
{ "~/dev/cssuffering/", max_depth = 1 },
|
||||
{ "~/dev/public/", max_depth = 1 },
|
||||
{ "~/dev/private/", max_depth = 1 },
|
||||
},
|
||||
on_project_selected = function(prompt_bufnr)
|
||||
project_actions.change_working_directory(prompt_bufnr, false)
|
||||
end,
|
||||
},
|
||||
},
|
||||
})
|
||||
end
|
|
@ -1,17 +0,0 @@
|
|||
return function()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
auto_install = false,
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
rainbow = {
|
||||
enable = true,
|
||||
extended_mode = true,
|
||||
max_file_lines = 8192,
|
||||
},
|
||||
})
|
||||
vim.o.foldmethod = "expr"
|
||||
vim.o.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
vim.o.foldenable = false
|
||||
end
|
|
@ -1,16 +0,0 @@
|
|||
return function()
|
||||
local trouble = require("trouble")
|
||||
trouble.setup({})
|
||||
|
||||
vim.keymap.set("n", "<leader>tt", function()
|
||||
trouble.toggle()
|
||||
end, { noremap = true, silent = true })
|
||||
|
||||
vim.keymap.set("n", "[d", function()
|
||||
trouble.next({ skip_groups = true, jump = true })
|
||||
end, { noremap = true, silent = true })
|
||||
|
||||
vim.keymap.set("n", "]d", function()
|
||||
trouble.previous({ skip_groups = true, jump = true })
|
||||
end, { noremap = true, silent = true })
|
||||
end
|
Loading…
Add table
Reference in a new issue