nvim-lua / kickstart.nvim

A launch point for your personal nvim configuration
MIT License
18.33k stars 20.36k forks source link

Unable to close floating dialog when saving elm file with syntax errors #1033

Closed martisj closed 1 week ago

martisj commented 1 month ago

Describe the bug

I've got this elm file:

myDef: String
myDef = "Hello"

error in my func
0.0

When I save :w I see this dialog image I can't close it with q or navigate to it with <C-w>w. What does make it go away is opening a Telescope picker, like "Workspace Diagnostics" (<leader>sd)

To Reproduce

  1. Load the elm code from above:

    myDef: String
    myDef = "Hello"
    
    error in my func
    0.0
  2. Think you need elmls and elm-format installed.
  3. Save the flie :w
  4. The dialog should open, and not be focusable or closable.

Extra infoz image If I do :wq I get this message

Desktop

Neovim Version

NVIM v0.10.0 Build type: RelWithDebInfo LuaJIT 2.1.1707061634 Run ":verbose version" for more info.0

VlaDexa commented 1 month ago

So, what have I found after some digging:

Temporary solution:

Silence all errors from elm_format in conform.nvim opts.

Mini example:

  {
    'stevearc/conform.nvim',
    opts = {
      formatters_by_ft = {
        elm = { 'elm_format', quiet = true }, 
      }
    }
  }

I should mention that this works only on very recent conform.nvim version and isn't even in any stable version, as far as I know. Kickstart by default uses the latest commit of conform, so if you didn't change that, you can pull latest version in Lazy.

What probably should be done

You can open an issue in elm_format mentioning something from this response or try fixing it yourself and open a PR.

feoh commented 1 month ago

Is this really a kickstart issue or more a Telescope/elm LSP issue?

VlaDexa commented 1 month ago

The only way I see to fix it from kickstart is to add configuration for elm formatter. But it's more of a silencing than a fix

feoh commented 1 week ago

OK thanks. Please report this issue to whatever LSP or formatter elm uses :)