Closed rawnly closed 1 year ago
Do you have a link to your config?
closing the issue due to no answer. Feel free to reopen once you've provided your config.
Hey @Uzaaft sorry i've been away. here it is https://github.com/rawnly/nvim-config
prettierd
follows my config locally.
in your plugins/null-ls.lua file try setting up formatters/linters like
"jose-elias-alvarez/null-ls.nvim",
opts = function(_, config)
-- config variable is the default configuration table for the setup function call
-- local null_ls = require "null-ls"
-- Check supported formatters and linters
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
config.sources = {
-- Set a formatter
require("null-ls").builtins.code_actions.eslint_d,
require("null-ls").builtins.diagnostics.eslint_d,
require("null-ls").builtins.formatting.eslint_d,
require("null-ls").builtins.formatting.stylua,
}
return config -- return final config table
end,
}
I had the same problems, eslint not working, prettier not working... So I added those lines above. Notice, that I use eslint_d for formatting here (and not prettier). I normally use eslint-plugin-prettier
to configure eslint to use prettier for formatting and eslint-config-prettier
to harmonise the linting rules. Not sure if this is working as I would expect. I'm still not completely happy with my setup...
i'm going to go ahead and close this issue, since I can't replicate it.
I'm using the typescript pack (no deno) and I can't figure out how to make
prettierd
follow the config file. I had to installprettier
from mason in order to have formatting enabled following the file.Also
eslint_d
warnings are not displayed in the editor, even there I had to installeslint_lsp
from maso.Is this expected?