I have verified that this feature request has not been made before
Feature Type
Other
Feature description
The Idea is to split the Angular out of the TypeScript and HTML Language Modules.
This would allow a better readability of those modules and make them more maintainable for the future.
For example, I plan to add in an Angular specific extensions, which would best live under languages.angular.extensions.<angular-nvim>.
Alternatives
Additional Context
Currently the Usage of Angular with NVF looks like this:
{pkgs, ...}: {
vim = {
lsp = {
presets = {
angular-language-server.enable = true;
emmet-ls.enable = true;
};
servers = {
angular-language-server.filetypes = ["htmlangular"];
emmet-ls.filetypes = ["htmlangular"];
};
};
treesitter.grammars = [pkgs.vimPlugins.nvim-treesitter-parsers.angular];
languages = {
typescript.lsp.servers = [
"angular-language-server"
];
# WRONG FT
# html.lsp.servers = [
# "angular-language-server"
# ];
};
};
}
The Problem arises, from the normal HTML Tree-sitter package not supporting the angular extras. That is fixed by pkgs.vimPlugins.nvim-treesitter-parsers.angular which introduces the htmlangular filetype and automatically detects it.
The angular-language-server has to run on the htmlangular files and their respective TypeScript files, to get its full feature support. On Top of that you still need and use the normal TypeScript LSP on TypeScript files.
The angular-language-server in TypeScript just allows jumping between the HTML and TS files, and Gives more accurate Information about References in TypeScript Files, - Including references inside Templates.
Besides the Reason of the extra Tree-sitter, introducing htmlangular, you also don't want angular-language-server mixed into the HTML Module, because only some HTML LSPs work fine with angular Templates. superhtml for example, doesn't, while emmet-ls does.
I have verified that this feature request has not been made before
Feature Type
Other
Feature description
The Idea is to split the Angular out of the TypeScript and HTML Language Modules.
This would allow a better readability of those modules and make them more maintainable for the future.
For example, I plan to add in an Angular specific extensions, which would best live under
languages.angular.extensions.<angular-nvim>.Alternatives
Additional Context
Currently the Usage of Angular with NVF looks like this:
The Problem arises, from the normal HTML Tree-sitter package not supporting the angular extras. That is fixed by
pkgs.vimPlugins.nvim-treesitter-parsers.angularwhich introduces thehtmlangularfiletype and automatically detects it.The
angular-language-serverhas to run on thehtmlangularfiles and their respective TypeScript files, to get its full feature support. On Top of that you still need and use the normal TypeScript LSP on TypeScript files.The
angular-language-serverin TypeScript just allows jumping between the HTML and TS files, and Gives more accurate Information about References in TypeScript Files, - Including references inside Templates.Besides the Reason of the extra Tree-sitter, introducing
htmlangular, you also don't wantangular-language-servermixed into the HTML Module, because only some HTML LSPs work fine with angular Templates.superhtmlfor example, doesn't, whileemmet-lsdoes.