Open ayroblu opened 1 year ago
Can you share a minimal reproducible example?
temp.vim
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath=&runtimepath
call plug#begin()
Plug 'nvim-lua/plenary.nvim' "null-ls depends on this
Plug 'neovim/nvim-lspconfig' "prettier depends on this
Plug 'jose-elias-alvarez/null-ls.nvim' "comment out this one and it doesn't work
Plug 'MunifTanjim/prettier.nvim'
call plug#end()
lua <<EOF
local prettier = require("prettier")
prettier.setup({
bin = 'prettier', -- or `'prettierd'` (v0.23.3+)
filetypes = {
"css",
"graphql",
"javascript",
"javascriptreact",
"json",
"less",
"scss",
"typescript",
"typescriptreact",
},
})
EOF
And then I run:
nvim -u temp.vim index.js
jose-elias-alvarez/null-ls.nvim
is a dependency for this plugin. Even if you're not using LSP stuffs, you need to have jose-elias-alvarez/null-ls.nvim
installed. Because prettier.nvim
uses some functions from jose-elias-alvarez/null-ls.nvim
when you run :Prettier
.
I see. Do you want to keep it that way? null-ls is gonna be archived soon too. If you do, feel free to close this
We would eventually move away from null-ls
. But I haven't got the time to do that yet.
In the meantime, I suggest that :Prettier
ought to vocally fail if (a) null-ls
is not detected, and/or (b) the necessary functions cannot be called. By "vocally", I mean simply print out something like null-ls is required, see https://github.com/MunifTanjim/prettier.nvim/issues/29
.
For me, right now, it fails silently, and that's one of the worst ways to fail 😄
doesnt do anything for me with null-ls
Hi, as per the title running
:Prettier
doesn't seem to do anything without null-ls integration I don't want prettier integrated in to lsp, I just want it separately. Is it possible to make it work without lsp integration?