1{ pkgs, ... }:
2{
3 imports = [
4 ./vim/default.nix
5 ];
6
7 vim = {
8 #enable python provider
9 withPython3 = true;
10 python3Packages = [ "pynvim" ];
11
12 autocmds = [
13 #Autocommand to fall back to treesitter folding if LSP doesnt support it
14 {
15 event = [ "LspAttach" ];
16 callback = pkgs.lib.generators.mkLuaInline ''
17 function(args)
18 local client = vim.lsp.get_client_by_id(args.data.client_id)
19 if client:supports_method('textDocument/foldingRange') then
20 local win = vim.api.nvim_get_current_win()
21 vim.wo[win][0].foldexpr = 'v:lua.vim.lsp.foldexpr()'
22 end
23 end
24 '';
25 }
26 ];
27
28 tabline = {
29 nvimBufferline.enable = true;
30 };
31 startPlugins = [
32 "nui-nvim"
33 ];
34 theme = {
35 name = "catppuccin";
36 style = "mocha";
37 };
38 hideSearchHighlight = true;
39 };
40}