Closed richerve closed 3 years ago
So you have a modules/open_file_mode/init.lua file in your Textadept release directory, correct?
Where are you calling require('open_file_mode')
? In your ~/.textadept/init.lua? Keep in mind the module returns a function, so you want to bind it to a key, e.g.
keys['alt+o'] = require('open_file_mode')
I need to update the documentation.
yes, was calling require on init.lua.
Was wondering how the command was going to be called. I thought for a minute that it was overriding the original ui.command_entry
function directly so the same binding for command_entry would work.
Okay, and if you remove the call to require()
you don't get these errors? Unfortunately it's working for me, so I'm not sure what's going wrong.
correct, maybe is related to how I "installed" the app, I have symlinks that point to the original directory. But even executing ./textadept directly from that dir shows the same error 🤷
I downloaded the package again and execute it from the terminal and same error. Even tried with the new beta version.
Try simply copying the contents of the module's init.lua into your ~/.textadept/init.lua, and change the last line "return ..." to "keys[...] = ..." (choose a key binding). Then run Textadept. Let's see if it's a module error or a Lua "require" error.
Sorry @orbitalquark ended up not using Textadept anymore. Thank you for your help
Hi, just starting to use textadept and its modules
Steps
require('open_file_mode')
Error
As soon as I restart textadept, it will throw an error that the one shown below and it will keep repeating that error in a Messages Buffer/View taking focus and making impossible to use the editor.
/home/rich/Apps/textadept_11.1.linux/core/ui.lua:341: attempt to call a nil value (method 'get_lexer')...ps/textadept_11.1.linux/modules/textadept/file_types.lua:90: attempt to call a nil value (method 'set_lexer')