Fix neovim treesitter config

This commit is contained in:
Erwin Boskma 2022-11-08 09:46:22 +01:00
parent da099b085a
commit cc55b72b66
Signed by: erwin
SSH key fingerprint: SHA256:CyeNoWXd3kjX2Nwu6pDxxdS7OqmPVOy0NavA/KU/ntU
2 changed files with 53 additions and 4 deletions

View file

@ -1,9 +1,58 @@
-- vim: ft=lua -- -*- mode: lua; -*- vim: ft=lua
local treesitter = require('nvim-treesitter.configs') local treesitter = require('nvim-treesitter.configs')
treesitter.setup({ treesitter.setup({
ensure_installed = 'maintained', ensure_installed = {
'bash',
'c',
'cmake',
'commonlisp',
'cpp',
'css',
'diff',
'dockerfile',
'eex',
'elixir',
'fish',
'git_rebase',
'gitattributes',
'gitignore',
'hcl',
'heex',
'html',
'javascript',
'jsdoc',
'json',
'JSON with comments',
'jsonnet',
'lua',
'make',
'markdown',
'markdown_inline',
'meson',
'ninja',
'nix',
'org',
'proto',
'racket',
'rasi',
'regex',
'rst',
'ruby',
'rust',
'scheme',
'scss',
'surface',
'svelte',
'toml',
'tsx',
'typescript',
'vala',
'vim',
'yaml',
'zig'
},
autopairs = { autopairs = {
enable = true enable = true
}, },

View file

@ -7,7 +7,7 @@ with lib; let
cfg = config.eboskma.programs.neovim; cfg = config.eboskma.programs.neovim;
in in
{ {
options.eboskma.programs.neovim = { enable = mkEnableOption "activate neovim"; }; options.eboskma.programs.neovim = { enable = mkEnableOption "neovim"; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# unfortunately this does properly support a Lua based config # unfortunately this does properly support a Lua based config
@ -28,7 +28,7 @@ in
# ''; # '';
# }; # };
home.packages = with pkgs; [ neovim ]; home.packages = with pkgs; [ neovim tree-sitter ];
xdg.configFile.nvim = { xdg.configFile.nvim = {
source = ./config; source = ./config;