Skip to content

Commit

Permalink
chore(neovim): use only local prettier and biome
Browse files Browse the repository at this point in the history
  • Loading branch information
izumin5210 committed Apr 7, 2024
1 parent 3bd003e commit b63e37d
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion config/.config/nvim/lua/pluginconfig/lspconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function M.setup_mason_null_ls()
ensure_installed = {
-- JavaScript
'biome',
'prettierd',
'prettier',
-- Protocol Buffers
'buf',
-- Dockerfile
Expand All @@ -120,6 +120,22 @@ function M.setup_mason_null_ls()
},
automatic_installation = false,
handlers = {
prettier = function(source_name, methods)
local null_ls = require('null-ls')
null_ls.register(
null_ls.builtins.formatting.prettier.with({
only_local = 'node_modules/.bin'
})
)
end,
biome = function(source_name, methods)
local null_ls = require('null-ls')
null_ls.register(
null_ls.builtins.formatting.biome.with({
only_local = 'node_modules/.bin'
})
)
end,
shfmt = function(source_name, methods)
local null_ls = require('null-ls')
null_ls.register(
Expand Down

0 comments on commit b63e37d

Please sign in to comment.