Replies: 4 comments 3 replies
-
Sorry, I don't have much experience with Helix [[language]]
name = "luau"
scope = "source.luau"
injection-regex = "^luau$"
file-types = ["luau"]
comment-token = "--"
indent = { tab-width = 2, unit = " "}
language-server = { command = "luau-lsp", args = ["lsp"] }
roots = [ "aftman.toml", "default.project.json", "wally.toml" ]
config = {
sourcemap = { enabled = false },
completion = { autocompleteEnd = true }
}
[[grammar]]
name = "luau"
source = { git = "https://github.com/polychromatist/tree-sitter-luau", rev = "34937d73e58bac6aede975c1e30745e74e19feb4" } |
Beta Was this translation helpful? Give feedback.
-
I also tried to configure luau-lsp in helix and everything is working fine except i cant get roblox types to work. [[language]]
name = "luau"
scope = "source.luau"
injection-regex = "^luau$"
file-types = ["luau", "server.luau", "client.luau"]
comment-token = "--"
indent = { tab-width = 2, unit = " "}
language-server = {command = "luau-lsp", args = ["lsp"]}
roots = [ "aftman.toml", "default.project.json", "wally.toml" ]
[language.config]
sourcemap = {enabled = true}
completion = {autocompleteEnd = true}
types = {roblox = true}
[[grammar]]
name = "luau"
source = { git = "https://github.com/polychromatist/tree-sitter-luau", rev = "34937d73e58bac6aede975c1e30745e74e19feb4"} I saw that there is also luau-lsp analyze that takes definitions files as argument so i downloaded globalTypes.d.lua and tried to run that but didnt work anyway. Any idea what Im doing wrong? |
Beta Was this translation helpful? Give feedback.
-
Hello, i decided to give it a try in helix again so i looked how lopi did that in luau-lsp.nvim. Running lsp with all these flags worked for me:
here is my config if someone wants it: [[language]]
name = "luau"
scope = "source.luau"
injection-regex = "^luau$"
file-types = ["luau", "server.luau", "client.luau"]
comment-token = "--"
indent = { tab-width = 2, unit = " "}
language-server = {command = "luau-lsp", args = ["lsp", "--definitions=/home/olgierd/.config/helix/roblox.d.lua", "--docs=/home/olgierd/.config/helix/roblox.json", "--no-flags-enabled", "--flag:LuauPCallDebuggerFix=True", "--flag:LuauReturnsFromCallsitesAreNotWidened=True", "--flag:LuauVariadicOverloadFix=True", "--flag:LuauNeverTypesAndOperatorsInference=True", "--flag:LuauImproveDeprecatedApiLint=True", "--flag:LuauInterpolatedStringBaseSupport=True", "--flag:LuauFixAutocompleteInIf=True", "--flag:LuauMaybeGenericIntersectionTypes=True", "--flag:LuauCompileBuiltinArity=True", "--flag:LuauReduceStackSpills=True", "--flag:LuauOptimizedSort=True", "--flag:LuauReducingAndOr=True", "--flag:LuauTinyControlFlowAnalysis=True", "--flag:LuauBuiltinSSE41=True", "--flag:LuauFixInterpStringMid=True", "--flag:LuauReportShadowedTypeAlias=True", "--flag:LuauCreateCaps=True", "--flag:LuauLintInTypecheck=True", "--flag:LuauTxnLogTypePackIterator=True", "--flag:LuauMultiAssignmentConflictFix=True", "--flag:LuauThreadsafeInstanceTypes=True", "--flag:LuauShadowEnsureMultipleInstances=True", "--flag:LuauDeclareClassPrototype=True", "--flag:LuauBoundLazyTypes2=True", "--flag:LuauEnableNonstrictByDefaultForLuauConfig=True", "--flag:LuauCompileFoldMathK=True", "--flag:LuauImplicitElseRefinement=True", "--flag:LuauReturnAnyInsteadOfICE=True", "--flag:LuauTinyUnifyNormalsFix=True", "--flag:LuauDisableCompletionOutsideQuotes=True", "--flag:LuauTableUnifyRecursionLimit=True", "--flag:LuauNormalizeCombineTableFix=True", "--flag:LuauCompileInterpStringLimit=True", "--flag:LuauStringFormatAnyFix=True", "--flag:LuauParserErrorsOnMissingDefaultTypePackArgument=True", "--flag:LuauSetMetaTableArgsCheck=True", "--flag:LuauLintGlobalNeverReadBeforeWritten=True", "--flag:LuauCloneSkipNonInternalVisit=True", "--flag:LuauToStringPrettifyLocation=True", "--flag:LuauDeprecateTableGetnForeach=True", "--flag:LuauFixBreakpointLineSearch=True", "--flag:LuauCloneCyclicUnions=True", "--flag:LuauTypeCheckerUseCorrectScope=True", "--flag:LuauTypecheckTypeguards=True", "--flag:LuauTableUnifyInstantiationFix=True", "--flag:LuauAutocompleteSkipNormalization=True", "--flag:LuauAllowIndexClassParameters=True", "--flag:LuauFixAutocompleteInFor=True", "--flag:LuauFixAutocompleteInWhile=True", "--flag:LuauNormalizeMetatableFixes=True", "--flag:LuauIntrosort=True", "--flag:LuauBetterOOMHandling=True", "--flag:LuauAnonymousAutofilled1=True", "--flag:LuauNegatedTableTypes=True", "--flag:LuauNegatedClassTypes=True", "--flag:LuauArrBoundResizeFix=True", "--flag:LuauReuseHashSlots2=True", "--flag:LuauFasterFormatS=True", "--flag:LuauCompileFenvNoBuiltinFold=True", "--flag:LuauImproveForN2=True", "--flag:LuauUnifyAnyTxnLog=True", "--flag:LuauClonePublicInterfaceLess2=True", "--flag:LuauCompileContinueCloseUpvals=True", "--flag:LuauCompileTopCold=True", "--flag:LuauKeepVmapLinear=False", "--flag:LuauUniformTopHandling=True", "--flag:LuauTypeMismatchInvarianceInError=True", "--flag:LuauMatchReturnsOptionalString=True", "--flag:LuauCompleteVisitor=True", "--flag:LuauTarjanSingleArr=True", "--flag:LuauSubstitutionReentrant=True", "--flag:LuauTypecheckClassTypeIndexers=True", "--flag:LuauReportTypeMismatchForTypePackUnificationFailure=True", "--flag:LuauTryhardAnd=True", "--flag:LuauIndexTableIntersectionStringExpr=True", "--flag:LuauCompileTerminateBC=True", "--flag:LuauParseDeclareClassIndexer=True", "--flag:LuauBinaryNeedsExpectedTypesToo=True", "--flag:LuauBetterMessagingOnCountMismatch=True", "--flag:LuauCopyExportedTypes=True", "--flag:LuauOnDemandTypecheckers=True", "--flag:LuauVariadicAnyCanBeGeneric=True", "--flag:LuauFunctionReturnStringificationFixup=True", "--flag:LuauOsTimegm=True", "--flag:LuauFixBuildQueueExceptionUnwrap=True", "--flag:LuauMergeTagLoads=True", "--flag:LuauNegatedFunctionTypes=True", "--flag:LuauOverloadedFunctionSubtypingPerf=True", "--flag:LuauCompleteTableKeysBetter=True", "--flag:LuauInlineArrConstOffset=True", "--flag:LuauAutocompleteLastTypecheck=True", "--flag:LuauCleanPoisonedDebugContext=True", "--flag:LuauLexerConsumeFast=True", "--flag:LuauFasterInterp=True", "--flag:LuauNormalizeCyclicUnions=True", "--flag:LuauTypecheckCancellation=True", "--flag:LuauProfilerCustomCalls=True", "--flag:LuauRespectExistingSpace=True", "--flag:LuauCallableClasses=True", "--flag:LuauTransitiveSubtyping=True", "--flag:LuauFollowInLvalueIndexCheck=True", "--flag:LuauMaintainScopesInUnifier=True", "--flag:LuauClassTypeVarsInSubstitution=True", "--flag:LuauTypeInferMissingFollows=True", "--flag:LuauRequirePathTrueModuleName=True", "--flag:LuauIntersectionTestForEquality=True", "--flag:LuauSelfAssignmentSkip=True", "--flag:LuauCompileFunctionType=True", "--flag:LuauLoadCheckGC=True", "--flag:LuauScopelessModule=True", "--flag:LuauAssignmentHasCost=True", "--flag:LuauSplitFrontendProcessing=True", "--flag:LuauSubstitutionFixMissingFields=True", "--flag:LuauAutocompleteStringContent=True", "--flag:LuauLintNativeComment=True", "--flag:LuauCompileNativeComment=True", "--flag:LuauFixCyclicModuleExports=True", "--flag:LuauDontExtendUnsealedRValueTables=True", "--flag:LuauCheckGetInfoIndex=True", "--flag:LuauAutocompleteStringLiteralBounds=True", "--flag:LuauUnseeArrayTtv=True", "--flag:LuauBuiltInMetatableNoBadSynthetic=True", "--flag:LuauFasterNoise=True", "--flag:LuauFasterTableConcat=True", "--flag:LuauCompileBuiltinTonumber=True", "--flag:LuauCompileBuiltinTostring=True", "--flag:LuauOccursIsntAlwaysFailure=True", "--flag:LuauWeakGlobalApiSurface=False", "--flag:LuauTypecheckLimitControls=True", "--flag:LuauUninhabitedSubAnything2=True", "--flag:LuauCompileInlineDefer=True", "--flag:LuauGetImportDirect=True", "--flag:LuauNormalizeBlockedTypes=True", "--flag:LuauScalarShapeSubtyping=True", "--flag:LuauAutocompleteHideSelfArg=True", "--flag:LuauTypeNormalization2=True", "--flag:LuauSubtypeNormalizer=True", "--flag:LuauScalarShapeUnifyToMtOwner2=True", "--flag:LuauDefinitionFileSourceModule=True", "--flag:LuauTypecheckLimitControlFix=True", "--flag:LuauCompileLimitInsns=True", "--flag:LuauIndentTypeMismatch=True", "--flag:LuauCompileFixBuiltinArity=True", "--flag:LuauNonStrictByDefaultBetaFeature=True", "--flag:LuauErrorDoubleHexPrefix=True", "--flag:LuauUnknownAndNeverType=True"]}
roots = [ "aftman.toml", "default.project.json", "wally.toml" ]
[language.config]
sourcemap = {enabled = true}
completion = {autocompleteEnd = true}
types = {roblox = true}
[[grammar]]
name = "luau"
source = { git = "https://github.com/polychromatist/tree-sitter-luau", rev = "34937d73e58bac6aede975c1e30745e74e19feb4"} |
Beta Was this translation helpful? Give feedback.
-
So I decided to give helix another shot and I am still not able to get configuration working on helix. I tried adding the fflags mentioned above, but that didn't help (I'm not using roblox types most of the time so it didn't really apply to me anyway). End completion still doesn't work. I have also tried this on linux and windows and on different computers, but it doesn't work on any of them. So I guess that rules out some os-specific weirdness. I took a closer look this time and ran helix with the Here is the full log:
|
Beta Was this translation helpful? Give feedback.
-
Hello, I've been setting up luau-lsp in Helix and it's worked mostly great, however I can't seem to configure it. As you can see in the config below, I'm trying to enable autocompleteEnd and disable sourcemap. There are no errors in the log (other than the warning that I don't have a sourcemap.json). I'm new to lsp stuff so I'm wondering if I'm doing something wrong? I couldn't find a list of configuration options and ended up just using what I could find in the package.json for the vscode plugin. Maybe this is a Helix problem?
Beta Was this translation helpful? Give feedback.
All reactions