jose-elias-alvarez / typescript.nvim

A Lua plugin, written in TypeScript, to write TypeScript (Lua optional).
The Unlicense
496 stars 33 forks source link

a2e235e removes `with` support for null-ls integration #55

Closed datwaft closed 1 year ago

datwaft commented 1 year ago

As the title says, when updating to a2e235e it breaks the with keyword when using the null-ls integration.

Failed to run `config` for null-ls.nvim

...ot/Users/datwaft/.config/nvim.lazy/fnl/conf/lsp/init.lua:69: attempt to call field 'with' (a nil value)

# stacktrace:
  - ~/.cache/nvim/hotpot/Users/datwaft/.config/nvim.lazy/fnl/conf/lsp/init.lua:69 _in_ **config**
  - ~/.config/nvim.lazy/init.lua:78

Here is the important code snippet:

    (let [{: formatting
           : diagnostics
           : hover
           : completion
           :code_actions actions} null.builtins
          typescript-actions (require :typescript.extensions.null-ls.code-actions)]
      [formatting.stylua
       (formatting.prettierd.with {:condition (fn [utils]
                                                (not (utils.root_has_file ["deno.json" "deno.jsonc"])))})
       formatting.markdownlint
       formatting.black
       formatting.isort
       (diagnostics.pylint.with {:prefer_local ".venv/bin"})
       (diagnostics.mypy.with {:prefer_local ".venv/bin"})
       (typescript-actions.with {:condition (fn [utils]
                                              (not (utils.root_has_file ["deno.json" "deno.jsonc"])))})]))

It is in Fennel but if you need I can translate it to Lua.

jose-elias-alvarez commented 1 year ago

Whoops, my bad. I think f66d4472606cb24615dfb7dbc6557e779d177624 should take care of this, but let me know.

datwaft commented 1 year ago

It works once again, thanks!

I will now close the issue.