Re: [gedit-list] GtkSourceView



On Tue, 2016-06-07 at 13:24 +0200, Stefan Salewski wrote:
In the last days I made a color and syntax scheme for Nim language.

http://ssalewski.de/tmp/NEd-SHD.png

https://github.com/ngtk3/NEd/tree/master/src


Another minor problem:

Nim has, as Haskell and Python, indent based syntax. For example we
have a type section

type
  Name: string
  Color: int
  
or

while i >= 0:
  sum = sum + i
  inc(i)

Blocks/sections end when indendt decreases again, so there is no end or
} marker. The problem is, that most people use 2 spaces for an indent
step, but some may use only one or maybe 3. It would be nice if the
syntax highlighting knows the correct user desired indent size, so
maybe when 2 spaces are the desired step size, it can display the line
in red when indent step is odd. Related is a visible indent help -- I
used two spaces width bars left to the indent area which helps the eye
to see block termination. All that works fine for fixed index size.

Do you have an idea how it may also work for user defined indent sizes?

It would be easy when single tabs would be used for indentation -- I
myself would prefer tabs, but majority of users and Nim developers do
not.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]