orbitalquark / textadept-open-file-mode

A Textadept module that extends the editor's Command Entry with a mode that can open files relative to the current file or directory. Tab-completion is available.
MIT License
3 stars 0 forks source link

Requiring module results in endless error messages in message buffer #2

Closed offsounder closed 1 year ago

offsounder commented 1 year ago

After requiring the open-file-mode module in my init.lua file, I get an endless stream of the following message in the message buffer on startup:

...textadept/core/ui.lua:337: attempt to call a nil value (method 'get_lexer')

Version: 11.4 OS: Fedora 36

Init file:

if not CURSES then
  view:set_theme('base16-eighties', {font = 'JetBrains Mono', size = 12})
end

buffer.use_tabs = false

io.quick_open_max = 10000

keys['alt+o'] = require('open_file_mode')

textadept.editing.strip_trailing_spaces = true
textadept.editing.highlight_words = textadept.editing.HIGHLIGHT_SELECTED

events.connect(events.LEXER_LOADED, function(name)
  if name == 'markdown' or name == 'text' then
    view.wrap_mode = view.WRAP_WHITESPACE
  end
end)
orbitalquark commented 1 year ago

Sorry for the trouble :( Would you please try the snapshot for the 11.4 release? It's in https://github.com/orbitalquark/textadept/releases/download/textadept_11.4/textadept_11.4.modules.zip. The latest zip from the GitHub page is for 11.5 nightly and is likely the source of all the errors.

I should add a notice to the individual module's download page.

orbitalquark commented 1 year ago

Alternatively you can download the zip associated with this commit: https://github.com/orbitalquark/textadept-open-file-mode/tree/cdc1cfde3e0b8719398fcf99ab99f6a4816df0f3. It should work for 11.4.

offsounder commented 1 year ago

@orbitalquark ,

No trouble at all. Thanks for the quick reply!

Unfortunately, I get the same error with both of those snapshots you listed. The version I had initially was the 11.4 version of both Textadept and the modules, which I downloaded from the homepage.

orbitalquark commented 1 year ago

I just pushed what I hope will be the fix for this: https://github.com/orbitalquark/textadept-open-file-mode/commit/6dff9f475dd2f220e72a5a448777b4e7b8bca164.

You'll have to manually change those lines instead of downloading the latest zip or applying the diff because there is an 11.5 nightly change right below the function definition line (which is not part of this fix).

offsounder commented 1 year ago

After changing those line, I am no longer seeing the errors in the message buffer. Thanks so much!