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

Can't format .scss files #89

Closed
hitfm00 opened this issue Aug 22, 2022 · 6 comments
Closed

Can't format .scss files #89

hitfm00 opened this issue Aug 22, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@hitfm00
Copy link

hitfm00 commented Aug 22, 2022

When I trying to format a file .scss with he just throw error what
[LSP] Format request failed, no matching language servers.

:LspInfo
Снимок экрана 2022-08-22 в 23 33 29
`

@ecosse3 ecosse3 added the enhancement New feature or request label Aug 22, 2022
@ecosse3
Copy link
Owner

ecosse3 commented Aug 22, 2022

By default document formatting provider is disabled in css language server. It has to be enabled in on_attach method by:

  client.server_capabilities.documentFormattingProvider = true
  client.server_capabilities.documentRangeFormattingProvider = true

I'll add it soon to the config.

Edit: Implemented on dev branch. @hitfm00 You can check if it works 😊

ecosse3 added a commit that referenced this issue Aug 22, 2022
@hitfm00
Copy link
Author

hitfm00 commented Aug 22, 2022

By default document formatting provider is disabled in css language server. It has to be enabled in on_attach method by:

  client.server_capabilities.documentFormattingProvider = true
  client.server_capabilities.documentRangeFormattingProvider = true

I'll add it soon to the config.

Edit: Implemented on dev branch. @hitfm00 You can check if it works 😊

I did this changes, now I have no this error [LSP] Format request failed, no matching language servers. but doesn't format :)

P.S. And one more question, how can I update Ecovim?)
I'm just a new nvim user)

@ecosse3
Copy link
Owner

ecosse3 commented Aug 22, 2022

It's just github repo. Pull the changes after switching to dev branch. I've tested it, it works on dev.

Edit: You may need to run in nvim directory:

git config remote.origin.fetch "+refs/heads/:refs/remotes/origin/"

to be able to git fetch and then checkout to dev branch. By default, repository is locked on master branch.

@hitfm00
Copy link
Author

hitfm00 commented Aug 22, 2022

@ecosse3 Yes, you are right, it's working, my bad :)
And I don't have a .git repository in nvim directory, I installed from this command:
bash <(curl -s https://raw.githubusercontent.com/ecosse3/nvim/master/.install/run.sh)

@ecosse3
Copy link
Owner

ecosse3 commented Aug 22, 2022

Great it works.

And I don't have a .git repository in nvim directory,

That's actually weird. I was testing it in docker and git repository exists after a fresh install via script. Will check it later. You can always git init and add remote origin if needed.

@ecosse3 ecosse3 closed this as completed Aug 22, 2022
@hitfm00
Copy link
Author

hitfm00 commented Aug 22, 2022

@ecosse3 oh, sorry, I did this command and it's work now
git config --global --add safe.directory /Users/maxim/.config/nvim

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

No branches or pull requests

2 participants