https://bugs.kde.org/show_bug.cgi?id=517501

            Bug ID: 517501
           Summary: Fail to provide tsconfig file to svelte LSP when
                    project path contains a symlink
    Classification: Applications
           Product: kate
      Version First 25.12.1
       Reported In:
          Platform: Debian testing
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Hello,
I actually reported this problem earlier in a github issue on
@sveltejs/language-tool, but it seems that the problem comes from Kate:
https://github.com/sveltejs/language-tools/issues/2930

I have a SvelteKit project on my Debian machine, and I access it through a
symbolic link. When I open it with Kate, importing anything from the $lib
folder into a .svelte file causes this error:

    Cannot find module '$lib/example' or its corresponding type declarations.

Steps to reproduce:
I created an empty Typescript + SvelteKit project. Then, I create a symlink to
this project.
In the logs I copied below, you can see the following paths:
original: /home/titoubiz/Desktop/svelte-lsp-bug
symlink: /home/titoubiz/Desktop/symlink-svelte-lsp-bug

I installed svelte-language-server 0.17.29, and added these lines to Svelte
config:
"svelte": {
    "command": ["svelteserver", "--stdio"],
    "rootIndicationFileNames": ["package.json", ".git"],
    "url": "https://github.com/sveltejs/language-tools";,
    "highlightingModeRegex": "^HTML$"
}

If I open the project in Kate through the original path, the LSP logs are the
following:
[21:00:14  Client LSP Journal] Serveur
svelte@/home/titoubiz/Desktop/svelte-lsp-bug démarré :
/home/titoubiz/.local/share/pnpm/svelteserver --stdio
[21:00:15  Serveur LSP Journal] svelte@/home/titoubiz/Desktop/svelte-lsp-bug
        Initialize language server at 
file:///home/titoubiz/Desktop/svelte-lsp-bug
[21:00:15  Serveur LSP Journal] svelte@/home/titoubiz/Desktop/svelte-lsp-bug
        Initialize new ts service at 
/home/titoubiz/Desktop/svelte-lsp-bug/tsconfig.json
[21:00:15  Serveur LSP Journal] svelte@/home/titoubiz/Desktop/svelte-lsp-bug
        Trying to load configs for /home/titoubiz/Desktop/svelte-lsp-bug
[21:00:15  Serveur LSP Journal] svelte@/home/titoubiz/Desktop/svelte-lsp-bug
        Loaded config at 
/home/titoubiz/Desktop/svelte-lsp-bug/svelte.config.js
[21:00:15  Serveur LSP Journal] svelte@/home/titoubiz/Desktop/svelte-lsp-bug
        SnapshotManager File Statistics:
        Project files: 7
        Svelte files: 1
        From node_modules: 0
        Total: 7

But if I open it through the symlink, the LSP logs are the following:
[23:46:15  PATH Informations]
/home/titoubiz/.local/share/pnpm:/home/titoubiz/.local/share/n/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
[23:46:15  Client LSP Journal] Serveur
svelte@/home/titoubiz/Desktop/svelte-lsp-bug démarré :
/home/titoubiz/.local/share/pnpm/svelteserver --stdio
[23:46:16  Serveur LSP Journal] svelte@/home/titoubiz/Desktop/svelte-lsp-bug
    Initialize language server at  file:///home/titoubiz/Desktop/svelte-lsp-bug
[23:46:16  Serveur LSP Journal] svelte@/home/titoubiz/Desktop/svelte-lsp-bug
    Initialize new ts service at
[23:46:16  Serveur LSP Journal] svelte@/home/titoubiz/Desktop/svelte-lsp-bug
    Trying to load configs for /home/titoubiz/Desktop/svelte-lsp-bug
[23:46:16  Serveur LSP Journal] svelte@/home/titoubiz/Desktop/svelte-lsp-bug
    Loaded config at 
/home/titoubiz/Desktop/symlink-svelte-lsp-bug/svelte.config.js
    Loaded config at  /home/titoubiz/Desktop/svelte-lsp-bug/svelte.config.js
[23:46:16  Serveur LSP Journal] svelte@/home/titoubiz/Desktop/svelte-lsp-bug
    SnapshotManager File Statistics:
    Project files: 0
    Svelte files: 1
    From node_modules: 0
    Total: 1

Thanks!

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to