Skip to content

luaConfig question #3427

Answered by khaneliman
suasuasuasuasua asked this question in Q&A
Jun 3, 2025 · 1 comments · 5 replies
Discussion options

You must be logged in to vote

The idea with luaConfig is to allow per plugin custom lua injection into the final generated lua. The pre, content, and post allow you to choose where to insert your custom lua code relative to the normal lua code provided by nixvim. Sometimes you want to inject configuration before the plugin gets intiialized and sometimes you have things you want to run right after.

Example from my config:

    jdtls = {
      enable = true;

      lazyLoad.settings.ft = "java";

      luaConfig.pre =
        let
          java-debug = "${pkgs.vscode-extensions.vscjava.vscode-java-debug}/share/vscode/extensions/vscjava.vscode-java-debug/server";
          java-test = "${pkgs.vscode-extensions.vscjava.vsc…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@suasuasuasuasua
Comment options

@khaneliman
Comment options

@suasuasuasuasua
Comment options

@khaneliman
Comment options

@suasuasuasuasua
Comment options

Answer selected by suasuasuasuasua
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants