Giter Club home page Giter Club logo

Comments (3)

gabydd avatar gabydd commented on September 27, 2024 1

there are seperate queries and a different grammar for tsx:

helix/languages.toml

Lines 790 to 803 in 38e6fcd

[[language]]
name = "tsx"
scope = "source.tsx"
injection-regex = "(tsx)" # |typescript
language-id = "typescriptreact"
file-types = ["tsx"]
comment-token = "//"
block-comment-tokens = { start = "/*", end = "*/" }
language-servers = [ "typescript-language-server" ]
indent = { tab-width = 2, unit = " " }
[[grammar]]
name = "tsx"
source = { git = "https://github.com/tree-sitter/tree-sitter-typescript", rev = "b1bf4825d9eaa0f3bdeb1e52f099533328acfbdf", subpath = "tsx" }
in your languages.toml you are causing tsx and jsx files to use the typescript grammar and queries

instead you can just have:

[[language]]
name = "typescript"
language-servers = ["deno-lsp", "tailwindcss-ls"]

[[language]]
name = "tsx"
language-servers = ["deno-lsp", "tailwindcss-ls"]

[[language]]
name = "javascript"
language-servers = ["deno-lsp", "tailwindcss-ls"]

[[language]]
name = "jsx"
language-servers = ["deno-lsp", "tailwindcss-ls"]

from helix.

Diogenesoftoronto avatar Diogenesoftoronto commented on September 27, 2024

Please output the result of hx --health

from helix.

LePichu avatar LePichu commented on September 27, 2024

Please output the result of hx --health

Screenshot_20240821-205319

This is my languages.toml:

[[language]]
name = "typescript"
language-id = "typescript"
scope = "source.ts"
injection-regex = "^(ts|typescript)$"
file-types = ["ts", "tsx", "js", "jsx"]
shebangs = ["deno"]
roots = ["deno.json", "deno.jsonc", "package.json"]
language-servers = ["deno-lsp", "tailwindcss-ls"]

[language-server.deno-lsp]
command = "deno"
args = ["lsp"]

[language-server.deno-lsp.config.deno]
enable = true

[language-server.tailwindcss-ls]
command = "tailwindcss-language-server"
args = ["--stdio"]
config = { userLanguages = { astro = "html", "*.astro" = "html" } }

[language-server.astro-ls]
command = "astro-ls"
args = ["--stdio"]
config = { typescript = { tsdk = "/root/.pnpm-global/global/5/node_modules/typescript/lib/" }}

[[language]]
name = "astro"
scope = "source.astro"
injection-regex = "astro"
file-types = ["astro"]
language-servers = ["astro-ls", "tailwindcss-ls"]

from helix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.