Skip to content

Commit

Permalink
feat: add dprint lsp
Browse files Browse the repository at this point in the history
  • Loading branch information
WhoIsSethDaniel committed Jan 24, 2024
1 parent 8917d2c commit 44295ed
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions lua/lspconfig/server_configurations/dprint.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
local util = require 'lspconfig.util'

return {
default_config = {
cmd = { 'dprint', 'lsp' },
filetypes = {
'javascript',
'javascriptreact',
'typescript',
'typescriptreact',
'json',
'jsonc',
'markdown',
'python',
'toml',
'rust',
'roslyn',
},
root_dir = util.root_pattern('dprint.json', '.dprint.json', 'dprint.jsonc', '.dprint.jsonc'),
single_file_support = true,
settings = {},
},
docs = {
description = [[
https://github.com/dprint/dprint
Pluggable and configurable code formatting platform written in Rust.
]],
default_config = {
root_dir = util.root_pattern('dprint.json', '.dprint.json', 'dprint.jsonc', '.dprint.jsonc'),
},
},
}

0 comments on commit 44295ed

Please sign in to comment.