From 3278adfe58dcda0d8803b5f29c3b851c58325d58 Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Mon, 21 Sep 2026 08:57:28 +0200 Subject: [PATCH] feat: ocaml warns to eval opam env --- nvim/lua/plugins/lsp/ls/ocaml.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nvim/lua/plugins/lsp/ls/ocaml.lua b/nvim/lua/plugins/lsp/ls/ocaml.lua index 5baeb9f..04f725e 100644 --- a/nvim/lua/plugins/lsp/ls/ocaml.lua +++ b/nvim/lua/plugins/lsp/ls/ocaml.lua @@ -11,6 +11,14 @@ lsp.config("ocamllsp", { on_attach = on_attach, }) +vim.api.nvim_create_autocmd('BufReadPost', { + once = true, + pattern = "*.ml", + callback = function() + vim.notify("Make sure to `eval $(opam env)`", vim.log.levels.WARN) + end +}) + -- ── Enable configs ─────────────────────────────────────────────── local enable = vim.lsp.enable enable("ocamllsp")