From cc55b72b66a8cbd7e8f564cdfc37e5a87866b33d Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Tue, 8 Nov 2022 09:46:22 +0100 Subject: [PATCH] Fix neovim treesitter config --- .../modules/neovim/config/lua/highlight.lua | 53 ++++++++++++++++++- home-manager/modules/neovim/default.nix | 4 +- 2 files changed, 53 insertions(+), 4 deletions(-) diff --git a/home-manager/modules/neovim/config/lua/highlight.lua b/home-manager/modules/neovim/config/lua/highlight.lua index f3962df..cc130f1 100644 --- a/home-manager/modules/neovim/config/lua/highlight.lua +++ b/home-manager/modules/neovim/config/lua/highlight.lua @@ -1,9 +1,58 @@ --- vim: ft=lua +-- -*- mode: lua; -*- vim: ft=lua local treesitter = require('nvim-treesitter.configs') 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 = { enable = true }, diff --git a/home-manager/modules/neovim/default.nix b/home-manager/modules/neovim/default.nix index 3808a05..b7be793 100644 --- a/home-manager/modules/neovim/default.nix +++ b/home-manager/modules/neovim/default.nix @@ -7,7 +7,7 @@ with lib; let cfg = config.eboskma.programs.neovim; in { - options.eboskma.programs.neovim = { enable = mkEnableOption "activate neovim"; }; + options.eboskma.programs.neovim = { enable = mkEnableOption "neovim"; }; config = mkIf cfg.enable { # 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 = { source = ./config;