From 37b26b35df5117f7eeb0baa269ea395c6d201e23 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Tue, 21 Jan 2025 13:37:11 +0800 Subject: [PATCH] nixvimConfigs/fiesta: update LSP and Treesitter setup --- configs/nixvim/fiesta/modules/setups/lsp.nix | 15 +++++++++++- .../fiesta/modules/setups/treesitter.nix | 23 ------------------- 2 files changed, 14 insertions(+), 24 deletions(-) diff --git a/configs/nixvim/fiesta/modules/setups/lsp.nix b/configs/nixvim/fiesta/modules/setups/lsp.nix index 068be854..7571c0e7 100644 --- a/configs/nixvim/fiesta/modules/setups/lsp.nix +++ b/configs/nixvim/fiesta/modules/setups/lsp.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ config, lib, helpers, ... }: let nixvimConfig = config.nixvimConfigs.fiesta; @@ -15,6 +15,19 @@ in }; config = lib.mkIf cfg.enable { + keymaps = [ + { + mode = [ "n" ]; + key = "Li"; + options.desc = "Toggle inlay hints"; + action = helpers.mkRaw '' + function() + vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled()) + end + ''; + } + ]; + plugins.lsp = { enable = true; inlayHints = true; diff --git a/configs/nixvim/fiesta/modules/setups/treesitter.nix b/configs/nixvim/fiesta/modules/setups/treesitter.nix index 126027ba..6efc1789 100644 --- a/configs/nixvim/fiesta/modules/setups/treesitter.nix +++ b/configs/nixvim/fiesta/modules/setups/treesitter.nix @@ -18,29 +18,6 @@ in nixGrammars = true; nixvimInjections = true; - # We'll just use the common languages out of the bat. - grammarPackages = with config.plugins.treesitter.package.builtGrammars; [ - bash - c - cpp - css - dockerfile - go - graphql - html - http - javascript - json - json5 - lua - nix - rust - toml - tsx - typescript - yaml - ]; - # Enable all of its useful features. folding = true; settings = {