Skip to content

Neovim on Termux enhancements

Thoughts for the week

More Neovim updates and getting closer to a release of Practicalli Astro-config

I have been using Neovim (and Emacs) on Termux, so I can code on my Android tablet or Android smart phone. I typically use an external keyboard (e.g. Keyboard.io Atreus or Model100), especially when considerable typing is involved.

As the hardware and compilation tooling is different for Android Linux (compared to amd64 linux) the Clojure and Lua LSP language servers would not install via the Mason manager. As these two languages are in the top 3 languages I use, then it is a great boost to get these servers working locally and configuring Neovim to use them instead.

I use the date command when I had a need to tweak the time on my Linux computer, saves launching the Settings app and using the mouse.

Timezones made easy

time.is makes figuring out timezones really simple. See the current time in any timezone across the world.

time.is very useful for events where people attend from different timezones. Set the local time and share a link for others who will see the event time in their own timezone.

Neovimλ︎

I'm making some changes to the Practicalli AstroNvim configuration (AstroNvim4) over the next few days.

All my personal Neovim & plugin options (and associated workflow biases) will only be in lua/plugins/practicalli.lua. With these options only in one file, anyone else using the configuration can easily disable them.

I will encourage other users to create there own lua/plugins/personal.lua customisation so any changes from upstream will be easier to merge.

The GitHub repository will be renamed to practicalli/astro-config which its much easier to write and say during screencasts. GitHub should redirect when pulling updates

This week I will update Practicalli Neovim book install guide with new repo and further info on how to use the config effectively (especially with your own customisations)

Then the first official release of the config will be created via GitHub releases.

If I have time, there are lots of things to add to Practicalli Neovim book too (including a few more plugins I'm using in the config)

Neovim and Termuxλ︎

Neovim (and Emacs) run very well on Termux, the Android app that runs a user space Linux distribution. As its user space, the Android device does not need to be rooted, simply install the F-Droid Marketplace app and install its Termux application.

Install Neovim & Clojure on Android

Create an ultra-mobile Clojure development environment with Termux app.

Ultra-mobile development environment with Android

Local LSP serversλ︎

The LSP language servers for Clojure and Lua do not install via Mason.

Clojure LSP server is not compiled for Android Linux, although the jar release does work.

Lua language server is available as the lua-language-server Termux package.

Neovim 0.10.x not available yetλ︎

Pin neogit to 'v0.0.1' as later versions of the project use Neovim 0.10.x specific API calls.

Neogit will not setup if using a later version of the project with Neovim 0.9.x

Pedantic Pinning packages with Lazy package manager

'v0.0.1' had to be used as a value with the tag keyword for the lazy plugin manager configuration.

Using "v0.0.1" as the tag value failed to use that Git tag and the head was used instead.

Its not clear why tag requires a value wrapped in '' rather than "". The Lua String Data Type is any sequence of zero or more characters surrounded by single quotes or double quotes.

Neovim Config feedback sessionλ︎

vim-jack-in opens in a Terminal console. The buffer should show as Terminal at the bottom bar

Ctrl+\ Ctrl+n to leave the Terminal mode, then g T or g t to switch to the source code tab (moving backward or forward through the tab pages)

Would be useful to add a key mapping for terminal mode, so that Esc could be used instead.

https://clojurians.slack.com/archives/CK143P6D7/p1598474458020800

Linux - set date and time via Command lineλ︎

The date and time used by the Linux Operating System can be configured in the Settings app that comes with most Linux desktops, e.g. Regolith Linux, Gnome, KDE, etc. The settings app should also control if date/time is managed by a Network Time Protocol (NTP) server.

date will show the current date, time and timezone

date with the -s option sets the current time and date, or only the time if the date is not provided.

Root Adminstration preveledges required to set date

su - or sudo is required to run the date and timedatectl commands

Set Time and date

date -s '2024-05-18 20:32:00' 

Set Time only

date -s '20:32:00' 

The Linux Operating system may be using a Network Time Protocol (NTP) server to keep the date and time correct.

Disable the NTP server update if the date is automatically being corrected to the current date and time.

Disable NTP automatic date and time updates

timedatectl set-ntp false

Enable NTP automatic date and time updates

timedatectl set-ntp true

Thank you.

🌐 Practical.li Website

Practical.li GitHub Org practicalli-johnny profile

@practicalli@clj.social @practical_li