Skip to content

docs: add vim lsp config docs #243

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

Merged
merged 1 commit into from
Jul 30, 2023
Merged
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
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,27 @@ for wiki-links to detect broken references and duplicate/ambiguous headings.
* via [mason.nvim][mason-nvim] (automatic server installation) (requires [mason-lspconfig.nvim][mason-nvim-lsp-config])
* via [nvim-lspconfig][nvim-marksman],
* via [CoC-marksman][coc-marksman].
* Vim:
* via [ale](ale) - will support Marksman out-of-the-box once [PR](https://github.com/dense-analysis/ale/pull/4565) is merged; in the meantime...

Example config (add the following to your `~/.vim/after/ftplugin/markdown.vim`):

```viml
if exists('g:loaded_ale')
call ale#linter#Define('markdown', { 'name': 'marksman', 'lsp': 'stdio', 'executable': 'marksman', 'command': '%e server', 'initialization_options': {} })
end
```

* via [lsp](lsp)

Example config (add the following to your `~/.vim/after/ftplugin/markdown.vim`):

```viml
if exists('g:loaded_lsp')
call LspAddServer([#{ name: 'marksman', filetype: ['markdown'], path: '/path/to/marksman', args: ['server'], syncInit: v:true }])
end
```

* Emacs:
* via [LSP Mode](https://emacs-lsp.github.io/lsp-mode/page/lsp-marksman/) (automatic server installation).

Expand All @@ -65,7 +86,7 @@ for wiki-links to detect broken references and duplicate/ambiguous headings.
`init.el`

```lisp
(add-to-list 'eglot-server-programs '(markdown-mode . ("marksman")))
(add-to-list 'eglot-server-programs '(markdown-mode . ("marksman")))
(add-hook 'markdown-mode-hook #'eglot-ensure)
```
* [Helix](https://helix-editor.com/) supports Marksman out of the box. However, you need add `marksman` binary to
Expand Down Expand Up @@ -144,3 +165,5 @@ LSP but it's not a part of the spec at least until and including v3.17.
[eglot-marksman-pr]: https://github.com/joaotavora/eglot/pull/1013

[sublime-marksman]: https://github.com/bitsper2nd/LSP-marksman

[ale]: https://github.com/dense-analysis/ale