Skip to content

Commit c6dac28

Browse files
committed
Initial nvf release
Update Readme Enable completion merge Add dap Configure Rust/go/c# dap Configure plugins Add flash.nvim Configure Cmp window Configure Base16 theme Configure Theme in Flake Remove unused which key entries Extract build package into function Update Readme Update Readme Add license Change keywordlength in cmp Remove insert leader mappings add Haskell Tools Update to new which key registration spec Add keybind mapping possibility Add nixos Module Fix nixosModule Add inlay hint toggle Remove fsautocomplete due to ionide Add 5 level fsautocomplete Move references to telescope Add browser command Add f# support remove autocmd Remove autoinit Change to nixfmt Change nixfmt to nixfmt-classic Add overseer Add overseer Init overseer autocmd Change to nil Use async path Change formatter Change back to nixd Fix descriptions Add telescope break Disable swapfile Add neovide scaling try fs Add nvim scrollbar Add fidget Add lsp borders Format lua Treesitter and noice improvements Move grammars to all nix packages Update to newest nixvim Add docs Update nixvim add darwin Remove firefox as default browser Change window movement Update Ionide Update Ionide-nvim Change to blink.cmp Improve cmp Improve keybinds Enable smartcase Add markview Configure instant.nvim Add live-share Update pkgs Update noice config Update score offset for blink Update packages Add default packages Disable inlay hints at startup Add gleam Ignore tools dir in fsac Enable ghost text for cmp update plugins disable ruby lsp temp Update neogit Update all plugins Add easy-dotnet Add easy-dotnet Add angularls Update nixvim Add roslyn.nvim and ng.nvim Disable lldb Add fantomas to conform Reenable fixed packages Use alejandra formatter chore(base): Move to nvf chore(packages): Temporarily disable roslyn chore(autocmds): Move ftplugins to autocmds chore(readme): Add nvf chore: Remove superfluous comments feature(dap): Add chromium dap chore(angular): Disable ts references for angular feature(binds): Ensure all keybinds are configurable
1 parent 9e7f7fe commit c6dac28

57 files changed

Lines changed: 4783 additions & 997 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.github/workflows/docs.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# by https://github.com/danth/stylix/blob/master/.github/workflows/docs.yml
2+
name: Docs
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
build:
11+
name: Build
12+
13+
permissions:
14+
contents: read
15+
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Install Nix
20+
uses: DeterminateSystems/nix-installer-action@main
21+
with:
22+
github-token: ${{ secrets.GITHUB_TOKEN }}
23+
extra-conf: |
24+
extra-experimental-features = nix-command flakes
25+
26+
- name: Set up cache
27+
uses: DeterminateSystems/magic-nix-cache-action@main
28+
29+
- name: Build docs
30+
run: nix -L build github:${{ github.repository }}/${{ github.sha }}#docs
31+
32+
- name: Prepare docs for upload
33+
run: cp -r --dereference --no-preserve=mode,ownership result/ public/
34+
35+
- name: Upload artifact
36+
uses: actions/upload-pages-artifact@v3
37+
with:
38+
path: public/
39+
40+
deploy:
41+
name: Deploy
42+
43+
needs: build
44+
45+
permissions:
46+
pages: write
47+
id-token: write
48+
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
53+
runs-on: ubuntu-latest
54+
55+
steps:
56+
- name: Deploy docs to GitHub Pages
57+
id: deployment
58+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
result
2+
.direnv/

LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docs/src/README.md

config/.luarc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"diagnostics.globals": [
3+
"vim"
4+
]
5+
}

config/autocmds.nix

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
{
2+
lib,
3+
config',
4+
...
5+
}: {
6+
vim.augroups = [
7+
{name = "custom_theme ";}
8+
{name = "highlight_yank";}
9+
{name = "resize";}
10+
{name = "neotree";}
11+
{name = "filetypes";}
12+
];
13+
vim.autocmds = [
14+
{
15+
desc = "Roslyn init";
16+
event = ["FileType"];
17+
group = "filetypes";
18+
pattern = ["cs"];
19+
callback =
20+
lib.generators.mkLuaInline
21+
/*
22+
lua
23+
*/
24+
''
25+
function()
26+
require("easy-dotnet").setup()
27+
require("roslyn").setup({
28+
exe = 'Microsoft.CodeAnalysis.LanguageServer',
29+
})
30+
end'';
31+
}
32+
{
33+
desc = "Haskell mappings";
34+
event = ["FileType"];
35+
group = "filetypes";
36+
pattern = ["haskell"];
37+
callback = lib.mkIf config'.useDefaultKeybinds (
38+
lib.generators.mkLuaInline
39+
/*
40+
lua
41+
*/
42+
''
43+
function()
44+
local ht = require('haskell-tools')
45+
local bufnr = vim.api.nvim_get_current_buf()
46+
vim.keymap.set('n', '<leader>cE', ht.hoogle.hoogle_signature, {desc = "hoogle signature", buffer = bufnr})
47+
-- Evaluate all code snippets
48+
vim.keymap.set('n', '<leader>cS', ht.lsp.buf_eval_all, {desc = "evaluate", buffer = bufnr})
49+
end''
50+
);
51+
}
52+
{
53+
desc = "Neotree directory";
54+
event = ["BufEnter"];
55+
group = "neotree";
56+
pattern = ["*"];
57+
callback =
58+
lib.generators.mkLuaInline
59+
/*
60+
lua
61+
*/
62+
''
63+
function()
64+
if package.loaded["neo-tree"] then
65+
return
66+
else
67+
local stats = vim.uv.fs_stat(vim.fn.argv(0))
68+
if stats and stats.type == "directory" then
69+
require("neo-tree")
70+
end
71+
end
72+
end'';
73+
}
74+
{
75+
desc = "yank highlight";
76+
event = ["TextYankPost"];
77+
group = "highlight_yank";
78+
pattern = ["*"];
79+
callback =
80+
lib.generators.mkLuaInline
81+
/*
82+
lua
83+
*/
84+
''
85+
function()
86+
vim.highlight.on_yank()
87+
end'';
88+
}
89+
{
90+
desc = "Resize splits";
91+
event = ["VimResized"];
92+
group = "resize";
93+
pattern = ["*"];
94+
callback =
95+
lib.generators.mkLuaInline
96+
/*
97+
lua
98+
*/
99+
''
100+
function()
101+
local current_tab = vim.fn.tabpagenr()
102+
vim.cmd("tabdo wincmd =")
103+
vim.cmd("tabnext " .. current_tab)
104+
end'';
105+
}
106+
{
107+
desc = "Disable lsp-lines by default";
108+
event = ["BufEnter"];
109+
group = "filetypes";
110+
pattern = ["*"];
111+
callback =
112+
lib.generators.mkLuaInline
113+
/*
114+
lua
115+
*/
116+
''
117+
function()
118+
vim.diagnostic.config({ virtual_lines = false })
119+
end'';
120+
}
121+
{
122+
desc = "Add typst as filetype";
123+
event = ["BufEnter"];
124+
group = "filetypes";
125+
pattern = ["*"];
126+
callback =
127+
lib.generators.mkLuaInline
128+
/*
129+
lua
130+
*/
131+
''
132+
function()
133+
vim.filetype.add({
134+
extension = {
135+
typst = "typst",
136+
typ = "typst",
137+
},
138+
})
139+
end'';
140+
}
141+
{
142+
desc = "Init lua";
143+
event = ["BufEnter"];
144+
group = "filetypes";
145+
pattern = ["*.lua"];
146+
callback =
147+
lib.generators.mkLuaInline
148+
/*
149+
lua
150+
*/
151+
''
152+
function()
153+
vim.opt_local.expandtab = true
154+
vim.opt_local.softtabstop = 4
155+
vim.opt_local.shiftwidth = 4
156+
vim.opt_local.formatoptions:append({ c = true, r = true, o = true, q = true })
157+
end'';
158+
}
159+
# TODO
160+
# {
161+
# desc = "Init Nvim-colorizer";
162+
# event = ["BufEnter"];
163+
# group = "filetypes";
164+
# pattern = ["*"];
165+
# callback =
166+
# lib.generators.mkLuaInline
167+
# /*
168+
# lua
169+
# */
170+
# ''
171+
# function()
172+
# vim.cmd("ColorizerToggle")
173+
# end
174+
# '';
175+
# }
176+
];
177+
}

config/base.nix

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
{
2+
lib,
3+
config',
4+
mkDashDefault,
5+
...
6+
}: {
7+
vim = {
8+
clipboard = mkDashDefault {
9+
enable = true;
10+
providers.wl-copy.enable = true;
11+
registers = "unnamedplus";
12+
};
13+
14+
lineNumberMode = mkDashDefault "number";
15+
16+
globals = lib.attrsets.mapAttrs (name: value: mkDashDefault value) {
17+
fileencoding = "utf-8";
18+
spelllang = "en_us";
19+
shell = "fish";
20+
mapleader = " ";
21+
autoformat = false;
22+
gitblame_enabled = false;
23+
clear_background = true;
24+
loaded_netrw = true;
25+
loaded_netrwPlugin = true;
26+
mkdp_auto_start = true;
27+
neovide_refresh_rate = 180;
28+
neovide_refresh_rate_idle = 5;
29+
neovide_hide_mouse_when_typing = true;
30+
instant_username = config'.instantUsername;
31+
};
32+
33+
options = lib.attrsets.mapAttrs (name: value: mkDashDefault value) {
34+
swapfile = true;
35+
wrap = false;
36+
showmode = true;
37+
scrolloff = 5;
38+
scrolljump = 5;
39+
relativenumber = false;
40+
guifont = "JetBrainsMono Nerd Font:h14";
41+
foldenable = false;
42+
foldmethod = "manual";
43+
termguicolors = true;
44+
smartcase = true;
45+
ignorecase = true;
46+
number = true;
47+
shell = "fish";
48+
};
49+
50+
enableLuaLoader = mkDashDefault true;
51+
52+
binds.whichKey = mkDashDefault {
53+
enable = true;
54+
};
55+
56+
ui = {
57+
noice = mkDashDefault {
58+
enable = true;
59+
};
60+
61+
borders = mkDashDefault {
62+
enable = true;
63+
globalStyle = "rounded";
64+
};
65+
illuminate.enable = mkDashDefault true;
66+
};
67+
utility.snacks-nvim = mkDashDefault {
68+
enable = true;
69+
setupOpts = {
70+
bigfile.enabled = true;
71+
input.enabled = true;
72+
picker.enabled = true;
73+
};
74+
};
75+
76+
visuals.rainbow-delimiters.enable = mkDashDefault true;
77+
extraLuaFiles =
78+
[
79+
./lua/yankAndPaste.lua
80+
./lua/dap.lua
81+
]
82+
++ config'.additionalLuaConfigFiles;
83+
};
84+
}

0 commit comments

Comments
 (0)