vosjedev

joined 1 year ago
1
submitted 5 months ago* (last edited 5 months ago) by vosjedev@lemm.ee to c/helix@programming.dev
 

Hi!

I am trying to set up arduino autocompletion and syntax highlighting. I followed some of the instuctions in an issue on the github adding that to my own common sense, and it mostly overlaps now. But the syntaxhighlighting is still not there, and neither is autocompletion.

My ~/.config/helix tree looks like this now:

.
├── config.toml
├── languages.toml
├── runtime
│  └── queries
│     ├── arduino
│     │  ├── folds.scm
│     │  ├── highlights.scm
│     │  ├── indents.scm
│     │  ├── injections.scm
│     │  └── locals.scm
│     └── cpp
│        ├── folds.scm
│        ├── highlights.scm
│        ├── indents.scm
│        ├── injections.scm
│        └── locals.scm
└── themes
   └── molokai-edit.toml

and the relevant content (I removed some markdown stuff for this post) of languages.toml:

[language-server.arduino]
command = "./arduino-language-server" 
args=["-clangd","/usr/local/bin/clangd","-cli","/usr/local/bin/arduino-cli","-cli-config","~/.arduino15/arduino-cli.yaml","-fqbn","arduino:avr:uno"]

[[grammar]]
name = "cpp"
source = { git = "https://github.com/tree-sitter/tree-sitter-cpp", rev = "a90f170f92d5d70e7c2d4183c146e61ba5f3a457" }

[[grammar]]
name = "arduino"
source = { git = "https://github.com/ObserverOfTime/tree-sitter-arduino", rev = "db929fc6822b9b9e1211678d508f187894ce0345"}

# [...] < here was some config for markdown

[[language]]
name = "arduino"
scope="source.arduino"
file-types=[ "ino" ]
language-servers=[ "arduino" ]
injection-regex = "arduino"
comment-token = "//"
roots=["sketch.yaml"]

I also installed the packages arduino-language-server (with dep clangd) and arduino-cli from the arch repos.

I just remembered: I am using the helix-ext AUR package (which means I am still on 23.10.2), to be able to use the file tree on the left. here is the repo. Could that be the issue?

I have no idea anymore what I am doing wrong, could anyone tell me? If you need more information to help, just ask for it.

addition (14-4-24):
As I switched to nvim (lack of features in helix), I am not interested in setting this up anymore. Thanks!

 

I recently got a pinetab2, and I booted it into ubuntu-touch, running lomiri. But the screen orientation is the wrong way (portrait). I am not interested in autorotate, so how would I force the screen orientation of a mir-based desktop to landscape? If you need more info to help me, just ask for it.

edit:
Yesterday while writing this I didn't have much time, so I forgot to mention the accual problem...
The problem I'm having is that the autorotation sensor always reports portait mode, even when in landscape. It does report a change. I know this because it switches to desktop mode when I rotate with the keyboard plugged in.
edit while writing previous edit:
Now it does not even go to desktop mode anymore... So I guess it is now stuck even more.

My solution was either disabling the rotation sensor's driver to make lomiri default to the set rotation in /etc/ubuntu-touch-session.d/flo.conf, or fixing the driver so it reports orientation correctly.

edit 2: I currently solved this by editing /etc/deviceinfo/devices/pinetab2.yaml and removing all supported rotations except InvertedLandscape. This means it can't autorotate at all, but I wasn't interested in autorotate in the first place. If someone knows how to fix the driver and make autorotate work correctly, please let me know.