Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A better way to separate lsp running between denols and tsserver. #248

Closed
qwexvf opened this issue Mar 5, 2024 · 2 comments
Closed

A better way to separate lsp running between denols and tsserver. #248

qwexvf opened this issue Mar 5, 2024 · 2 comments

Comments

@qwexvf
Copy link

qwexvf commented Mar 5, 2024

Currently i have a react app with the directory tree below

├── src
│  ├── App.css
│  ├── assets
│  ├── components
│  ├── graphql
│  ├── index.css
│  ├── lib
│  ├── main.tsx
│  ├── pages
│  ├── types
│  └── vite-env.d.ts
├── supabase
│  ├── config.toml
│  ├── functions
│  └── seed.sql
├── tsconfig.json
├── tsconfig.node.json
├── vercel.json
└── vite.config.ts

I'm trying to figure out a way to separate when editing files in supabase dir to not run tsserver.
has anyone faced similar case or know a way to achieve this?

@qwexvf
Copy link
Author

qwexvf commented Mar 14, 2024

bump

@qwexvf
Copy link
Author

qwexvf commented Mar 14, 2024

for if anyone happens to have the same issue

return {
    "pmizio/typescript-tools.nvim",
    dependencies = {
        "kyoh86/climbdir.nvim",
    },
    lazy = false,
    config = function()
        require("typescript-tools").setup {
            on_attach = function(client)
                -- Disable document formatting capabilities
                client.server_capabilities.documentFormattingProvider = false
                client.server_capabilities.documentRangeFormattingProvider = false
            end,
            root_dir = function(path)
                local marker = require("climbdir.marker")
                -- Determine the root directory based on the presence of package.json or node_modules
                return require("climbdir").climb(path,
                    marker.one_of(marker.has_readable_file("package.json"), marker.has_directory("node_modules")), {
                        -- Stop the plugin if any of the specified files/folders are found
                        halt = marker.one_of(
                            marker.has_readable_file("deno.json"),
                            marker.has_readable_file("deno.jsonc"),
                            marker.has_readable_file("import_map.json"),
                            marker.has_directory("denops")
                        ),
                    })
            end,
            single_file_support = false,
        }
    end,
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant