Hello, I started this thread to discuss improving the sublime text user experience for Nim developpers. For now the only plugin that provides syntax highlighting for sublime text is the the apparently unmaintained Nimlime Which uses the old tmLanguage format and does not follow Sublime text's scope naming guidelines in many places with Various indentation bugs and poor symbol rules. If you know enough of sublime text syntax development, you are welcomed to contribute.
Note: I already posted this on Discord and the response was that (what I understood) is that it isn't worth it or no one on the server uses sublime so it's not interesting.
and sublimetext is losing popularity in general > and RAM usage isn't that much smaller than with VSCode really, sublimetext is like at least ~300mb ram
Pardon but what I understood is "it's not worth it"
No wonder that Sublime is little used as it has no current and good Nim support. I bet that once it supports Nim about as well as VSC it'll find quick uptake.
@AmjadBHD
I am very interested in seeing more editors with support for Nim, in particular Sublime Text which, unlike VSC, isn't a bloated, monstrous abomination but a really fine and relatively small editor.
Another interesting option is textadept, in part because it uses the same plugins a well known and well liked Mac editor uses. Plus iirc there also is a terminal version.
Hint: I didn't even really read your post because whenever certain "red flags" appear (like 'rust', 'go', 'xml') I immediately loose interest and switch off.
If however you were to create reasonably good support for Nim in sublime (in C, lua, or python iirc) I'd volunteer to serve as lab rat (friendly grin)
No wonder that Sublime is little used as it has no current and good Nim support. I bet that once it supports Nim about as well as VSC it'll find quick uptake.
What's missing is a good syntax support as for LSP support, ST's LSP client is actively maintained (especially for ST4).
If your test program reads from stdin, it could be that it did compile successfully but then started debugging until it reached the line where it waits for user input
No user input. Just echo something and sleep 1 second in an infinite loop. If I remove the loop and let the test program terminate nothing changes. Still hangs until I press the 'stop' button in the debugger UI.
What platform are you on ?
MacOS
Can you try replacing shell_cmd": "nim c -g ${file} with "cmd": ["nim", "c", "-g", "${file}"]
No difference, unfortunately.
Otherwise please open an issue with a screen recording?
Adding "console": "internalConsole" fixes debugging:
{
"folders":
[
],
"debugger_configurations":
[
{
"type": "lldb",
"request": "launch",
"name": "Launch",
"program": "${file_path}/${file_base_name}",
"args": [],
"cwd": "${file_path}",
"console": "internalConsole"
},
],
}
I found out the problem was related to console redirection when after several minutes of no activity I saw this:
Failed to redirect stdio to a terminal. (Terminal agent did not respond within the allotted time.)
Debuggee output will appear here.
"pre_debug_task" still hangs when enabled and I am going to investigate that next.
Did you not have terminus installed ?
Nope. With terminus installed both "console": "integratedTerminal"` and no "console" setting at all also work.
Thank you @amjadBHD
Also, someone looking for information about how to setup debugging with SublimeText + lldb may find the following useful:
Adding "preRunCommands": ["command script import --allow-reload PATH_TO/nimlldb.py"] to an lldb debug configuration does some symbol demangling.
Example:
"debugger_configurations":
[
{
"type": "lldb",
"request": "launch",
"name": "Launch",
[...]
"preRunCommands": ["command script import --allow-reload ~/.choosenim/toolchains/nim-#devel/tools/debug/nimlldb.py"],
}
],