Comments (18)
Error executing vim.schedule lua callback: ...packer/start/plenary.nvim/lua/plenary/async_lib/util.lua:176: Oneshot channel can only send once
running generators for method NULL_LS_CODE_ACTION
"apps/vlui/lib/sb/search.ex" 54L, 1511C [w]
received LSP formatting request
running generators for method NULL_LS_FORMATTING
spawning command mix with args:
{ "format", "-" }
error output: nil
from null-ls.nvim.
A little bit confused about this one, since LSP formatting won't show up under code actions (both for actual LSPs and null-ls). However, it should work when you run vim.lsp.buf.formatting()
and select null-ls, so something else is going on. To verify, do you have mix
available on your $PATH
, and does mix format
work as expected from the command line?
I just tried it out on an Elixir file from a sample repo and it seems to work fine, so it could be a config issue. Could you post your full null-ls config?
from null-ls.nvim.
I also have the issue.
I can confirm that running :lua vim.lsp.buf.formatting()
in the menu does not format. However, using the default language server which has formatting capabilities, the formatting works.
Running the formatter from the path also works, and formats the file correctly.
Configuration: https://github.com/systemctl603/neovim-config
from null-ls.nvim.
@systemctl603 Can you post your debug output? Your config seems fine. Also, can you verify that you see null-ls when you run :LspInfo
?
from null-ls.nvim.
Debug output
running generators for method NULL_LS_DIAGNOSTICS
running generators for method NULL_LS_DIAGNOSTICS
running generators for method NULL_LS_DIAGNOSTICS
received LSP formatting request
running generators for method NULL_LS_FORMATTING
spawning command prettier with args:
{ "--stdin-filepath", "$FILENAME" }
error output: nil
output: nil
received edits from generators
{}
successfully applied edits
Results of :LspInfo
from null-ls.nvim.
Thanks! I see that you're on Windows, and so I suspect this is related to #95. @jalberto Are you also on Windows?
As I said there, I'm going to see if I can get some help on this from the Neovim Matrix chat, but since I don't know anything about Windows and don't have access to a Windows setup to test this on, there's not much I can do without a Windows user who's familiar with uv.spawn
.
from null-ls.nvim.
Not sure if this is the same issue that was closed by 07fd5ab, but could you try updating to the latest version and see if it makes a difference?
from null-ls.nvim.
Sorry for the late reply.
I am on Linux and if I run the forma tin CLI it works as expected.
Also, I noticed something, 1st time I select null-ls do nothing, but if I repeat the command and select again null-ls, then it works as expected.
from null-ls.nvim.
Thanks for confirming. I'm testing this out a bit more and I can see that mix format
has some unusual behavior. Could you quickly verify whether another formatter (e.g. Prettier) is working as expected?
from null-ls.nvim.
from null-ls.nvim.
Got it. I can see that mix format
has a weird interaction with the way null-ls spawns processes and gets their output, and I have to determine whether it's a bug in my implementation, Neovim / luv, or the formatter itself, so this might take a bit.
from null-ls.nvim.
@jalberto When you get a chance, could you please try this branch of the plugin and see if mix works for you?
from null-ls.nvim.
from null-ls.nvim.
For Packer I think you need to set the branch like this:
use({ "jose-elias-alvarez/null-ls.nvim", branch = "fix-spawn-stdout" })
You might also need to comment out the plugin, uninstall it, and then re-install it to get the new branch to work (though I think Packer might have fixed this).
from null-ls.nvim.
from null-ls.nvim.
Great! I need to review and merge another PR first, but once I do, I'll merge the fix-spawn-stdout
branch and close this issue.
from null-ls.nvim.
from null-ls.nvim.
Fix merged in b4a11d8.
from null-ls.nvim.
Related Issues (20)
- Support fbinfer static analysis tool
- Support for pmd/cpd static analysis tool HOT 2
- Support for NASA's Ikos static analyzer
- Add support for typst HOT 2
- Support for PMD 7.x HOT 2
- latex: chktex and proselint cause delay in `gq` formatting HOT 2
- null-ls trying to use user folder as command name on windows HOT 1
- It is very inconvenient that I cannot see the documentation with the help command HOT 1
- Feature request: Only show diagnostics on modified lines HOT 2
- [eslint] failed to decode json: Expected value but found invalid token at character 2() HOT 3
- Code Actions not working (tested on gitsigns) HOT 3
- PrismaFmt built-in replaces the content of schema.prisma file
- Add an option to activate source only if a configuration is found in the project HOT 4
- Full restart of null-ls HOT 4
- goimports-reviser with `-rm-unused` removes the module that not in go.mod
- Mypy fails when buffer is not yet saved
- IMPORTANT: Archiving null-ls HOT 110
- Null-ls is not registering any sources HOT 1
- When registering a source, condition should recursively from current file dir to root
- UTF-8 characters break diagnostics' underline position
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from null-ls.nvim.