File tree Expand file tree Collapse file tree 12 files changed +366
-4
lines changed Expand file tree Collapse file tree 12 files changed +366
-4
lines changed Original file line number Diff line number Diff line change 11{ pkgs , ... } :
22{
3+ imports = [ ./nixvim ] ;
4+
35 home . packages = with pkgs ; [
46 fd
57 fnm
7375 programs . gpg . enable = true ;
7476 programs . lazygit . enable = true ;
7577 programs . lsd . enable = true ;
76- programs . nixvim = {
77- enable = true ;
78- } ;
7978 programs . password-store = {
8079 enable = true ;
8180 settings = {
Original file line number Diff line number Diff line change 1+ {
2+ programs . nixvim = {
3+ colorschemes = {
4+ base16 = {
5+ enable = true ;
6+ colorscheme = "dracula" ;
7+ } ;
8+ } ;
9+ } ;
10+ }
Original file line number Diff line number Diff line change 1+ {
2+ programs . nixvim = {
3+ plugins . bufferline . enable = true ;
4+ keymaps = [
5+ {
6+ key = "<leader>bo" ;
7+ action = "<Cmd>BufferLineCloseOthers<CR>" ;
8+ options = {
9+ desc = "Delete Other Buffers" ;
10+ } ;
11+ }
12+ {
13+ key = "[B" ;
14+ action = "<cmd>BufferLineMovePrev<cr>" ;
15+ options = {
16+ desc = "Move Buffer Prev" ;
17+ } ;
18+ }
19+ {
20+ key = "[b" ;
21+ action = "<cmd>BufferLineCyclePrev<cr>" ;
22+ options = {
23+ desc = "Prev Buffer" ;
24+ } ;
25+ }
26+ {
27+ key = "]B" ;
28+ action = "<cmd>BufferLineMoveNext<cr>" ;
29+ options = {
30+ desc = "Move Buffer Next" ;
31+ } ;
32+ }
33+ {
34+ key = "]b" ;
35+ action = "<cmd>BufferLineCycleNext<cr>" ;
36+ options = {
37+ desc = "Next Buffer" ;
38+ } ;
39+ }
40+ ] ;
41+ } ;
42+ }
Original file line number Diff line number Diff line change 1+ {
2+ programs . nixvim = {
3+ plugins . luasnip . enable = true ;
4+ plugins . cmp = {
5+ enable = true ;
6+ settings = {
7+ autoEnableSources = true ;
8+ mapping = {
9+ "<C-Space>" = "cmp.mapping.complete()" ;
10+ "<C-b>" = "cmp.mapping.scroll_docs(-4)" ;
11+ "<C-e>" = "cmp.mapping.abort()" ;
12+ "<C-f>" = "cmp.mapping.scroll_docs(4)" ;
13+ "<C-j>" = "cmp.mapping.select_next_item()" ;
14+ "<C-k>" = "cmp.mapping.select_prev_item()" ;
15+ "<CR>" = "cmp.mapping.confirm({ select = true })" ;
16+ "<S-CR>" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true })" ;
17+ "<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})" ;
18+ } ;
19+ snippet = {
20+ expand = ''
21+ function(args)
22+ require('luasnip').lsp_expand(args.body)
23+ end
24+ '' ;
25+ } ;
26+ sources = [
27+ { name = "nvim_lsp" ; }
28+ { name = "path" ; }
29+ { name = "buffer" ; }
30+ {
31+ name = "luasnip" ;
32+ keywordLength = 3 ;
33+ }
34+ ] ;
35+ window = {
36+ completion = {
37+ border = "solid" ;
38+ } ;
39+ documentation = {
40+ border = "solid" ;
41+ } ;
42+ } ;
43+ } ;
44+ } ;
45+ } ;
46+ }
Original file line number Diff line number Diff line change 1+ {
2+ imports = [
3+ ./appearance.nix
4+ ./bufferline.nix
5+ ./cmp.nix
6+ ./flash.nix
7+ ./keymaps.nix
8+ ./lsp.nix
9+ ./neo-tree.nix
10+ ./plugins.nix
11+ ./telescope.nix
12+ ] ;
13+ programs . nixvim = {
14+ enable = true ;
15+ globals . mapleader = " " ;
16+ opts = {
17+ # highlight current line
18+ cursorline = true ;
19+ # line numbers
20+ number = true ;
21+ relativenumber = true ;
22+ # search
23+ ignorecase = true ;
24+ smartcase = true ;
25+ ruler = true ; # show line and column when search
26+ # tabs
27+ tabstop = 2 ;
28+ shiftwidth = 2 ;
29+ expandtab = true ;
30+ smarttab = true ;
31+ # always show the signcolumn, otherwise text would be shifted when displaying error icons
32+ # https://github.com/Ahwxorg/nixvim-config/blob/d90d75bd7c69637e08cbd3969ec0373d6db7ffdc/config/options.nix
33+ signcolumn = "yes" ;
34+ } ;
35+ } ;
36+ }
Original file line number Diff line number Diff line change 1+ {
2+ programs . nixvim = {
3+ plugins . flash = {
4+ enable = true ;
5+ jump = {
6+ autojump = true ;
7+ } ;
8+ label = {
9+ uppercase = false ;
10+ rainbow = {
11+ enabled = true ;
12+ } ;
13+ } ;
14+ labels = "asdfghjklqwertyuiopzxcvbnm" ;
15+ search = {
16+ mode = "fuzzy" ;
17+ } ;
18+ } ;
19+ keymaps = [
20+ {
21+ key = "s" ;
22+ action = "<cmd>lua require('flash').jump()<cr>" ;
23+ mode = [
24+ "n"
25+ "x"
26+ "o"
27+ ] ;
28+ options = {
29+ desc = "Flash" ;
30+ } ;
31+ }
32+ {
33+ key = "S" ;
34+ action = "<cmd>lua require('flash').treesitter()<cr>" ;
35+ mode = [
36+ "n"
37+ "x"
38+ "o"
39+ ] ;
40+ options = {
41+ desc = "Flash Treesitter" ;
42+ } ;
43+ }
44+ {
45+ key = "r" ;
46+ action = "<cmd>lua require('flash').remote()<cr>" ;
47+ mode = "o" ;
48+ options = {
49+ desc = "Remote Flash" ;
50+ } ;
51+ }
52+ {
53+ key = "R" ;
54+ action = "<cmd>lua require('flash').treesitter_search()<cr>" ;
55+ mode = [
56+ "x"
57+ "o"
58+ ] ;
59+ options = {
60+ desc = "Treesitter Search" ;
61+ } ;
62+ }
63+ ] ;
64+ } ;
65+ }
Original file line number Diff line number Diff line change 1+ {
2+ programs . nixvim = {
3+ keymaps = [
4+ {
5+ key = "<esc><esc>" ;
6+ action = "<cmd>noh<cr>" ;
7+ options = {
8+ desc = "Reset Highlight" ;
9+ } ;
10+ }
11+ {
12+ key = "<C-s>" ;
13+ action = "<cmd>w<cr><esc>" ;
14+ mode = [
15+ "i"
16+ "n"
17+ "s"
18+ "x"
19+ ] ;
20+ options = {
21+ desc = "Save File" ;
22+ silent = true ;
23+ } ;
24+ }
25+ {
26+ key = "<leader>bd" ;
27+ action = "<cmd>bd<cr>" ;
28+ options = {
29+ desc = "Delete Buffer" ;
30+ } ;
31+ }
32+ {
33+ key = "<leader>ca" ;
34+ action = "<cmd>lua vim.lsp.buf.code_action()<CR>" ;
35+ }
36+ {
37+ key = "<leader>qq" ;
38+ action = "<cmd>qa<cr>" ;
39+ mode = [ "n" ] ;
40+ options = {
41+ desc = "Quit All" ;
42+ silent = true ;
43+ } ;
44+ }
45+ ] ;
46+ } ;
47+ }
Original file line number Diff line number Diff line change 1+ { pkgs , ... } :
2+ {
3+ programs . nixvim = {
4+ plugins . lsp = {
5+ enable = true ;
6+ servers = {
7+ eslint . enable = true ;
8+ gopls = {
9+ enable = true ;
10+ package = null ;
11+ } ;
12+ nil-ls . enable = true ;
13+ rust-analyzer = {
14+ enable = true ;
15+ installCargo = false ;
16+ installRustc = false ;
17+ } ;
18+ tsserver . enable = true ;
19+ vuels . enable = true ;
20+ } ;
21+ } ;
22+ plugins . lsp-format = {
23+ enable = true ;
24+ } ;
25+ plugins . none-ls = {
26+ enable = true ;
27+ sources . formatting = {
28+ gofmt . enable = true ;
29+ nixfmt = {
30+ enable = true ;
31+ package = pkgs . nixfmt-rfc-style ;
32+ } ;
33+ prettier = {
34+ enable = true ;
35+ disableTsServerFormatter = true ;
36+ } ;
37+ } ;
38+ } ;
39+ } ;
40+ }
Original file line number Diff line number Diff line change 1+ {
2+ programs . nixvim = {
3+ plugins . neo-tree = {
4+ enable = true ;
5+ closeIfLastWindow = true ;
6+ } ;
7+ keymaps = [
8+ {
9+ key = "<leader>e" ;
10+ action = "<cmd>Neotree toggle<cr>" ;
11+ options = {
12+ desc = "Explorer NeoTree (Root Dir)" ;
13+ remap = true ;
14+ } ;
15+ }
16+ ] ;
17+ } ;
18+ }
Original file line number Diff line number Diff line change 1+ {
2+ programs . nixvim = {
3+ plugins = {
4+ lualine . enable = true ; # bottom status line
5+
6+ cursorline . enable = true ;
7+ friendly-snippets . enable = true ;
8+ fidget . enable = true ;
9+ gitsigns . enable = true ;
10+ nix . enable = true ;
11+ nvim-autopairs . enable = true ;
12+ which-key . enable = true ;
13+ } ;
14+ } ;
15+ }
You can’t perform that action at this time.
0 commit comments