8000 Add documentation for efm neovim integration by danielebra · Pull Request #1197 · djlint/djLint · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add documentation for efm neovim integration #1197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions docs/src/docs/integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,42 @@ Using `coc.nvim`.
- [npm package](https://www.npmjs.com/package/coc-htmldjango)
:::

Using `efm-languageserver`.

::: content

- [GitHub repository](https://github.com/mattn/efm-langserver)

0. Install djlint with Mason via `:MasonInstall djlint`
1. Add `htmldjango` to `filetypes`
2. Create format configuration
```
local djlint = {
formatCommand = "djlint --reformat --quiet --warn -",
formatStdin = true,
}
```
3. Connect language to formatter with `htmldjango = {djlint}`

Sample configuration
``` lua
local djlint = {
formatCommand = "djlint --reformat --quiet --warn -",
formatStdin = true,
}

require "lspconfig".efm.setup {
filetypes = {"htmldjango"},
init_options = {documentFormatting = true},
settings = {
rootMarkers = {".git/"},
languages = {
htmldjango = {djlint}
}
}
}
```

## MegaLinter

djlint is natively embedded within the 100+ linters of [MegaLinter](https://megalinter.io)
Expand Down
0