Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .idea/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!-- THE Rider/ReSharper version. Everything else is derived from it: WaveVersion below, and Gradle's ProductVersion
(build.gradle.kts reads this line). Exact NuGet form, e.g. 2026.1.5.2 / 2026.2.0-rc01 / 2026.3.0-eap02.
See docs/rider-version.md. -->
<SdkVersion>2026.1.5.2</SdkVersion>
<SdkVersion>2026.3.0-eap07</SdkVersion>

<Title>Rimworld Development Environment</Title>
<Description>Bring the intelligence of your IDE to Rimworld XML files. Use information backed by Rimworlds DLL file to autocomplete your XML, Ctrl+Click into the C# that your XML gets translated into and see what options you have when adding items in your mods!</Description>
Expand Down
5 changes: 5 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ dependencies {

bundledPlugin("com.intellij.resharper.unity")
bundledModule("intellij.spellchecker")

// Since 2026.3 these are separate product modules rather than part of the core classpath. rdclient.dotnet has
// RiderTypingPolicy/RiderEditorActionPolicy, SimpleOptionsPage and Project.solution; languages has the C# PSI.
bundledModule("intellij.rider.rdclient.dotnet")
bundledModule("intellij.rider.languages")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,16 @@

<!-- NuGet gives a .NET host the net8.0 builds of these two packages, but the SDK's component scanner cannot read
the net8.0 JetBrains.Lifetimes metadata (MaybeNullWhenAttribute resolution fails and the shell never starts)
once anything makes it scan our plugin assembly. JetBrains' own test projects always run the net472 builds, which
the runtime loads fine, so use those. -->
once anything makes it scan our plugin assembly. Use the netstandard2.0 builds: from 2026.3 the Rider.Backend
package also ships DotFiles/NetCore/netstandard2.0/JetBrains.Lifetimes.dll into the output, and the shell's
assembly binder refuses to start if the root copy is a different build (e.g. net472) with a different MVID. -->
<Target Name="UseNetFrameworkJetBrainsLibs" AfterTargets="Build">
<ItemGroup>
<!-- Whatever version NuGet resolved, so this follows SdkVersion with no hard-coded package path; the net472 build
sits next to the one NuGet picked, in the same package folder. -->
<_JetPinnedLib Include="@(RuntimeCopyLocalItems)"
Condition="'%(RuntimeCopyLocalItems.Extension)' == '.dll' And ('%(RuntimeCopyLocalItems.NuGetPackageId)' == 'JetBrains.Lifetimes' Or '%(RuntimeCopyLocalItems.NuGetPackageId)' == 'JetBrains.RdFramework')" />
<_JetNetFxLib Include="@(_JetPinnedLib->'%(RootDir)%(Directory)..\net472\%(Filename)%(Extension)')" />
<_JetNetFxLib Include="@(_JetPinnedLib->'%(RootDir)%(Directory)..\netstandard2.0\%(Filename)%(Extension)')" />
</ItemGroup>
<Error Condition="'@(_JetNetFxLib->Count())' != '2'"
Text="Expected JetBrains.Lifetimes and JetBrains.RdFramework among the resolved packages, found: @(_JetPinnedLib->'%(NuGetPackageId) %(NuGetPackageVersion)')" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Completion: Basic
Count: 2
Focus: Hard
Rules: [\w] => add_to_prefix
Range: "<leaveResourcesWhenKilled>♦"

##### RELEVANCE SORT #####

[FromSingleCompletion, FromLightAndDynamicEvaluation, NormalSelectionPriority, Other]
[FromLightEvaluation, NormalSelectionPriority, Other]
false <==
true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
Prefix: "Thou"
Count: 1
Focus: Hard
Rules: [\w] => add_to_prefix
Range: "<Thou♦"
▲▲▲▲▲

##### RELEVANCE SORT #####

[FromSingleCompletion, FromLightAndDynamicEvaluation, PrefixMatch, NormalSelectionPriority, Other]
[FromLightEvaluation, PrefixMatch, NormalSelectionPriority, Other]
ṬḥọụghtDef OrderStr='ThoughtDef T' <==

##### ALPHABETIC SORT #####
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Completion: Basic
Count: 2
Focus: Hard
Rules: [\w] => add_to_prefix
Range: "<minifiedDef>♦</minifiedDef>"

##### RELEVANCE SORT #####

[FromSingleCompletion, FromLightAndDynamicEvaluation, NormalSelectionPriority, Other]
[FromLightEvaluation, NormalSelectionPriority, Other]
OtherThing <==
TestThingB

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Completion: Basic
Count: 2
Focus: Hard
Rules: [\w] => add_to_prefix
Range: "<minifiedDef>♦</minifiedDef>"

##### RELEVANCE SORT #####

[FromSingleCompletion, FromLightAndDynamicEvaluation, NormalSelectionPriority, Other]
[FromLightEvaluation, NormalSelectionPriority, Other]
TestThingA <==
TestThingB

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Completion: Basic
Count: 2
Focus: Hard
Rules: [\w] => add_to_prefix
Range: "<li>♦"

##### RELEVANCE SORT #####

[FromSingleCompletion, FromLightAndDynamicEvaluation, NormalSelectionPriority, Other]
[FromLightEvaluation, NormalSelectionPriority, Other]
Metallic <==
Woody

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Completion: Basic
Count: 12
Focus: Hard
Rules: [\w] => add_to_prefix
Range: "<category>♦</category>"

##### RELEVANCE SORT #####

[FromSingleCompletion, FromLightAndDynamicEvaluation, NormalSelectionPriority, Other]
[FromLightEvaluation, NormalSelectionPriority, Other]
Attachment 8 <==
Building 3
Ethereal 10
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Completion: Basic
Count: 1
Focus: Hard
Rules: [\w] => add_to_prefix
Range: "<♦"

##### RELEVANCE SORT #####

[FromSingleCompletion, FromLightAndDynamicEvaluation, NormalSelectionPriority, Other]
[FromLightEvaluation, NormalSelectionPriority, Other]
compClass Type <==

##### ALPHABETIC SORT #####
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
Prefix: "always"
Count: 1
Focus: Hard
Rules: [\w] => add_to_prefix
Range: "<always♦"
▲▲▲▲▲▲▲

##### RELEVANCE SORT #####

[FromSingleCompletion, FromLightAndDynamicEvaluation, PrefixMatch, NormalSelectionPriority, Other]
[FromLightEvaluation, PrefixMatch, NormalSelectionPriority, Other]
ạḷẉạỵṣDisplayAsUsingPower bool <==

##### ALPHABETIC SORT #####
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Completion: Basic
Count: 2
Focus: Hard
Rules: [\w] => add_to_prefix
Range: "<minifiedDef>♦</minifiedDef>"

##### RELEVANCE SORT #####

[FromSingleCompletion, FromLightAndDynamicEvaluation, NormalSelectionPriority, Other]
[FromLightEvaluation, NormalSelectionPriority, Other]
CustomThing <==
TestThing

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
Prefix: "cus"
Count: 3
Focus: Hard
Rules: [\w] => add_to_prefix
Range: "<cus♦"
▲▲▲▲

##### RELEVANCE SORT #####

[PrefixMatch]
c̣ụṣtomField int <==
[FromSingleCompletion^, FromLightAndDynamicEvaluation^, NormalSelectionPriority^, Other^]
[FromLightEvaluation^, NormalSelectionPriority^, Other^]
c̣anBeỤṣedUnderRoof bool
hasC̣ụṣtomRectForSelector bool

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Completion: Basic
Count: 2
Focus: Hard
Rules: [\w] => add_to_prefix
Range: "<♦"

##### RELEVANCE SORT #####

[FromSingleCompletion, FromLightAndDynamicEvaluation, NormalSelectionPriority, Other]
[FromLightEvaluation, NormalSelectionPriority, Other]
compClass Type <==
customValue float

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Completion: Basic
Count: 34
Focus: Hard
Rules: [\w] => add_to_prefix
Range: "<♦"

##### RELEVANCE SORT #####

[FromSingleCompletion, FromLightAndDynamicEvaluation, NormalSelectionPriority, Other]
[FromLightEvaluation, NormalSelectionPriority, Other]
addTopAltitudeBias bool <==
allowAtlasing bool
allowFlip bool
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Completion: Basic
Count: 1
Focus: Hard
Rules: [\w] => add_to_prefix
Range: "<ThingDef ParentName="♦">"

##### RELEVANCE SORT #####

[FromSingleCompletion, FromLightAndDynamicEvaluation, NormalSelectionPriority, Other]
[FromLightEvaluation, NormalSelectionPriority, Other]
AbstractBase <==

##### ALPHABETIC SORT #####
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Completion: Basic
Count: 5
Focus: Hard
Rules: [\w] => add_to_prefix
Range: "<defaultPlacingRot>♦</defaultPlacingRot>"

##### RELEVANCE SORT #####

[FromSingleCompletion, FromLightAndDynamicEvaluation, NormalSelectionPriority, Other]
[FromLightEvaluation, NormalSelectionPriority, Other]
East Rot4 <==
Invalid Rot4
North Rot4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
Prefix: "altit"
Count: 2
Focus: Hard
Rules: [\w] => add_to_prefix
Range: "<altit♦"
▲▲▲▲▲▲

##### RELEVANCE SORT #####

[PrefixMatch]
ạḷṭịṭudeLayer AltitudeLayer <==
[FromSingleCompletion^, FromLightAndDynamicEvaluation^, NormalSelectionPriority^, Other^]
[FromLightEvaluation^, NormalSelectionPriority^, Other^]
blocksẠḷṭịṭudes List<AltitudeLayer>

##### ALPHABETIC SORT #####
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Completion: Basic
Count: 2
Focus: Hard
Rules: [\w] => add_to_prefix
Range: "public static ThingDef Get() => DefDatabase<ThingDef>.GetNamed("♦");"

##### RELEVANCE SORT #####

[FromSingleCompletion, FromLightAndDynamicEvaluation, NotObsolete, ObsoleteRuleApplied, NormalSelectionPriority, Other]
[FromLightEvaluation, NotObsolete, ObsoleteRuleApplied, NormalSelectionPriority, Other]
ModThingA <==
ModThingB

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
Prefix: "Mod"
Count: 4
Focus: Hard
Rules: [\w] => add_to_prefix
Range: "public static ThingDef Mod♦"
▲▲▲▲

##### RELEVANCE SORT #####

[FromSingleCompletion, FromLightAndDynamicEvaluation, PrefixMatch, NotObsolete, ObsoleteRuleApplied, NormalSelectionPriority, Other]
[FromLightEvaluation, PrefixMatch, NotObsolete, ObsoleteRuleApplied, NormalSelectionPriority, Other]
ṂọḍDef <==
ṂọḍThingA
ṂọḍThingB
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
Prefix: "Mod"
Count: 4
Focus: Hard
Rules: [\w] => add_to_prefix
Range: "public static ThingDef Mod♦;"
▲▲▲▲

##### RELEVANCE SORT #####

[FromSingleCompletion, FromLightAndDynamicEvaluation, PrefixMatch, NotObsolete, ObsoleteRuleApplied, NormalSelectionPriority, Other]
[FromLightEvaluation, PrefixMatch, NotObsolete, ObsoleteRuleApplied, NormalSelectionPriority, Other]
ṂọḍDef <==
ṂọḍThingA
ṂọḍThingB
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Please commit this file, it's crucial for tests stability. Even if you believe it's not yours, it still needs to be committed.
# Input (NuGetFramework=net35):
# JetBrains.Annotations [2026.2.0]
JetBrains.Annotations 2026.2.0
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
Prefix: "myLoc"
Count: 1
Focus: Hard
Rules: [ =] & prefix="_" => hide_lookup
["$] & prefix="@" => hide_lookup
[\w] => add_to_prefix
Range: "myLoc♦"
▲▲▲▲▲▲

##### RELEVANCE SORT #####

[FromSingleCompletion, FromLightAndDynamicEvaluation, PrefixMatch, LocalVariablesAndParameters, NotObsolete, ObsoleteRuleApplied, NormalSelectionPriority, ClosestLocalVar, Other]
[FromLightEvaluation, PrefixMatch, LocalVariablesAndParameters, NotObsolete, ObsoleteRuleApplied, NormalSelectionPriority, ClosestLocalVar, Other]
ṃỵḶọc̣alVariable int <==

##### ALPHABETIC SORT #####
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public override ISpecificCodeCompletionContext GetCompletionContext(CodeCompleti

TextLookupRanges textLookupRanges = CodeCompletionContextProviderBase.GetTextLookupRanges(context, documentRange);
return new RimworldXmlCodeCompletionContext(context, xmlFile,
xmlFile.FindNodeAt(unterminatedContext.Range), textLookupRanges);
xmlFile.FindNodeAt(context.SelectedTreeRange), textLookupRanges);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
using JetBrains.ReSharper.Feature.Services.CodeCompletion.Infrastructure;
using JetBrains.ReSharper.Feature.Services.CodeCompletion.Infrastructure.AspectLookupItems.BaseInfrastructure;
using JetBrains.ReSharper.Feature.Services.CodeCompletion.Infrastructure.AspectLookupItems.Info;
using JetBrains.ReSharper.Feature.Services.CodeCompletion.Infrastructure.AspectLookupItems.Matchers;
using JetBrains.ReSharper.Feature.Services.CodeCompletion.Infrastructure.AspectLookupItems.Presentations;
using JetBrains.ReSharper.Feature.Services.CodeCompletion.Infrastructure.Match;
using JetBrains.ReSharper.Feature.Services.CSharp.CodeCompletion.Infrastructure;
using JetBrains.ReSharper.Features.Intellisense.CodeCompletion.CSharp;
using JetBrains.ReSharper.Features.Intellisense.CodeCompletion.CSharp.AspectLookupItems;
Expand All @@ -27,9 +27,8 @@

namespace ReSharperPlugin.RimworldDev;

// Note, this class is mostly copy-pasted from Jetbrains CSharpLookupFactory class, I just made some minor additions
// so that the autocomplete would display a bit nicer

// Note, this class is mostly copy-pasted from Jetbrains' CSharpLookupItemFactory (SDK 2021.2), I just made some minor
// additions so that the autocomplete would display a bit nicer
public class RimworldCSharpLookupFactory
{
private readonly Func<LookupItem<CSharpDeclaredElementInfo>, ILookupItemPresentation>
Expand Down Expand Up @@ -63,9 +62,6 @@ private readonly Func<LookupItem<CSharpDeclaredElementInfo>, ILookupItemPresenta
private readonly Func<LookupItem<CSharpDeclaredElementInfo>, ILookupItemBehavior> myFGetDeclaredElementBehavior =
item => new CSharpDeclaredElementBehavior<CSharpDeclaredElementInfo>(item);

private readonly Func<LookupItem<CSharpDeclaredElementInfo>, ILookupItemMatcher> myFGetDeclaredElementMatcher =
item => new DeclaredElementMatcher(item.Info, "@");

private readonly Func<LookupItem<TypeElementInfo>, ILookupItemBehavior> myFGetTypeElementBehavior =
item => new CSharpDeclaredElementBehavior<TypeElementInfo>(item);

Expand Down Expand Up @@ -211,7 +207,7 @@ public LookupItem<CSharpDeclaredElementInfo> CreateDeclaredElementLookupItem(
var dataHolder = LookupItemFactory.CreateLookupItem(declaredElementInfo)
.WithPresentation(fGetPresentation)
.WithBehavior(myFGetDeclaredElementBehavior)
.WithMatcher(myFGetDeclaredElementMatcher);
.WithMatcher(LookupItemMatcher.CSharpIdentifier);

var typeOwner = element as ITypeOwner;
if (instance.Element is IAnonymousTypeProperty)
Expand Down
1 change: 0 additions & 1 deletion src/rider/main/kotlin/run/RunConfiguration.kt
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ class RunConfiguration(project: Project, factory: ConfigurationFactory, name: St
getSaveFilePath(),
getModListPath(),
getRimworldState(environment),
UnityDebugRemoteConfiguration(),
environment,
"CustomPlayer"
);
Expand Down
Loading
Loading