[code][textadept] Some observations/corrections for beta 2

From: Keresztes Barna <kbarna.att.gmail.com>
Date: Tue, 12 Jun 2018 17:24:33 +0200

I took a look at the latest beta of Textadept 10, here are some small
observations or corrections:

1. Makefile: for Linux installation it's better to use
/usr/share/applications for the .desktop files instead
/usr/local/share/applications (this path doesn't exists normally).
Line 75 should be changed from:
     XDG_DATA_DIR ?= $(PREFIX)/share/applications
     XDG_DATA_DIR ?= /usr/share/applications
This would be consistent with the icon file location too.

2. Markdown lexer: the second level lists are considered blockcodes.
The list definition should be moved before the blockcode definition or
the blockcode definition should be updated to ignore the lines beginning
with [spaces/tabs+bullet(-+*)].

3. I'm glad that my suggestion of calling buffer:set_theme any moment
was implemented :)
I connected it to the LEXER_LOADED event to set a light theme for text
files (latex or markdown). My code is the following:

events.connect(events.LEXER_LOADED, function(lang)
   if lang == 'markdown' or lang == 'latex' then
       buffer.wrap_mode = buffer.WRAP_WORD
       buffer.wrap_visual_flags = buffer.WRAPVISUALFLAG_MARGIN
       buffer:set_theme(not CURSES and 'base16-tomorrow-light' or 'term')
     buffer:set_theme(not CURSES and 'base16-monokai-dark' or 'term')
     buffer.wrap_mode = buffer.WRAP_NONE

This sets correctly the color theme for different lexers, but won't set
the lexer (highlighting) for markdown and latex. If I don't change the
theme, the lexer will be correctly applied. Is there an explanation for

You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Tue 12 Jun 2018 - 11:24:33 EDT

This archive was generated by hypermail 2.2.0 : Wed 13 Jun 2018 - 06:51:12 EDT