Skip to content

Commit

Permalink
Add lsp and formatting for GLSL shaders
Browse files Browse the repository at this point in the history
  • Loading branch information
joinemm committed May 6, 2024
1 parent 73eb31f commit fcf6440
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions home-modules/neovim.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
viAlias = true;
vimAlias = true;

extraPackages = with pkgs; [
glslls
];

opts = {
autoindent = true;
number = true;
Expand Down Expand Up @@ -239,6 +243,16 @@
};
};
};
conform-nvim = {
enable = true;
formattersByFt = {
glsl = ["clang-format"];
};
formatOnSave = {
lspFallback = true;
timeoutMs = 500;
};
};

lsp-format.enable = true;

Expand Down Expand Up @@ -338,6 +352,10 @@
)
require("smartcolumn").setup()
require'lspconfig'.glslls.setup{
cmd = { 'glslls', '--stdin', '--target-env', 'opengl' },
}
'';
};
}

0 comments on commit fcf6440

Please sign in to comment.