feat: OCAML support
This commit is contained in:
1 parent
e76bf33934
commit
c1eb78da9c
3 files changed
+86
-67
No files matched your search
@@ -0,0 +1,16 @@
|
||||
-- ┌ ┐
|
||||
-- │ OCAML │
|
||||
-- └ ┘
|
||||
local lsp = vim.lsp
|
||||
|
||||
local capabilities = require("lsp-options").capabilities
|
||||
local on_attach = require("lsp-options").on_attach
|
||||
|
||||
lsp.config("ocamllsp", {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
-- ── Enable configs ───────────────────────────────────────────────
|
||||
local enable = vim.lsp.enable
|
||||
enable("ocamllsp")
|
||||
@@ -1,56 +1,58 @@
|
||||
return {
|
||||
-- lsp package manager
|
||||
"mason-org/mason.nvim",
|
||||
dependencies = {
|
||||
"mason-org/mason-lspconfig.nvim",
|
||||
},
|
||||
config = function()
|
||||
-- import mason
|
||||
local mason = require("mason")
|
||||
-- lsp package manager
|
||||
"mason-org/mason.nvim",
|
||||
dependencies = {
|
||||
"mason-org/mason-lspconfig.nvim",
|
||||
},
|
||||
config = function()
|
||||
-- import mason
|
||||
local mason = require("mason")
|
||||
|
||||
-- import mason-lspconfig
|
||||
local mason_lspconfig = require("mason-lspconfig")
|
||||
-- import mason-lspconfig
|
||||
local mason_lspconfig = require("mason-lspconfig")
|
||||
|
||||
-- enable mason and configure icons
|
||||
mason.setup({
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = "✔",
|
||||
package_pending = "➜",
|
||||
package_uninstalled = "✗",
|
||||
},
|
||||
},
|
||||
})
|
||||
-- enable mason and configure icons
|
||||
mason.setup({
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = "✔",
|
||||
package_pending = "➜",
|
||||
package_uninstalled = "✗",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- list of servers for mason to install
|
||||
mason_lspconfig.setup({
|
||||
ensure_installed = {
|
||||
"asm_lsp",
|
||||
"bashls",
|
||||
"clangd",
|
||||
"cssls",
|
||||
"docker_language_server",
|
||||
"gh_actions_ls",
|
||||
"gopls",
|
||||
"html",
|
||||
"hls",
|
||||
"hyprls",
|
||||
"intelephense",
|
||||
"jdtls",
|
||||
"jsonls",
|
||||
"marksman",
|
||||
"lua_ls",
|
||||
-- list of servers for mason to install
|
||||
mason_lspconfig.setup({
|
||||
ensure_installed = {
|
||||
"asm_lsp",
|
||||
"bashls",
|
||||
"clangd",
|
||||
"cssls",
|
||||
"docker_language_server",
|
||||
"gh_actions_ls",
|
||||
"gopls",
|
||||
"html",
|
||||
"hls",
|
||||
"hyprls",
|
||||
"intelephense",
|
||||
"jdtls",
|
||||
"jsonls",
|
||||
"marksman",
|
||||
"lua_ls",
|
||||
"ocaml-lsp",
|
||||
"ocamlformat",
|
||||
"postgres_lsp",
|
||||
"pyright",
|
||||
"rust_analyzer",
|
||||
-- "ruby_lsp",
|
||||
"verible",
|
||||
"vtsls",
|
||||
"vue_ls",
|
||||
"yamlls"
|
||||
},
|
||||
-- auto-install configured servers (with lspconfig)
|
||||
automatic_enable = false,
|
||||
})
|
||||
end,
|
||||
"pyright",
|
||||
"rust_analyzer",
|
||||
-- "ruby_lsp",
|
||||
"verible",
|
||||
"vtsls",
|
||||
"vue_ls",
|
||||
"yamlls",
|
||||
},
|
||||
-- auto-install configured servers (with lspconfig)
|
||||
automatic_enable = false,
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -12,12 +12,17 @@ return {
|
||||
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
null_ls.builtins.formatting.stylua.with({
|
||||
extra_args = {
|
||||
'--indent-type',
|
||||
'Spaces'
|
||||
}
|
||||
}),
|
||||
null_ls.builtins.formatting.asmfmt,
|
||||
null_ls.builtins.formatting.black,
|
||||
null_ls.builtins.formatting.clang_format,
|
||||
null_ls.builtins.formatting.dart_format,
|
||||
require("none-ls.diagnostics.eslint_d"),
|
||||
require("none-ls.code_actions.eslint_d"),
|
||||
require("none-ls.formatting.eslint_d").with( {
|
||||
timeout = 4000
|
||||
} ),
|
||||
null_ls.builtins.formatting.ocamlformat,
|
||||
null_ls.builtins.formatting.phpcbf,
|
||||
null_ls.builtins.formatting.prettier.with({
|
||||
filetypes = {
|
||||
"css",
|
||||
@@ -56,18 +61,14 @@ return {
|
||||
"true",
|
||||
},
|
||||
}),
|
||||
null_ls.builtins.formatting.shfmt,
|
||||
null_ls.builtins.formatting.phpcbf,
|
||||
null_ls.builtins.formatting.asmfmt,
|
||||
null_ls.builtins.code_actions.proselint,
|
||||
null_ls.builtins.formatting.dart_format,
|
||||
require("none-ls.diagnostics.eslint_d"),
|
||||
require("none-ls.code_actions.eslint_d"),
|
||||
require("none-ls.formatting.eslint_d").with( {
|
||||
timeout = 4000
|
||||
} ),
|
||||
null_ls.builtins.formatting.black,
|
||||
null_ls.builtins.formatting.clang_format
|
||||
null_ls.builtins.formatting.shfmt,
|
||||
null_ls.builtins.formatting.stylua.with({
|
||||
extra_args = {
|
||||
'--indent-type',
|
||||
'Spaces'
|
||||
}
|
||||
}),
|
||||
},
|
||||
})
|
||||
end,
|
||||
|
||||
Reference in new issue
Block a user