Open petobens opened 7 months ago
I was literally trying to do the exact same thing you did. Even trying to enable the stdin
setting for the linter config, given that the default parameter is actually wrong and sqlfluff
does indeed support linting from stdin. But no joy. Then I found your issue.
Bumping this issue.
Hi @gustavooferreira and @mfussenegger. This seems to be a general problem beyond sqlfluff.
I tried a similar exercise to the one in my OP but using markdownlint this time. In the terminal echo "Some veryyyyyyyyyyyyyyyyyyyyyyy looooooooooooooooooooooongggggggggg lineeeeeeeeeeeeeeeeeeeeeee indeed" | markdownlint --stdin
works fine but if if I add stdin settings to the linter config as in
local linters = require('lint').linters
linters.markdownlint.args = { '--stdin'}
linters.markdownlint.stdin = true
then nothing happens. On the other hand if I remove the stdin lines then markdownlint does work but, as in the GIF, there is obviously no TextChanged triggered diagnostics (only when I save they get triggered).
I'm also having this issue with eslint_d, anyone found a solution?
Consider the following init.lua file:
Now, as in the GIF, do
foo.sql
file withSELECT 1
,
to the line and exit insert modeAfter 3. I would expect nvim lint to show diagnostics (since stdin is enabled and something like
echo "SELECT 1," | sqlfluff lint --format=json --dialect=postgres -
in the terminal works just fine).