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

All highlight and color sechma gone after using sourcery #2481

Closed
meicale opened this issue Feb 27, 2023 · 4 comments
Closed

All highlight and color sechma gone after using sourcery #2481

meicale opened this issue Feb 27, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@meicale
Copy link

meicale commented Feb 27, 2023

Description

I use native lsp and pywrite for python file. After install sourcery lspconfig, I can use the function of sourcery and pyright, but I lose all the code highlight.

Neovim version

NVIM v0.8.3
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3

Nvim-lspconfig version

62856b2

Operating system and version

WSL2 Ubuntu20.04

Affected language servers

pyright and treesitter

Steps to reproduce

In stall sourcery as #1495 and sourcery-ai/sourcery#43

Actual behavior

has highlight

Expected behavior

highlight gone

Minimal config

I don't know why, but I get no lsp.log even after I set the vim.lsp.set_log_level('debug') .
Thank you!

LSP log

https://gist.github.com/

@meicale meicale added the bug Something isn't working label Feb 27, 2023
@justinmk
Copy link
Member

Thanks for your report. The configs in this repo are unsupported and provided only as a starting point. We depend on users (like you) to troubleshoot issues with their specific LSP setups and send improvements.

If you found a bug in the core Nvim vim.lsp module (not part of this repo), the best way to get it fixed is to report to Nvim (not nvim-lspconfig) with:

  • steps to reproduce it without the particular LSP server and other factors particular to your environment
  • (optional, but very helpful): by adding a failing test case to lsp_spec.lua, which has code to setup a fake LSP server to simulate various scenarios

@glepnir
Copy link
Member

glepnir commented Feb 28, 2023

try disable semantic token.

@meicale
Copy link
Author

meicale commented Mar 1, 2023

try disable semantic token.

Would you mind say something more about it? Where and How to set that?
The workaround I use is to set filetype again manually using the command: set filetype=python

@marziply
Copy link

@meicale since @glepnir provided a very unhelpful but otherwise correct suggestion, here's the solution they should have provided:

vim.api.nvim_create_autocmd('LspAttach', {
  callback = function(args)
    local client = vim.lsp.get_client_by_id(args.data.client_id)

    client.server_capabilities.semanticTokensProvider = nil
  end
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants