ecosse3 / nvim

A non-minimal Neovim config built to work most efficiently with Frontend Development
GNU General Public License v3.0
1.21k stars 109 forks source link

Can't format .scss files #89

Closed hitfm00 closed 2 years ago

hitfm00 commented 2 years ago

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 commented 2 years ago

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 😊

hitfm00 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

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.

hitfm00 commented 2 years ago

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