Skip to content

Commit 5427068

Browse files
Update file associations
1 parent c59984e commit 5427068

File tree

2 files changed

+250
-17
lines changed

2 files changed

+250
-17
lines changed

feature-editor/impl/src/main/assets/languages.json

Lines changed: 63 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@
7777
"grammar": "languages/html/syntaxes/html.tmLanguage.json",
7878
"languageConfiguration": "languages/html/language-configuration.json",
7979
"embeddedLanguages": {
80-
"source.js": "javascript"
80+
"text.html": "html",
81+
"source.css": "css",
82+
"source.js": "javascript",
83+
"source.python": "python"
8184
}
8285
},
8386
{
@@ -108,7 +111,14 @@
108111
"name": "julia",
109112
"scopeName": "source.julia",
110113
"grammar": "languages/julia/syntaxes/julia.tmLanguage.json",
111-
"languageConfiguration": "languages/julia/language-configuration.json"
114+
"languageConfiguration": "languages/julia/language-configuration.json",
115+
"embeddedLanguages": {
116+
"meta.embedded.inline.cpp": "cpp",
117+
"meta.embedded.inline.javascript": "javascript",
118+
"meta.embedded.inline.python": "python",
119+
"meta.embedded.inline.r": "r",
120+
"meta.embedded.inline.sql": "sql"
121+
}
112122
},
113123
{
114124
"name": "kotlin",
@@ -148,9 +158,49 @@
148158
"embeddedLanguages": {
149159
"meta.embedded.block.html": "html",
150160
"source.js": "javascript",
161+
"source.css": "css",
162+
"meta.embedded.block.frontmatter": "yaml",
163+
"meta.embedded.block.css": "css",
164+
"meta.embedded.block.ini": "ini",
151165
"meta.embedded.block.java": "java",
166+
"meta.embedded.block.lua": "lua",
167+
"meta.embedded.block.makefile": "makefile",
168+
"meta.embedded.block.perl": "perl",
169+
"meta.embedded.block.r": "r",
170+
"meta.embedded.block.ruby": "ruby",
171+
"meta.embedded.block.php": "php",
172+
"meta.embedded.block.sql": "sql",
173+
"meta.embedded.block.vs_net": "vs_net",
152174
"meta.embedded.block.xml": "xml",
153-
"meta.embedded.block.python": "python"
175+
"meta.embedded.block.xsl": "xsl",
176+
"meta.embedded.block.yaml": "yaml",
177+
"meta.embedded.block.dosbatch": "dosbatch",
178+
"meta.embedded.block.clojure": "clojure",
179+
"meta.embedded.block.coffee": "coffee",
180+
"meta.embedded.block.c": "c",
181+
"meta.embedded.block.cpp": "cpp",
182+
"meta.embedded.block.diff": "diff",
183+
"meta.embedded.block.dockerfile": "dockerfile",
184+
"meta.embedded.block.go": "go",
185+
"meta.embedded.block.groovy": "groovy",
186+
"meta.embedded.block.pug": "jade",
187+
"meta.embedded.block.javascript": "javascript",
188+
"meta.embedded.block.json": "json",
189+
"meta.embedded.block.jsonc": "jsonc",
190+
"meta.embedded.block.latex": "latex",
191+
"meta.embedded.block.less": "less",
192+
"meta.embedded.block.objc": "objc",
193+
"meta.embedded.block.scss": "scss",
194+
"meta.embedded.block.perl6": "perl6",
195+
"meta.embedded.block.powershell": "powershell",
196+
"meta.embedded.block.python": "python",
197+
"meta.embedded.block.rust": "rust",
198+
"meta.embedded.block.scala": "scala",
199+
"meta.embedded.block.shellscript": "shellscript",
200+
"meta.embedded.block.typescript": "typescript",
201+
"meta.embedded.block.typescriptreact": "typescriptreact",
202+
"meta.embedded.block.csharp": "csharp",
203+
"meta.embedded.block.fsharp": "fsharp"
154204
}
155205
},
156206
{
@@ -163,7 +213,16 @@
163213
"name": "php",
164214
"scopeName": "source.php",
165215
"grammar": "languages/php/syntaxes/php.tmLanguage.json",
166-
"languageConfiguration": "languages/php/language-configuration.json"
216+
"languageConfiguration": "languages/php/language-configuration.json",
217+
"embeddedLanguages": {
218+
"text.html": "html",
219+
"source.php": "php",
220+
"source.sql": "sql",
221+
"text.xml": "xml",
222+
"source.js": "javascript",
223+
"source.json": "json",
224+
"source.css": "css"
225+
}
167226
},
168227
{
169228
"name": "python",

feature-editor/impl/src/main/kotlin/com/blacksquircle/ui/feature/editor/data/model/FileAssociation.kt

Lines changed: 187 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package com.blacksquircle.ui.feature.editor.data.model
1818

1919
internal object FileAssociation {
2020

21-
private val associations = HashMap<String, String>(72)
21+
private val associations = HashMap<String, String>(300)
2222

2323
init {
2424
associations[".bat"] = LanguageScope.BAT
@@ -32,13 +32,29 @@ internal object FileAssociation {
3232
associations[".clojure"] = LanguageScope.CLOJURE
3333
associations[".edn"] = LanguageScope.CLOJURE
3434
associations[".cpp"] = LanguageScope.CPP
35+
associations[".cc"] = LanguageScope.CPP
36+
associations[".cxx"] = LanguageScope.CPP
37+
associations[".c++"] = LanguageScope.CPP
3538
associations[".hpp"] = LanguageScope.CPP
39+
associations[".hh"] = LanguageScope.CPP
40+
associations[".hxx"] = LanguageScope.CPP
41+
associations[".h++"] = LanguageScope.CPP
42+
associations[".ii"] = LanguageScope.CPP
3643
associations[".ino"] = LanguageScope.CPP
44+
associations[".inl"] = LanguageScope.CPP
45+
associations[".ipp"] = LanguageScope.CPP
46+
associations[".ixx"] = LanguageScope.CPP
47+
associations[".tpp"] = LanguageScope.CPP
48+
associations[".txx"] = LanguageScope.CPP
49+
associations[".in"] = LanguageScope.CPP
3750
associations[".cs"] = LanguageScope.CSHARP
51+
associations[".csx"] = LanguageScope.CSHARP
52+
associations[".cake"] = LanguageScope.CSHARP
3853
associations[".css"] = LanguageScope.CSS
3954
associations[".scss"] = LanguageScope.CSS
4055
associations[".dart"] = LanguageScope.DART
4156
associations[".Dockerfile"] = LanguageScope.DOCKER
57+
associations[".Containerfile"] = LanguageScope.DOCKER
4258
associations[".f03"] = LanguageScope.FORTRAN
4359
associations[".f08"] = LanguageScope.FORTRAN
4460
associations[".f18"] = LanguageScope.FORTRAN
@@ -60,56 +76,156 @@ internal object FileAssociation {
6076
associations[".gy"] = LanguageScope.GROOVY
6177
associations[".gsh"] = LanguageScope.GROOVY
6278
associations[".gradle"] = LanguageScope.GROOVY
63-
associations[".htm"] = LanguageScope.HTML
79+
associations[".Jenkinsfile"] = LanguageScope.GROOVY
80+
associations[".nf"] = LanguageScope.GROOVY
6481
associations[".html"] = LanguageScope.HTML
82+
associations[".htm"] = LanguageScope.HTML
83+
associations[".shtml"] = LanguageScope.HTML
84+
associations[".xhtml"] = LanguageScope.HTML
85+
associations[".xht"] = LanguageScope.HTML
86+
associations[".mdoc"] = LanguageScope.HTML
87+
associations[".jsp"] = LanguageScope.HTML
88+
associations[".asp"] = LanguageScope.HTML
89+
associations[".aspx"] = LanguageScope.HTML
90+
associations[".jshtm"] = LanguageScope.HTML
91+
associations[".volt"] = LanguageScope.HTML
92+
associations[".ejs"] = LanguageScope.HTML
93+
associations[".rhtml"] = LanguageScope.HTML
6594
associations[".ini"] = LanguageScope.INI
95+
associations[".env"] = LanguageScope.INI
96+
associations[".conf"] = LanguageScope.INI
6697
associations[".properties"] = LanguageScope.INI
98+
associations[".cfg"] = LanguageScope.INI
99+
associations[".directory"] = LanguageScope.INI
100+
associations[".gitattributes"] = LanguageScope.INI
101+
associations[".gitconfig"] = LanguageScope.INI
102+
associations[".gitmodules"] = LanguageScope.INI
67103
associations[".editorconfig"] = LanguageScope.INI
68-
associations[".env"] = LanguageScope.INI
104+
associations[".repo"] = LanguageScope.INI
69105
associations[".java"] = LanguageScope.JAVA
106+
associations[".jav"] = LanguageScope.JAVA
70107
associations[".js"] = LanguageScope.JAVASCRIPT
71108
associations[".jsx"] = LanguageScope.JAVASCRIPT
72109
associations[".mjs"] = LanguageScope.JAVASCRIPT
73110
associations[".cjs"] = LanguageScope.JAVASCRIPT
111+
associations[".es6"] = LanguageScope.JAVASCRIPT
112+
associations[".pac"] = LanguageScope.JAVASCRIPT
74113
associations[".json"] = LanguageScope.JSON
75114
associations[".jl"] = LanguageScope.JULIA
76115
associations[".kt"] = LanguageScope.KOTLIN
77116
associations[".kts"] = LanguageScope.KOTLIN
78117
associations[".tex"] = LanguageScope.LATEX
118+
associations[".ltx"] = LanguageScope.LATEX
119+
associations[".ctx"] = LanguageScope.LATEX
79120
associations[".lisp"] = LanguageScope.LISP
80121
associations[".lsp"] = LanguageScope.LISP
81122
associations[".cl"] = LanguageScope.LISP
82123
associations[".l"] = LanguageScope.LISP
83124
associations[".lua"] = LanguageScope.LUA
84125
associations[".Makefile"] = LanguageScope.MAKE
126+
associations[".mak"] = LanguageScope.MAKE
127+
associations[".mk"] = LanguageScope.MAKE
85128
associations[".md"] = LanguageScope.MARKDOWN
129+
associations[".mkd"] = LanguageScope.MARKDOWN
130+
associations[".mdwn"] = LanguageScope.MARKDOWN
131+
associations[".mdown"] = LanguageScope.MARKDOWN
132+
associations[".markdown"] = LanguageScope.MARKDOWN
133+
associations[".markdn"] = LanguageScope.MARKDOWN
134+
associations[".mdtxt"] = LanguageScope.MARKDOWN
135+
associations[".mdtext"] = LanguageScope.MARKDOWN
136+
associations[".workbook"] = LanguageScope.MARKDOWN
86137
associations[".pl"] = LanguageScope.PERL
87138
associations[".pm"] = LanguageScope.PERL
88139
associations[".pod"] = LanguageScope.PERL
89140
associations[".t"] = LanguageScope.PERL
90141
associations[".psgi"] = LanguageScope.PERL
142+
associations[".raku"] = LanguageScope.PERL
143+
associations[".rakumod"] = LanguageScope.PERL
144+
associations[".rakutest"] = LanguageScope.PERL
145+
associations[".rakudoc"] = LanguageScope.PERL
146+
associations[".nqp"] = LanguageScope.PERL
147+
associations[".p6"] = LanguageScope.PERL
148+
associations[".pl6"] = LanguageScope.PERL
149+
associations[".pm6"] = LanguageScope.PERL
91150
associations[".php"] = LanguageScope.PHP
92-
associations[".php3"] = LanguageScope.PHP
93151
associations[".php4"] = LanguageScope.PHP
94152
associations[".php5"] = LanguageScope.PHP
95-
associations[".phps"] = LanguageScope.PHP
96153
associations[".phtml"] = LanguageScope.PHP
154+
associations[".ctp"] = LanguageScope.PHP
97155
associations[".txt"] = LanguageScope.TEXT
98156
associations[".log"] = LanguageScope.TEXT
99157
associations[".py"] = LanguageScope.PYTHON
158+
associations[".rpy"] = LanguageScope.PYTHON
100159
associations[".pyw"] = LanguageScope.PYTHON
160+
associations[".cpy"] = LanguageScope.PYTHON
161+
associations[".gyp"] = LanguageScope.PYTHON
162+
associations[".gypi"] = LanguageScope.PYTHON
101163
associations[".pyi"] = LanguageScope.PYTHON
164+
associations[".ipy"] = LanguageScope.PYTHON
165+
associations[".pyt"] = LanguageScope.PYTHON
102166
associations[".rb"] = LanguageScope.RUBY
167+
associations[".rbx"] = LanguageScope.RUBY
168+
associations[".rjs"] = LanguageScope.RUBY
169+
associations[".gemspec"] = LanguageScope.RUBY
170+
associations[".rake"] = LanguageScope.RUBY
171+
associations[".ru"] = LanguageScope.RUBY
172+
associations[".erb"] = LanguageScope.RUBY
173+
associations[".podspec"] = LanguageScope.RUBY
174+
associations[".rbi"] = LanguageScope.RUBY
175+
associations["Rakefile"] = LanguageScope.RUBY
176+
associations["Gemfile"] = LanguageScope.RUBY
177+
associations["Guardfile"] = LanguageScope.RUBY
178+
associations["Podfile"] = LanguageScope.RUBY
179+
associations["Capfile"] = LanguageScope.RUBY
180+
associations["Cheffile"] = LanguageScope.RUBY
181+
associations["Hobofile"] = LanguageScope.RUBY
182+
associations["Vagrantfile"] = LanguageScope.RUBY
183+
associations["Appraisals"] = LanguageScope.RUBY
184+
associations["Rantfile"] = LanguageScope.RUBY
185+
associations["Berksfile"] = LanguageScope.RUBY
186+
associations["Thorfile"] = LanguageScope.RUBY
187+
associations["Puppetfile"] = LanguageScope.RUBY
188+
associations["Dangerfile"] = LanguageScope.RUBY
189+
associations["Brewfile"] = LanguageScope.RUBY
190+
associations["Fastfile"] = LanguageScope.RUBY
191+
associations["Appfile"] = LanguageScope.RUBY
192+
associations["Deliverfile"] = LanguageScope.RUBY
193+
associations["Matchfile"] = LanguageScope.RUBY
194+
associations["Scanfile"] = LanguageScope.RUBY
195+
associations["Snapfile"] = LanguageScope.RUBY
196+
associations["Gymfile"] = LanguageScope.RUBY
103197
associations[".rs"] = LanguageScope.RUST
104198
associations[".sh"] = LanguageScope.SHELL
199+
associations[".bash"] = LanguageScope.SHELL
200+
associations[".bashrc"] = LanguageScope.SHELL
201+
associations[".bash_aliases"] = LanguageScope.SHELL
202+
associations[".bash_profile"] = LanguageScope.SHELL
203+
associations[".bash_login"] = LanguageScope.SHELL
204+
associations[".ebuild"] = LanguageScope.SHELL
205+
associations[".profile"] = LanguageScope.SHELL
206+
associations[".bash_logout"] = LanguageScope.SHELL
207+
associations[".xprofile"] = LanguageScope.SHELL
208+
associations[".xsession"] = LanguageScope.SHELL
209+
associations[".xsessionrc"] = LanguageScope.SHELL
210+
associations[".zsh"] = LanguageScope.SHELL
211+
associations[".zshrc"] = LanguageScope.SHELL
212+
associations[".zprofile"] = LanguageScope.SHELL
213+
associations[".zlogin"] = LanguageScope.SHELL
214+
associations[".zlogout"] = LanguageScope.SHELL
215+
associations[".zshenv"] = LanguageScope.SHELL
216+
associations[".zsh-theme"] = LanguageScope.SHELL
217+
associations[".fish"] = LanguageScope.SHELL
105218
associations[".ksh"] = LanguageScope.SHELL
106-
associations[".bsh"] = LanguageScope.SHELL
107219
associations[".csh"] = LanguageScope.SHELL
220+
associations[".cshrc"] = LanguageScope.SHELL
221+
associations[".tcshrc"] = LanguageScope.SHELL
222+
associations[".yashrc"] = LanguageScope.SHELL
223+
associations[".yash_profile"] = LanguageScope.SHELL
224+
associations[".bsh"] = LanguageScope.SHELL
108225
associations[".tcsh"] = LanguageScope.SHELL
109-
associations[".zsh"] = LanguageScope.SHELL
110-
associations[".bash"] = LanguageScope.SHELL
111226
associations[".smali"] = LanguageScope.SMALI
112227
associations[".sql"] = LanguageScope.SQL
228+
associations[".dsql"] = LanguageScope.SQL
113229
associations[".sqlite"] = LanguageScope.SQL
114230
associations[".sqlite2"] = LanguageScope.SQL
115231
associations[".sqlite3"] = LanguageScope.SQL
@@ -119,16 +235,74 @@ internal object FileAssociation {
119235
associations[".mts"] = LanguageScope.TYPESCRIPT
120236
associations[".cts"] = LanguageScope.TYPESCRIPT
121237
associations[".vb"] = LanguageScope.VISUALBASIC
238+
associations[".brs"] = LanguageScope.VISUALBASIC
239+
associations[".vbs"] = LanguageScope.VISUALBASIC
122240
associations[".bas"] = LanguageScope.VISUALBASIC
123-
associations[".cls"] = LanguageScope.VISUALBASIC
124-
associations[".xhtml"] = LanguageScope.XML
125-
associations[".xht"] = LanguageScope.XML
241+
associations[".vba"] = LanguageScope.VISUALBASIC
126242
associations[".xml"] = LanguageScope.XML
243+
associations[".xsd"] = LanguageScope.XML
244+
associations[".ascx"] = LanguageScope.XML
245+
associations[".atom"] = LanguageScope.XML
246+
associations[".axml"] = LanguageScope.XML
247+
associations[".axaml"] = LanguageScope.XML
248+
associations[".bpmn"] = LanguageScope.XML
249+
associations[".cpt"] = LanguageScope.XML
250+
associations[".csl"] = LanguageScope.XML
251+
associations[".csproj"] = LanguageScope.XML
252+
associations[".dita"] = LanguageScope.XML
253+
associations[".ditamap"] = LanguageScope.XML
254+
associations[".dtd"] = LanguageScope.XML
255+
associations[".ent"] = LanguageScope.XML
256+
associations[".mod"] = LanguageScope.XML
257+
associations[".dtml"] = LanguageScope.XML
258+
associations[".fsproj"] = LanguageScope.XML
259+
associations[".fxml"] = LanguageScope.XML
260+
associations[".iml"] = LanguageScope.XML
261+
associations[".isml"] = LanguageScope.XML
262+
associations[".jmx"] = LanguageScope.XML
263+
associations[".launch"] = LanguageScope.XML
264+
associations[".menu"] = LanguageScope.XML
265+
associations[".mxml"] = LanguageScope.XML
266+
associations[".nuspec"] = LanguageScope.XML
267+
associations[".opml"] = LanguageScope.XML
268+
associations[".owl"] = LanguageScope.XML
269+
associations[".proj"] = LanguageScope.XML
270+
associations[".props"] = LanguageScope.XML
271+
associations[".pt"] = LanguageScope.XML
272+
associations[".publishsettings"] = LanguageScope.XML
273+
associations[".pubxml"] = LanguageScope.XML
274+
associations[".rbxlx"] = LanguageScope.XML
275+
associations[".rbxmx"] = LanguageScope.XML
276+
associations[".rdf"] = LanguageScope.XML
277+
associations[".rng"] = LanguageScope.XML
278+
associations[".rss"] = LanguageScope.XML
279+
associations[".shproj"] = LanguageScope.XML
280+
associations[".storyboard"] = LanguageScope.XML
281+
associations[".targets"] = LanguageScope.XML
282+
associations[".tld"] = LanguageScope.XML
283+
associations[".tmx"] = LanguageScope.XML
284+
associations[".vbproj"] = LanguageScope.XML
285+
associations[".vcxproj"] = LanguageScope.XML
286+
associations[".wsdl"] = LanguageScope.XML
287+
associations[".wxi"] = LanguageScope.XML
288+
associations[".wxl"] = LanguageScope.XML
289+
associations[".wxs"] = LanguageScope.XML
127290
associations[".xaml"] = LanguageScope.XML
128-
associations[".xdf"] = LanguageScope.XML
129-
associations[".xmpp"] = LanguageScope.XML
291+
associations[".xbl"] = LanguageScope.XML
292+
associations[".xib"] = LanguageScope.XML
293+
associations[".xlf"] = LanguageScope.XML
294+
associations[".xliff"] = LanguageScope.XML
295+
associations[".xpdl"] = LanguageScope.XML
296+
associations[".xul"] = LanguageScope.XML
297+
associations[".xoml"] = LanguageScope.XML
130298
associations[".yaml"] = LanguageScope.YAML
131299
associations[".yml"] = LanguageScope.YAML
300+
associations[".eyaml"] = LanguageScope.YAML
301+
associations[".eyml"] = LanguageScope.YAML
302+
associations[".cff"] = LanguageScope.YAML
303+
associations[".yaml-tmlanguage"] = LanguageScope.YAML
304+
associations[".yaml-tmpreferences"] = LanguageScope.YAML
305+
associations[".yaml-tmtheme"] = LanguageScope.YAML
132306
}
133307

134308
fun guessLanguage(extension: String): String? {

0 commit comments

Comments
 (0)