This repository has been archived by the owner on Apr 16, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Uses https://ocaml.org/p/ocaml-lsp-server/ as language server that can be installed via `opam`. Signed-off-by: Edwin Török <edwin@etorok.net>
- Loading branch information
1 parent
7bec4b4
commit ae19580
Showing
3 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
local ocaml = {} | ||
|
||
ocaml.settings = { | ||
language_server_name = "ocamllsp", | ||
} | ||
|
||
ocaml.autocmds = { | ||
{ | ||
"Filetype", | ||
"ocaml,ocaml_interface,ocamllex", | ||
function() | ||
local langs_utils = require("doom.modules.langs.utils") | ||
langs_utils.use_lsp(doom.langs.ocaml.settings.language_server_name) | ||
|
||
vim.schedule(function() | ||
require("nvim-treesitter.install").ensure_installed("ocaml","ocaml_interface") | ||
if vim.fn.executable("tree-sitter-cli") == 1 then | ||
require("nvim-treesitter.install").ensure_installed("ocamllex") | ||
end | ||
end) | ||
end, | ||
once = true, | ||
}, | ||
} | ||
|
||
return ocaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters