-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.nix
105 lines (102 loc) · 2.68 KB
/
ui.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
# Plugins enchancing or tweaking the UI, nothing major.
# I tried to put the most controversial stuff up top for
# ease of deletion by enraged viewer.
{ plugins, utils, theme, ... }: with plugins; with utils;
[
# Tabbar. Yes, I want to see tabs.
# Just like in a _browser_. Fight me.
# https://github.com/romgrk/barbar.nvim
{
plugin = barbar-nvim;
config = vimscript ''
nnoremap <silent> <C-j> <Cmd>BufferPrevious<CR>
nnoremap <silent> <C-k> <Cmd>BufferNext<CR>
nnoremap <silent> <C-c> <Cmd>BufferClose<CR>
nnoremap <silent> <C-p> <Cmd>BufferPick<CR>
'';
}
# Notifications. Look, just hear me out...
# https://github.com/rcarriga/nvim-notify
{
plugin = nvim-notify;
config = lua ''
vim.o.termguicolors = true
require('notify').setup({})
'';
}
# Show available options if you hang around indecisively
# after starting a multi-key edit sequence
# https://github.com/folke/which-key.nvim
{
plugin = which-key-nvim;
config = genericConfig "which-key";
}
# Dims inactive windows slightly
# https://github.com/TaDaa/vimade
# {
# plugin = vimade;
# config = vimscript ''
# set termguicolors
# let g:vimade = {}
# let g:vimade.fadelevel = 0.7
# let g:vimade.enablesigns = 1
# '';
# }
# Highlight changed lines in gutter
# https://github.com/lewis6991/gitsigns.nvim
{
plugin = gitsigns-nvim;
config = lua ''
require('gitsigns').setup({
on_attach = function(bufnr)
local gs = package.loaded.gitsigns
local map = vim.keymap.set
-- Jump to next change
map('n', ']c', function()
if vim.wo.diff then return ']c' end
vim.schedule(function() gs.next_hunk() end)
return '<Ignore>'
end, { expr = true })
-- Jump to previous change
map('n', '[c', function()
if vim.wo.diff then return '[c' end
vim.schedule(function() gs.prev_hunk() end)
return '<Ignore>'
end, { expr = true })
end
})
'';
}
# Statusline glow-up
# https://github.com/feline-nvim/feline.nvim
{
plugin = feline-nvim;
config = genericConfig "feline";
}
{
plugin = nvim-web-devicons;
}
# General UI glow-up
# https://github.com/stevearc/dressing.nvim
dressing-nvim
{
plugin = stabilize-nvim;
config = genericConfig "stabilize";
}
] ++
(
if isNull theme then
[{
plugin = nord-nvim;
config = vimscript ''
colorscheme nord
'';
}]
else
[{
plugin = nvim-base16;
config = lua ''
require('base16-colorscheme').setup(${utils.themeToLua theme})
'';
}]
)