diff options
| author | Stefan Weigl-Bosker <stefan@s00.xyz> | 2025-02-22 19:11:05 -0500 |
|---|---|---|
| committer | Stefan Weigl-Bosker <stefan@s00.xyz> | 2025-02-22 19:11:05 -0500 |
| commit | 1049601e0b07627ef967d1092adc04022598648b (patch) | |
| tree | 8ebb4f2ec21a3870df418b493fa417cf210e68da /modules/nvim/default.nix | |
| parent | 980b1f75b6935694b5def72a3bcc119f78e878b0 (diff) | |
| download | home-1049601e0b07627ef967d1092adc04022598648b.tar.gz | |
started flake config
Diffstat (limited to 'modules/nvim/default.nix')
| -rw-r--r-- | modules/nvim/default.nix | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/modules/nvim/default.nix b/modules/nvim/default.nix new file mode 100644 index 0000000..54f9d53 --- /dev/null +++ b/modules/nvim/default.nix @@ -0,0 +1,47 @@ +{ config, lib, pkgs, ...}: +let + cfg = config.modules.nvim; + lua = str: "lua << EOF\n${str}\nEOF\n"; + luaImport = file: "lua << EOF\n${builtins.readFile file}\nEOF\n"; +in +{ + options.modules.nvim = { + }; + + config = { + programs.neovim = { + enable = true; + defaultEditor = true; + viAlias = true; + vimAlias = true; + vimdiffAlias = true; + plugins = with pkgs.vimPlugins; [ + { + plugin = nvim-lspconfig; + config = let + servers = [ + { name = "clangd"; } + ]; + in lua(pkgs.lib.strings.concatStrings (pkgs.lib.lists.forEach servers (s: "require('lspconfig')['${s.name}'].setup(${s.config or "{}"})\n"))); + } + + (nvim-treesitter.withPlugins (p: with p; [ + tree-sitter-nix + tree-sitter-c + tree-sitter-lua + tree-sitter-zig + tree-sitter-markdown + tree-sitter-markdown-inline + ])) + + base16-nvim + telescope-nvim + telescope-fzf-native-nvim + ]; + extraLuaConfig = '' + ${builtins.readFile ./settings.lua} + ${builtins.readFile ./keybinds.lua} + ''; + }; + }; +} |