-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsyntax.nix
105 lines (101 loc) · 2.72 KB
/
syntax.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
{ pkgs, ... }: {
# tree-sitter binary is not needed
binaries = [];
lazy = with pkgs.vimPlugins; let
grammarsPath = pkgs.symlinkJoin {
name = "nvim-treesitter-grammars";
paths = nvim-treesitter.withAllGrammars.dependencies;
}; in
# lua
''
{
dir = "${catppuccin-nvim}",
name = "catppuccin",
priority = 1000,
config = function ()
require("catppuccin").setup({
flavour = "mocha",
dim_inactive = {
enabled = true,
},
})
vim.cmd.colorscheme("catppuccin")
end
},
{
dir = "${nvim-treesitter}",
name = "nvim-treesitter",
config = function ()
vim.opt.runtimepath:append("${nvim-treesitter}")
vim.opt.runtimepath:append("${grammarsPath}")
require("nvim-treesitter.configs").setup {
-- they are managed by nix
auto_install = false,
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
indent = { enable = true },
}
end
},
{
-- TODO: check if this can be lazy loaded
dir = "${nvim-cursorline}",
name = "nvim-cursorline",
opts = {},
},
{
dir = "${indent-blankline-nvim}",
name = "indent-blankline",
main = "ibl",
event = "VeryLazy",
---@module "ibl"
---@type ibl.config
opts = {},
},
{
dir = "${gitsigns-nvim}",
name = "gitsigns",
event = "VeryLazy",
opts = {
current_line_blame = true,
},
},
{
dir = "${vim-sleuth}",
name = "sleuth",
},
{
dir = "${leap-nvim}",
name = "leap",
-- plugin lazy loads itself
keys = {
{ "s", "<Plug>(leap)", desc = "global leap" },
{ "S", "<Plug>(leap-from-window)", desc = "leap from window" },
},
},
{
dir = "${whitespace-nvim}",
name = "whitespace",
event = "VeryLazy",
config = function ()
local whitespace = require("whitespace-nvim")
whitespace.setup({
ignored_filetypes = {
'TelescopePrompt',
-- ignore results aswell for smart-open
-- https://github.com/johnfrankmorgan/whitespace.nvim/issues/14
'TelescopeResults',
-- trailing whitespace is used for linebreaks
'markdown',
'Trouble',
'help',
'dashboard',
},
})
vim.keymap.set('n', '<Leader>t', whitespace.trim)
end
},
'';
}