glimmer-cs-gladiator 0.11.1 → 0.11.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3fe3696b0a87eb8158d519cbe9480113e82226259d547020ca9fababe255d5d3
4
- data.tar.gz: c8af0b5d4917d7373367941a59c06dc79ed171cc13295588a35c09e6b9b98f9c
3
+ metadata.gz: 50c948ac2d53e7ef62aadbff64f59c682f06c92cd27081e4dad7c4425c7a3a4b
4
+ data.tar.gz: 49a7ed90eab1755cfeb33fed1cda1822eb07475e39cfe36764d48391d031f7fe
5
5
  SHA512:
6
- metadata.gz: ee65bef582e89f4791b0b4f2f682d143a0b793a6fa2bc6afcfa094d1ee0fae8823b03ab88e1bf57cbbac7a10204fc3e10be12f281c1a7f73bf56368008d2b326
7
- data.tar.gz: 43e2c2563d1121027563d5985ce716ecb0e2a7e57846fb88a2b20340b6ae60127fca85e79dca29a00d5aa60dee3d1fc211ea0eac008e428d513cd1f798876e49
6
+ metadata.gz: e0ae0e356af6aff227f53347d939d8506a100894ec370c380ff2eb1409b4f53ec9f70059645ddc2e940210817b3601224a2bb2338d8529a33749c26949239660
7
+ data.tar.gz: 3cde078579d1ab2ecc16ea01d26731585a0a201506805e063b593d5e91ce1508e9fecd357d4503b83889c9c69719bec54c53c5ec6f72a3bde6adda336c4a0fc0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.11.2
4
+
5
+ - Support 'lisp', 'cl', 'el', 'asd' file formats
6
+ - Fix issue with not being able to comment/uncomment in `Gemfile`
7
+ - Fix issue with zoom (via -, =, 0) not zooming line numbers too.
8
+
3
9
  ## 0.11.1
4
10
 
5
11
  - [CONTRIBUTION BY keeperotphones] Support Ruby file formats: `'rbw', 'gemspec'`
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # <img src='https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-gladiator/master/images/glimmer-cs-gladiator-logo.svg' height=85 /> Gladiator 0.11.1 - [Ugliest Text Editor Ever!](https://www.reddit.com/r/ruby/comments/hgve8k/gladiator_glimmer_editor_ugliest_text_editor_ever/)
1
+ # <img src='https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-gladiator/master/images/glimmer-cs-gladiator-logo.svg' height=85 /> Gladiator 0.11.2 - [Ugliest Text Editor Ever!](https://www.reddit.com/r/ruby/comments/hgve8k/gladiator_glimmer_editor_ugliest_text_editor_ever/)
2
2
  ## [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=40 /> Glimmer Custom Shell](https://github.com/AndyObtiva/glimmer-dsl-swt#custom-shell-gem)
3
3
  [![Gem Version](https://badge.fury.io/rb/glimmer-cs-gladiator.svg)](http://badge.fury.io/rb/glimmer-cs-gladiator)
4
4
 
@@ -88,7 +88,7 @@ I leave building truly professional text editors to software tooling experts who
88
88
 
89
89
  ### Multiple Language Syntax Highlighting
90
90
 
91
- Here is an exhaustive list of the file formats supported by [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator):
91
+ Here is an exhaustive list of all the file formats supported by [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) (if you would like support for more file formats, feel free to suggest in a [GitHub Issue](https://github.com/AndyObtiva/glimmer-cs-gladiator/issues) or submit a [Pull Request](https://github.com/AndyObtiva/glimmer-cs-gladiator/pulls)):
92
92
  1. C (`'c', 'h'`)
93
93
  1. C++ (`'cpp', 'cc', 'C', 'cxx', 'c++', 'hpp', 'hh', 'H', 'hxx', 'h++'`)
94
94
  1. C# (`'cs'`)
@@ -110,6 +110,7 @@ Here is an exhaustive list of the file formats supported by [Gladiator](https://
110
110
  1. JSP (`'jsp'`)
111
111
  1. JSX (`'jsx'`)
112
112
  1. Kotlin (`'kt', 'ktm', 'kts'`)
113
+ 1. Lisp (`'lisp', 'cl', 'el', 'asd'`)
113
114
  1. Make (`'Makefile', 'makefile', 'GNUmakefile'`)
114
115
  1. Markdown (`'md', 'markdown'`)
115
116
  1. Diff Patch (`'patch'`)
@@ -147,9 +148,9 @@ Here is an exhaustive list of the file formats supported by [Gladiator](https://
147
148
 
148
149
  ## Download
149
150
 
150
- [<img src='https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-gladiator/master/images/glimmer-cs-gladiator-logo.svg' height=40 /> Download Gladiator 0.11.1 Mac DMG Installer (ARM64 Ventura 13.4.1 & Older)](https://www.dropbox.com/scl/fi/iyyubcqekhtn4rv91feka/Gladiator-0.11.1-arm64-ventura-13.4.1.dmg?rlkey=ht2bt4jqf6bmgfjy0aurt2fem&dl=1) (this version starts in about 2.5 seconds)
151
+ [<img src='https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-gladiator/master/images/glimmer-cs-gladiator-logo.svg' height=40 /> Download Gladiator 0.11.2 Mac DMG Installer (ARM64 Ventura 13.4.1 & Older)](https://www.dropbox.com/scl/fi/456pqc4th4q2yjlue2y8o/Gladiator-0.11.2-arm64-ventura-13.4.1.dmg?rlkey=qsdvshabpolvgev6w7ku4ana9&dl=1) (this version starts in about 2.5 seconds)
151
152
 
152
- [<img src='https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-gladiator/master/images/glimmer-cs-gladiator-logo.svg' height=40 /> Download Gladiator 0.10.0 Mac DMG Installer (x64 Monterey & Big Sur)](https://www.dropbox.com/s/6155qdxv7j6hnsi/Gladiator-0.10.0-x64-monterey.dmg?dl=1)
153
+ [<img src='https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-gladiator/master/images/glimmer-cs-gladiator-logo.svg' height=40 /> Download Gladiator 0.11.1 Mac DMG Installer (x64 Ventura 13.4.1 & Older)](https://www.dropbox.com/scl/fi/04y1zkslld876cqv3mbls/Gladiator-0.11.1-x86_64-ventura-13.4.1.dmg?rlkey=0dhzhcejgx31w6iuj3qs2z7zs&dl=1)
153
154
 
154
155
  [<img src='https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-gladiator/master/images/glimmer-cs-gladiator-logo.svg' height=40 /> Download Gladiator 0.10.0 Mac DMG Installer (x64 Catalina & Older)](https://www.dropbox.com/s/rxta4yio71mei8f/Gladiator-0.10.0.dmg?dl=1)
155
156
 
@@ -166,7 +167,7 @@ Note: if you encounter any issues, check if they are documented in [TODO.md](TOD
166
167
  Install [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) gem by running (`jgem`, `jruby -S gem`, or `gem` directly if you have [RVM](https://rvm.io/)):
167
168
 
168
169
  ```
169
- jgem install glimmer-cs-gladiator -v0.11.1
170
+ jgem install glimmer-cs-gladiator -v0.11.2
170
171
  ```
171
172
 
172
173
  Or add to a JRuby project Bundler `Gemfile` under the `:developement` group:
@@ -230,7 +231,7 @@ To reuse [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) as a Glimme
230
231
  following to the application's `Gemfile`:
231
232
 
232
233
  ```
233
- gem 'glimmer-cs-gladiator', '~> 0.11.1'
234
+ gem 'glimmer-cs-gladiator', '~> 0.11.2'
234
235
  ```
235
236
 
236
237
  Run:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.11.1
1
+ 0.11.2
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: glimmer-cs-gladiator 0.11.1 ruby lib
5
+ # stub: glimmer-cs-gladiator 0.11.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "glimmer-cs-gladiator".freeze
9
- s.version = "0.11.1"
9
+ s.version = "0.11.2"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Andy Maleh".freeze]
14
- s.date = "2023-08-15"
14
+ s.date = "2023-09-07"
15
15
  s.description = "Gladiator (short for Glimmer Editor) is a Code Editor / IDE beta project under on-going development. It is not intended to be a full-fledged editor by any means, yet mostly a fun educational exercise in using Glimmer to build a text editor. Gladiator is also a personal tool for shaping an editor exactly the way I like.".freeze
16
16
  s.email = "andy.am@gmail.com".freeze
17
17
  s.executables = ["glimmer-cs-gladiator".freeze, "gladiator".freeze, "gladiator-setup".freeze]
@@ -97,6 +97,8 @@ module Glimmer
97
97
  'jsx'
98
98
  when 'kt', 'ktm', 'kts'
99
99
  'kotlin'
100
+ when 'lisp', 'cl', 'el', 'asd'
101
+ 'lisp'
100
102
  when 'md', 'markdown'
101
103
  'markdown'
102
104
  when 'patch'
@@ -147,61 +149,27 @@ module Glimmer
147
149
  end
148
150
 
149
151
  def single_line_comment_prefix
150
- # TODO redo this implementation using language instead of extension
151
- case extension
152
- when 'c', 'h',
153
- 'cpp', 'cc', 'C', 'cxx', 'c++', 'hpp', 'hh', 'H', 'hxx', 'h++',
154
- 'cs',
155
- 'gradle',
156
- 'java',
157
- 'js', 'cjs', 'mjs', 'es6', 'es',
158
- 'jsx',
159
- 'kt', 'ktm', 'kts',
160
- 'rs',
161
- 'ts',
162
- 'tsx',
163
- 'sass',
164
- 'scss'
152
+ case language
153
+ when 'c', 'cpp', 'csharp', 'gradle', 'java', 'javascript', 'jsx', 'kotlin', 'rust', 'typescript', 'tsx', 'sass', 'scss'
165
154
  '//'
166
- when 'cr',
167
- 'conf',
168
- 'coffee',
169
- 'ex', 'exs',
170
- 'feature',
171
- 'ini',
172
- 'pl',
173
- 'pp',
174
- 'properties',
175
- 'ps1',
176
- 'py',
177
- 'rb', 'rbw', 'rake', 'gemspec',
178
- 'sh',
179
- 'tcl',
180
- 'yaml', 'yml'
155
+ when 'crystal', 'conf', 'coffeescript', 'elixir', 'gherkin', 'ini', 'perl', 'puppet', 'properties', 'powershell', 'python', 'ruby', 'shell', 'tcl', 'yaml'
181
156
  '#'
182
157
  when 'css'
183
158
  '/*'
184
- when 'eex', 'leex', 'heex',
185
- 'erb',
186
- 'html',
187
- 'jsp',
188
- 'plist',
189
- 'xml'
159
+ when 'eex', 'leex', 'heex', 'erb', 'html', 'jsp', 'plist', 'xml'
190
160
  # TODO in the future, have .erb support `#` single line comment inside Ruby code scriptlets as opposed to scriptlet-free code
191
161
  '<!--'
192
162
  when 'haml'
193
163
  '/'
194
- when 'md', 'markdown'
164
+ when 'markdown'
195
165
  '<!---'
196
- when 'ps'
166
+ when 'postscript'
197
167
  '%'
198
- when 'scm', 'sps', 'sls', 'sld'
168
+ when 'lisp', 'scheme'
199
169
  ';'
200
170
  when 'sql'
201
171
  '--'
202
- when 'json',
203
- 'patch',
204
- 'txt',
172
+ when 'json', 'diff', 'plaintext'
205
173
  nil
206
174
  nil
207
175
  else
@@ -187,6 +187,12 @@ module Glimmer
187
187
  elsif key_event.stateMask == swt(COMMAND_KEY) && key_event.keyCode == swt(:arrow_down)
188
188
  Command.do(file, :move_down!)
189
189
  key_event.doit = false
190
+ elsif key_event.stateMask == swt(COMMAND_KEY) && extract_char(key_event) == '='
191
+ bump_font_height_up
192
+ elsif key_event.stateMask == swt(COMMAND_KEY) && extract_char(key_event) == '-'
193
+ bump_font_height_down
194
+ elsif key_event.stateMask == swt(COMMAND_KEY) && extract_char(key_event) == '0'
195
+ restore_font_height
190
196
  end
191
197
  }
192
198
  on_verify_text { |verify_event|
@@ -205,6 +211,37 @@ module Glimmer
205
211
  }
206
212
  }
207
213
  end
214
+
215
+ def bump_font_height_up
216
+ @original_font_height ||= font_datum.height
217
+ new_font_height = font_datum.height + 1
218
+ update_font_height(new_font_height)
219
+ end
220
+
221
+ def bump_font_height_down
222
+ @original_font_height ||= font_datum.height
223
+ new_font_height = (font_datum.height - 1) == 0 ? font_datum.height : (font_datum.height - 1)
224
+ update_font_height(new_font_height)
225
+ end
226
+
227
+ def restore_font_height
228
+ return if @original_font_height.nil?
229
+ update_font_height(@original_font_height)
230
+ @original_font_height = nil
231
+ end
232
+
233
+ def update_font_height(new_font_height)
234
+ return if new_font_height.nil?
235
+ @text_proxy.font = {name: font_datum.name, height: new_font_height, style: font_datum.style}
236
+ @line_numbers_text&.font = {name: font_datum.name, height: new_font_height, style: font_datum.style}
237
+ @body_root.shell_proxy.layout(true, true)
238
+ @body_root.shell_proxy.pack_same_size
239
+ end
240
+
241
+ def font_datum
242
+ @text_proxy.font.font_data.first
243
+ end
244
+
208
245
 
209
246
  end
210
247
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer-cs-gladiator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Maleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-15 00:00:00.000000000 Z
11
+ date: 2023-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement