craftzdog / dotfiles-public

My personal dotfiles
6.27k stars 1.16k forks source link

[typescript] Conflicts in lsp configuration null-ls, tsserver, tailwindcss #117

Open mPanasiewicz opened 1 year ago

mPanasiewicz commented 1 year ago

Hello,

I have an issue with LSP. I have some conflict with my lsp. When I work with typescript i have some errors from lsps(mostly from eslint_d). When I fix them and save the file it reverts my changes to the different one. It looks like null-ls conflicts with tsserver or tailwindcss because these lsps also starts. Did anyone get this issue? More details below: TS servers

neovim ts server

Thank you!

ghost commented 7 months ago

Well, it seems like it is working perfectly well for me. The errors are happening just because you configured eslint or typescript in a way that does not allow you to use any semicolons and not use the defined variable in the below lines. You can configure eslint by adding .eslintrc or anything like this. You can check this link to learn more about how to configure eslint in the way that you want it to work. Or, if you want to configure typescript, then you can make a new file called tsconfig.json and add configurations about typescript in the json format. You can check this link to learn more about how to configure your typescript.

ghost commented 7 months ago

Additionally, personally, I do not use eslint_d because it is pretty slow, and I did not have that much good experience with it. You can change to another package, such as eslint or anything like that, for your codes.

If you want to change the package from eslint_d to another package, then you will need to modify some code. In the configuration files from Mar 22, 2023, you can follow this path: .config/nvim/plugin/null-ls.rc.lua1 and open the file with nvim. And, you can delete the lines from 18~20 and replace it with eslint builtin that null-ls provides. This link will help you a lot.