Skip to content

Commit

Permalink
Merge pull request #320 from izumin5210/izumin5210/prettier-biome
Browse files Browse the repository at this point in the history
chore(neovim): use biome as language server
  • Loading branch information
izumin5210 authored Apr 7, 2024
2 parents 0e814b5 + 80ce3c1 commit 873b9ca
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion config/.config/nvim/lua/pluginconfig/lspconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ function M.setup_mason_null_ls()
require('mason-null-ls').setup({
ensure_installed = {
-- JavaScript
'biome',
'prettierd',
-- Protocol Buffers
'buf',
Expand All @@ -120,6 +119,16 @@ function M.setup_mason_null_ls()
},
automatic_installation = false,
handlers = {
prettierd = function(source_name, methods)
local null_ls = require('null-ls')
null_ls.register(
null_ls.builtins.formatting.prettierd.with({
condition = function(utils)
return not utils.root_has_file({ 'biome.json' })
end,
})
)
end,
shfmt = function(source_name, methods)
local null_ls = require('null-ls')
null_ls.register(
Expand Down Expand Up @@ -285,6 +294,7 @@ function M.setup()
-- Ruby
'solargraph',
-- JS
'biome',
'eslint',
'tsserver',
'volar',
Expand Down

0 comments on commit 873b9ca

Please sign in to comment.