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