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

From: Mitchell <m.att.foicica.com>
Date: Fri, 15 Jun 2018 14:56:26 -0400 (EDT)

Hi Keresztes,

Sorry for the late reply.

On Tue, 12 Jun 2018, Keresztes Barna wrote:

> Hi,
> 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
> to:
>     XDG_DATA_DIR ?= /usr/share/applications
> This would be consistent with the icon file location too.

The FreeDesktop specification says XDG_DATA_DIR is "/usr/local/share:/usr/share" by default, so if /usr/local/share/applications/ does exist, it will be read from. In general, Linux applications should install to the /usr/local/ prefix by default, so the Makefile does not deviate from it.

> 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(-+*)].

Thanks. I'll apply a fix.

> 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')
>   else
>     buffer:set_theme(not CURSES and 'base16-monokai-dark' or 'term')
>     buffer.wrap_mode = buffer.WRAP_NONE
>   end
> end)
>
> 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 this?

I think you've found a bug. I will look into this.

Cheers,
Mitchell

-- 
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 Fri 15 Jun 2018 - 14:56:26 EDT

This archive was generated by hypermail 2.2.0 : Sat 16 Jun 2018 - 06:26:29 EDT