Skip to content

builtin angular treesitter + conform support #1630

Description

@sand4rt

I have verified that this feature request has not been made before

  • I have checked the issues tab, and did not find a similar feature request. I understand that my issue will be closed if it is a duplicate.

Feature Type

Update Request (Plugin/Nixpkgs)

Feature description

syntax highlighting in the template strings is not enabled:
https://github.com/NotAShelf/nvf/blob/main/modules/plugins/lsp/presets/angular-language-server.nix

import { Component, resource } from '@angular/core';

@Component({
  selector: 'app-list',
  template: `
    @if (items.isLoading()) {
      <p>loading</p>
    } @else if (items.error()) {
      <p>failed to load items</p>
    } @else {
      <ul>
        @for (item of items.value(); track item.id) {
          <li>{{ item.label }}</li>
        }
      </ul>
    }
  `,
})
export class ListComponent {
  items = resource({
    loader: async () => [{ label: 'test' }],
    defaultValue: [],
  });
}

Alternatives

enabling manually:

programs.nvf.settings.vim.treesitter.grammars = with pkgs.vimPlugins.nvim-treesitter-parsers; [
  angular
];

Additional Context

conform integration was missing too. See lazyvim examle for an example: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/plugins/extras/lang/angular.lua

{  
    "conform.nvim",
    opts = function(_, opts)
      if LazyVim.has_extra("formatting.prettier") then
        opts.formatters_by_ft = opts.formatters_by_ft or {}
        opts.formatters_by_ft.htmlangular = { "prettier" }
      end
    end,
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions