Added OCAml and Markdown lua support
This commit is contained in:
parent
4df59fd01a
commit
39ae20d3ae
|
|
@ -0,0 +1,17 @@
|
|||
return {
|
||||
cmd = { 'ocamllsp' },
|
||||
filetypes = {
|
||||
'ocaml',
|
||||
'ocaml.interface',
|
||||
'ocaml.menhir',
|
||||
'ocaml.ocamllex',
|
||||
'dune',
|
||||
'reason',
|
||||
},
|
||||
root_markers = {
|
||||
{ 'dune-project', 'dune-workspace' },
|
||||
{ '*.opam', 'esy.json', 'package.json' },
|
||||
'.git',
|
||||
},
|
||||
settings = {},
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
-- Minimal OCaml behavior: ocp-indent for typing, ocamlformat via ocamllsp on save.
|
||||
-- 1) Disable ancient builtin ocaml indent script (we will use ocp-indent)
|
||||
-- 4) Format-on-save: use only ocamllsp to format the buffer before write.
|
||||
-- Keeps formatting deterministic and avoids other formatters stepping in.
|
||||
vim.api.nvim_create_autocmd('BufWritePre', {
|
||||
pattern = { '*.ml', '*.mli' },
|
||||
callback = function()
|
||||
if vim.bo.filetype == 'ocaml' then
|
||||
vim.lsp.buf.format {
|
||||
async = false,
|
||||
filter = function(client)
|
||||
return client.name == 'ocamllsp'
|
||||
end,
|
||||
}
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
return {
|
||||
'MeanderingProgrammer/render-markdown.nvim',
|
||||
dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-mini/mini.nvim' }, -- if you use the mini.nvim suite
|
||||
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-mini/mini.icons' }, -- if you use standalone mini plugins
|
||||
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons
|
||||
---@module 'render-markdown'
|
||||
---@type render.md.UserConfig
|
||||
opts = {},
|
||||
}
|
||||
Loading…
Reference in New Issue