fix: Don't auto enable luau-lsp with Mason

This commit is contained in:
Ahmad Ansori Palembani 2025-06-13 10:49:37 +07:00
parent 0ebbbee7f8
commit 0a3364d202
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: BA64F8B60AF3EFB6
2 changed files with 29 additions and 24 deletions

View file

@ -6,19 +6,19 @@
"git-conflict.nvim": { "branch": "main", "commit": "4bbfdd92d547d2862a75b4e80afaf30e73f7bbb4" },
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lualine.nvim": { "branch": "master", "commit": "0c6cca9f2c63dadeb9225c45bc92bb95a151d4af" },
"luau-lsp.nvim": { "branch": "main", "commit": "f81c6c713e4598abc484cbeabca918475d176c54" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "87888865fa1ce1928a25b9abbea8c8f7839bf522" },
"lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" },
"luau-lsp.nvim": { "branch": "nvim-011", "commit": "c339fde528f2ed378025c3d6229120003dd83d24" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "bef29b653ba71d442816bf56286c2a686210be04" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "93a9ff9b34c91c0cb0f7de8d5f7e4abce51d8903" },
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "f481de16a0eb59c985abac8985e3f2e2f75b4875" },
"nui.nvim": { "branch": "main", "commit": "7cd18e73cfbd70e1546931b7268b3eebaeff9391" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
"nvim-lint": { "branch": "master", "commit": "b47cbb249351873e3a571751c3fb66ed6369852f" },
"nvim-lspconfig": { "branch": "master", "commit": "d45702594afc661a9dfa95e96acf18c56006d4d9" },
"nvim-lint": { "branch": "master", "commit": "2b0039b8be9583704591a13129c600891ac2c596" },
"nvim-lspconfig": { "branch": "master", "commit": "f6d31b1c17f1a338ddcf56aaa930a8c88e904662" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" },
"oil.nvim": { "branch": "master", "commit": "685cdb4ffa74473d75a1b97451f8654ceeab0f4a" },
"oil.nvim": { "branch": "master", "commit": "08c2bce8b00fd780fb7999dbffdf7cd174e896fb" },
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
"tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },

View file

@ -39,7 +39,11 @@ return {
"luau_lsp",
-- << Lua
},
automatic_installation = { exclude = { "rust_analyzer" } },
automatic_enable = {
excluded = {
"luau_lsp", -- Already handled by "lopi-py/luau-lsp.nvim"
},
}
},
config = function(_, opts)
require("mason-lspconfig").setup(opts)
@ -65,6 +69,7 @@ return {
},
{
"lopi-py/luau-lsp.nvim",
branch = "nvim-011",
lazy = true,
opts = {
},
@ -155,7 +160,22 @@ return {
},
},
}
-- vim.lsp.enable("emmylua_ls")
vim.lsp.enable("emmylua_ls")
vim.lsp.config["luau_lsp"] = {
capabilities = capabilities,
on_attach = on_attach,
settings = {
-- https://github.com/folke/neoconf.nvim/blob/main/schemas/luau_lsp.json
["luau-lsp"] = {
completion = {
imports = {
enabled = true, -- enable auto imports
},
},
},
},
}
-- This will setup AND enable "luau_lsp", so vim.lsp.enable(...) is not needed
require("luau-lsp").setup {
platform = {
type = "roblox",
@ -169,22 +189,7 @@ return {
rojo_project_file = "default.project.json",
sourcemap_file = "sourcemap.json",
},
server = {
capabilities = capabilities,
on_attach = on_attach,
settings = {
-- https://github.com/folke/neoconf.nvim/blob/main/schemas/luau_lsp.json
["luau-lsp"] = {
completion = {
imports = {
enabled = true, -- enable auto imports
},
},
},
},
},
}
-- vim.lsp.enable("luau_lsp")
vim.lsp.config["rust_analyzer"] = {
capabilities = capabilities,
settings = {