tangled
alpha
login
or
join now
ngp.computer
/
nixos
Configuration for my NixOS based systems and Home Manager
0
fork
atom
overview
issues
pulls
pipelines
Use noirbuddy, autoformat, more lazy
ngp.computer
1 year ago
e835e755
f4326ace
+47
-33
2 changed files
expand all
collapse all
unified
split
nvim
init.lua
lua
plugins.lua
+29
-18
nvim/init.lua
···
11
11
-- vim.g.nord_italic = false
12
12
-- vim.g.nord_bold = false
13
13
-- vim.opt.background = "light"
14
14
-
vim.opt.background = "dark"
14
14
+
--vim.opt.background = "dark"
15
15
16
16
-- Formatting and vim config
17
17
vim.opt.expandtab = true
18
18
vim.opt.tabstop = 4
19
19
vim.opt.shiftwidth = 4
20
20
-
vim.opt.termguicolors = true
20
20
+
--vim.opt.termguicolors = true
21
21
vim.opt.cursorcolumn = true
22
22
vim.opt.cursorline = true
23
23
vim.opt.hidden = true
···
29
29
vim.opt.wrap = false
30
30
vim.opt.mouse = vim.opt.mouse - "a"
31
31
-- TODO: revisit this
32
32
-
vim.opt.foldlevelstart = 20
33
33
-
vim.opt.conceallevel = 3
32
32
+
--vim.opt.foldlevelstart = 20
33
33
+
--vim.opt.conceallevel = 3
34
34
-- Show whitespace as dots
35
35
vim.opt.lcs = vim.opt.lcs + "space:·"
36
36
vim.opt.list = true
37
37
vim.opt.textwidth = 88
38
38
39
39
-- LuaLine Config
40
40
-
require("lualine").setup({options = {icons_enabled = true, theme = "auto"}})
40
40
+
41
41
+
local noirbuddy_lualine = require("noirbuddy.plugins.lualine")
42
42
+
43
43
+
require("lualine").setup {
44
44
+
options = {
45
45
+
icons_enabled = true,
46
46
+
--theme = "auto"
47
47
+
theme = noirbuddy_lualine.theme
48
48
+
},
49
49
+
sections = noirbuddy_lualine.sections,
50
50
+
inactive_sections = noirbuddy_lualine.inactive_sections,
51
51
+
}
41
52
42
53
-- CTags
43
54
vim.opt.tags = vim.opt.tags + vim.fn.expand("~/.local/tmp/ctags") +
44
44
-
vim.fn.expand("~/repos/gerbil/src/TAGS")
55
55
+
vim.fn.expand("~/repos/gerbil/src/TAGS")
45
56
46
57
-- Conjure
47
58
···
71
82
72
83
-- KEYMAPS
73
84
local keymap = vim.keymap.set
74
74
-
local noremap = {noremap = true}
75
75
-
local silentnoremap = {noremap = true, silent = true}
85
85
+
local noremap = { noremap = true }
86
86
+
local silentnoremap = { noremap = true, silent = true }
76
87
-- Easier breaking from edit modes
77
88
keymap("n", ";;", "<Esc>", noremap)
78
89
keymap("v", ";;", "<Esc>", noremap)
···
124
135
keymap("n", "<Right>", "zl", silentnoremap)
125
136
126
137
-- Telescope
127
127
-
keymap({"n", "i", "v"}, "<C-t>", "<cmd>Telescope<CR>", silentnoremap)
138
138
+
keymap({ "n", "i", "v" }, "<C-t>", "<cmd>Telescope<CR>", silentnoremap)
128
139
129
140
-- LSP Documentation viewer
130
141
keymap("n", "K", "<cmd>lua vim.lsp.buf.hover()<CR>", silentnoremap)
131
142
132
143
-- Autoformat!
133
144
vim.api.nvim_create_user_command("Format", function(args)
134
134
-
local range = nil
135
135
-
if args.count ~= -1 then
136
136
-
local end_line = vim.api.nvim_buf_get_lines(0, args.line2 - 1, args.line2, true)[1]
137
137
-
range = {
138
138
-
start = { args.line1, 0 },
139
139
-
["end"] = { args.line2, end_line:len() },
140
140
-
}
141
141
-
end
142
142
-
require("conform").format({ async = true, lsp_format = "fallback", range = range })
145
145
+
local range = nil
146
146
+
if args.count ~= -1 then
147
147
+
local end_line = vim.api.nvim_buf_get_lines(0, args.line2 - 1, args.line2, true)[1]
148
148
+
range = {
149
149
+
start = { args.line1, 0 },
150
150
+
["end"] = { args.line2, end_line:len() },
151
151
+
}
152
152
+
end
153
153
+
require("conform").format({ async = true, lsp_format = "fallback", range = range })
143
154
end, { range = true })
144
155
keymap("n", "<C-n>", "<cmd>Format<CR>", silentnoremap)
145
156
+18
-15
nvim/lua/plugins.lua
···
37
37
dependencies = {
38
38
'tjdevries/colorbuddy.nvim',
39
39
},
40
40
-
lazy = false,
41
41
-
priority = 1000,
40
40
+
lazy = true,
41
41
+
--priority = 1000,
42
42
opts = {
43
43
-- All of your `setup(opts)` will go here
44
44
-
preset = "oxide",
44
44
+
preset = "slate",
45
45
},
46
46
},
47
47
-
-- show indents and whitespace characters
48
48
-
"lukas-reineke/indent-blankline.nvim", -- Completion
49
47
-- Completion
50
48
{
51
49
"hrsh7th/nvim-cmp",
···
62
60
{
63
61
"neovim/nvim-lspconfig",
64
62
},
63
63
+
-- LSP Goodness
65
64
{
66
66
-
"nvimdev/lspsaga.nvim",
65
65
+
"ray-x/navigator.lua",
67
66
dependencies = {
68
68
-
"nvim-tree/nvim-web-devicons", "nvim-treesitter/nvim-treesitter"
69
69
-
},
70
70
-
opts = { lightbulb = { enable = false } },
71
71
-
event = "LspAttach"
67
67
+
{ 'ray-x/guihua.lua', build = 'cd lua/fzy && make' },
68
68
+
{ 'neovim/nvim-lspconfig' },
69
69
+
}
70
70
+
72
71
},
73
72
{
74
73
-- Syntax Highlighting from the future
···
92
91
"nvim-treesitter/nvim-treesitter-textobjects",
93
92
"nvim-treesitter/nvim-treesitter-context",
94
93
},
95
95
-
}, -- Git stuff
94
94
+
}, -- Git stuff
96
95
-- GitGutter, shows inline difs
97
97
-
"airblade/vim-gitgutter", -- "tpope/vim-fugitive", -- old git command
96
96
+
"airblade/vim-gitgutter",
97
97
+
-- "tpope/vim-fugitive", -- old git command
98
98
{
99
99
"NeogitOrg/neogit",
100
100
dependencies = {
···
145
145
"nvim-lualine/lualine.nvim",
146
146
dependencies = { "nvim-tree/nvim-web-devicons" }
147
147
},
148
148
+
-- Fuzzy finding stuff
148
149
"junegunn/fzf.vim",
149
150
{
150
151
dir = "~/.fzf",
···
179
180
"folke/lazydev.nvim",
180
181
config = true,
181
182
ft = "lua",
183
183
+
lazy = true,
182
184
opts = {
183
185
library = {
184
186
path = "luvit-meta/library", words = { "vim%.uv" },
···
204
206
pairs.get_rules("'")[1].not_filetypes = { "clojure", "scheme", "scm", "janet", "rust" }
205
207
end,
206
208
},
209
209
+
-- This gives me the paredit engine, it's pretty nifty
207
210
{
208
211
"gpanders/nvim-parinfer",
209
212
ft = { "hy", "scheme", "scm", "clojure", "fennel", "janet", "lisp", "python", "lua" },
···
211
214
vim.g.parinfer_comment_chars = { ";", "#" }
212
215
vim.g.parinfer_force_balance = true
213
216
end
214
214
-
},
215
215
-
-- ))))))
217
217
+
}, -- ))))))
218
218
+
-- This one gives me vim-sexp like structural editing
216
219
{
217
220
"julienvincent/nvim-paredit",
218
221
config = function()
···
371
374
lazy = true,
372
375
cmd = "SupermavenStart"
373
376
},
374
374
-
"imsnif/kdl.vim",
377
377
+
{ "imsnif/kdl.vim", lazy = true, ft = "kdl" },
375
378
{
376
379
"epwalsh/obsidian.nvim",
377
380
lazy = true,