programming Programming Alternatives to GitKraken?
Jump
  • hallettj hallettj 4 hours ago 100%

    Probably not very similar, but Git Butler is very interesting. It adds its own layer of management so that you can have multiple branches "applied" to your working tree simultaneously. It's helpful when you have multiple changes that should go into different branches, and some that shouldn't be committed - it has a system of lanes that help keep track of all that. Or you can test how changes from two branches interact.

    Last time I used it, maybe 6 months ago, it was rough around the edges so I didn't stick with it. But they've done lots of work since then so I'm thinking of giving it another go. It is (last I checked) an all-in tool. When you're using Butler on a project you probably won't be able to use other git tools.

    4
  • futurology Futurology Webb Discovers Methane, Carbon Dioxide in Atmosphere of K2-18 b - NASA
    Jump
  • hallettj hallettj 2 weeks ago 100%

    The equation for force of gravity is F = GMm / r² where

    • G is the gravitational constant
    • M is the mass of the planet
    • m is the mass of the object being weighed
    • r is the radius of the planet / distance between the centers of mass of two objects

    The equation shows that gravity scales linearly with mass, and scales inversely with the square of distance. The article says K2-18 b is 8.6 times Earth's mass, and 2.6 times Earth's radius. So the weight of a 100 kg mass would be:

    F = 100 × 8.6 / (2.6)²

    which works out to a weight of about 127 kg, or 1.27 times heavier.

    3
  • linuxmemes linuxmemes type the distro you use and is and let your keyboard finish it
    Jump
  • hallettj hallettj 2 weeks ago 100%

    NixOS and Home Manager config both ways to get rid of the same thing

    5
  • startrek Star Trek August 30th 2024. America adopts the metric system. Never forget.
    Jump
  • hallettj hallettj 3 weeks ago 100%

    I use metric temperature when I talk to my kids. Now they give me a hard time when I give them a Fahrenheit value! Keeps me honest I guess. I've also got my oldest using a 24 hour clock.

    14
  • startrek Star Trek August 30th 2024. America adopts the metric system. Never forget.
    Jump
  • hallettj hallettj 3 weeks ago 100%

    Stardate, 2024-08-30T06:34:17.993Z

    40
  • asklemmy Asklemmy How to form a club, and keep it alive
    Jump
  • hallettj hallettj 3 weeks ago 100%

    Aw, thanks! That's high praise!

    7
  • asklemmy Asklemmy How to form a club, and keep it alive
    Jump
  • hallettj hallettj 3 weeks ago 100%

    I used to organize a meetup for Javascript programmers. It was more about sharing information than about debate, but I think there might be overlap with what you want. The format was a regular meeting schedule once a month where 2-3 people would give presentations to show off what they've been working on, teach how to use a new framework, or whatever they were interested in. So in a way it has handing out information from on high, but I think because we had different people each meeting sharing their perspective there was a good element of exchange of ideas between peers.

    Now it turns out that people need lots of leadership energy to create room for exchange of ideas. At the beginning I'd get about 6 people at each meeting, few of whom volunteered to step up in front of the group. So what I did was to show up every month, and talked about whatever topic I could come up with. At most of the meetings it was just me talking. When I did get other people to present it was through prodding and hassling. But people were interested enough in the material, and found enough value in just being in the same room with other people with similar interests that people kept coming back. It stayed small like that, growing slowly for maybe 2 years. But then we hit a critical point where there were enough people coming, and people were inspired enough that suddenly we were getting 30-50 people each month, and I had no problem finding volunteers to present. And it wasn't the same volunteers either - we had a good rotation of different people interested in sharing their ideas. That continued for another 6 years before I moved and passed organizer responsibility over to the next generation.

    My point is that a club like this needs a lot of energy and attention. It's going to grow slowly. But it will grow if you keep at it, and put in the work. We reached that point where the group became sort of self sufficient in that I didn't need to be the one making presentations anymore, and I didn't need to actively seek out volunteers to present. But I still had to put in the work to make sure we had the meeting space available every month, show up to let people in, work out the meeting schedule, get food. Anything like this will die if there isn't someone holding it together through force of will. But it's worth it! It was a great experience!

    I know you said you want your club to self-manage. But people need structure. If you ask people to show up and have stimulating discussion they're going stand around awkwardly not knowing what to talk about. Something like a presentation followed by discussion gives structure that helps people to open up, and explore their own thoughts. Or since you want multiple perspectives maybe a debate or a panel format would work better for you. Get 2 or more volunteers to talk about a specific topic. I highly recommend lining up panelists ahead of time - you'll have a rough time getting volunteers on the spot. If you prep your debaters ahead of time by asking them to present different views they might be less likely to simply agree with each other. Once your scheduled panelists get ideas flowing it will be easier to encourage attendees to step up to speak. You might have a debate or panel followed by open discussion, or rotating panel seats that people can step up to and leave as they feel inspired. But again, based on my experience I suggest being ready to be the one person standing up and debating yourself for maybe many meetings before the club finds a self-organizing energy.

    43
  • asklemmy Asklemmy What are some of the most popular Lemmy apps to use?
    Jump
  • hallettj hallettj 3 weeks ago 100%

    I'm quite happy with Thunder.

    5
  • microblogmemes Microblog Memes New Meme Alert!
    Jump
  • hallettj hallettj 3 weeks ago 100%

    Oh dear... the other day I was encouraging my 12-year-old to join the cross country team. He said the only sport he's interested in is badminton.

    14
  • memes memes How's it going?
    Jump
  • hallettj hallettj 3 weeks ago 100%

    #7 is my goal owl

    3
  • hallettj hallettj 3 weeks ago 100%

    It seems that "fully" 3D printed is an overstatement. The article says, "there’s 3D printing whenever possible". That includes printing the frame as a single piece, and the hubs. Some pieces are specified to not be 3D printed like the crank and saddle. The article doesn't mention bearings.

    5
  • programming Programming Is the new #zed editor mostly hype rn?
    Jump
  • hallettj hallettj 4 weeks ago 100%

    Zed invented tree-sitter which is a great feature. But since tree-sitter is open source it's also available in neovim and helix.

    3
  • 196 196 Poultry power rule
    Jump
  • hallettj hallettj 4 weeks ago 100%

    When you get stuck you explain your problem to the turkey, and that helps to understand the problem better.

    45
  • energy Green Energy First of its kind 'energy dome' storage project takes another step forward in Wisconsin
    Jump
  • hallettj hallettj 4 weeks ago 93%

    Inefficient compared to batteries? I found another article saying this company hopes that the energy dome will cost ⅔ the cost of a lithium-ion battery installation with the same energy capacity. https://www.popularmechanics.com/science/energy/a61572150/carbon-dioxide-energy-dome-plant/

    13
  • hallettj hallettj 1 month ago 100%

    After seeing this comment I had to check how Disney is involved if they don't own the restaurant. The restaurant is in Disney World (specifically Disney Springs). https://www.bbc.com/news/articles/c8jl0ekjr0go

    IIUC that does put the restaurant in the special tax district that gives Disney the authority of a county government. But my very cursory search seems to indicate that restaurant safety oversight is managed at the state level.

    23
  • hallettj hallettj 1 month ago 100%

    It seems like only one side of the ancient rivalry is represented in the comments here. No worries, I'm right there with you.

    3
  • bicycles Bicycles Your wireless drivetrain might not be as safe or secure as you think - Canadian Cycling Magazine
    Jump
  • hallettj hallettj 1 month ago 100%

    What does "under pressure" mean? Does it mean shifting while stopped? I'm told some non-electronic belt drives can do that.

    2
  • asklemmy Asklemmy Right of way in car traffic is now decided trough mortal combat. How do you perceive this will affect everyday life?
    Jump
  • hallettj hallettj 1 month ago 100%

    I bring my kid to school on a bike. I follow the right-of-way rules at the 4-way stops and at left turns. But every day there are 1-3 drivers who wave me ahead, and refuse to move until I go first. I don't care what the rules are - I just want consistency!

    3
  • bicycles Bicycles Your wireless drivetrain might not be as safe or secure as you think - Canadian Cycling Magazine
    Jump
  • hallettj hallettj 1 month ago 100%

    I read that electronic shifting can automatically downshift when you come to a stop which I find a little tempting. But not tempting enough at the price I've seen. There's a spot on my regular route where my habit is to downshift 6 times as I come to a stop sign at the bottom of a hill. I do wonder what it would be like not to have to think about that so much.

    3
  • rust Rust Strategy Pattern in Rust
    Jump
  • hallettj hallettj 1 month ago 100%

    Yeah the performance differences don't matter in most cases. Rust makes it tempting to optimize everything because the language is explicit about runtime representations. But that doesn't mean that optimizing is the best use of your time.

    4
  • rust Rust Strategy Pattern in Rust
    Jump
  • hallettj hallettj 1 month ago 100%

    To expand on why generics are preferred, just in case you haven't seen these points yet: the performance downsides of Box<dyn MyTrait> are,

    • methods use dynamic dispatch in this case
    • requires heap allocation

    There is also a possible type theory objection which is that normally there is a distinction between types and traits. Traits are not types themselves, but instead define sets of types with shared behavior. (That's why the same feature in Haskell is called a "type class", because it defines a class of types that have something in common.) But dyn turns a trait into a type which undermines the type/trait distinction. It's useful enough to justify being in the language, but a little unsettling from a certain perspective.

    2
  • asklemmy Asklemmy *Permanently Deleted*
    Jump
  • hallettj hallettj 1 month ago 100%

    What helps me most is to find a comfortable rhythm, which is a combination of stride cadence and breathing. I've read advice on counting strides, and matching breaths to certain steps. It's hard for me to coordinate all that so I go by feel. If you're not feeling comfortable maybe try going slower.

    When your legs don't want to move it could mean that your muscles aren't warmed up. You might feel better after taking it easy at the start of the run. Or your muscles might be tired from recent exercise. Either way make sure you're hydrated.

    2
  • linux Linux Anyone knows if it's possible to color command line commands as you type them (kind of like an editor)?
    Jump
  • hallettj hallettj 2 months ago 100%

    It would make sense for the terminal to handle syntax highlighting since that would match how editors work. But the convention is that the shell handles highlighting, not the terminal. You can check which shell you are running with the command,

    $ echo $SHELL
    

    It's done that way because the shell is a running program that is capable of telling the terminal which colors to show (by mixing color escape sequences into text). Compare that to code in an editor which is text, not a running program so the only option is for the editor to handle highlighting[1]. Editors need syntax files to configure highlighting for all the different programming languages, while terminals don't need this because the shell tells them what colors to show.

    [1] setting aside the "semantic highlighting" LSP capability - that was invented long after syntax highlighting conventions were established

    2
  • nix Nix / NixOS Gaming on NixOS ?
    Jump
  • hallettj hallettj 2 months ago 100%

    Specifically programs.steam.enable = true sets up the direct rendering and 32-bit libraries that you generally need.

    I was confused at first about how to install wine runners in Lutris or in Bottles. It turns out you do it the same way as in any other distro, through the app.

    8
  • linux Linux Good Practice or Not - Add Wrapper for Custom Shell Aliases?
    Jump
  • hallettj hallettj 2 months ago 100%

    Seems like a matter of preference, and I see the logic in it. I'll mention that Nushell makes it easy to create custom shell functions that are invoked as sub-commands in this manner. https://www.nushell.sh/book/custom_commands.html#command-names

    4
  • micromobility micromobility - Ebikes, scooters, longboards: Whatever floats your goat, this is micromobility Coming to an NYC sidewalk near you: E-Bike battery charging cabinets
    Jump
  • hallettj hallettj 2 months ago 100%

    I'm not an expert, but I've heard that Rad bikes are good for their price, and they have been touting the safety of their batteries. (Rad is not the cheapest, but is not as expensive as the high-end bikes.)

    I wanted a cargo bike to transport my kid, and I wanted a mid-drive since I'm told the motor assist on that type of drive feels more natural. So I went with a Tern.

    7
  • 196 196 Rule (Penance 20/100)
    Jump
  • hallettj hallettj 2 months ago 100%

    As someone who is not onboard with dismantling the existing political system without a better system ready to go, I think that dual power sounds like a great idea!

    7
  • asklemmy Asklemmy If you suddenly found yourself teleported into a Minecraft world, how scared of dying would you be compared to before?
    Jump
  • hallettj hallettj 2 months ago 100%

    This happens to be the plot of the book series, The Accidental Minecraft Family

    11
  • asklemmy Asklemmy Do you know any mobile games that don't suck?
    Jump
  • hallettj hallettj 2 months ago 100%

    My favorite is Time Surfer. The core mechanic is basically the same as Tiny Wings, but the theme, artwork, levels, etc are all very different. I especially enjoy the chiptunes!

    2
  • neovim
    Neovim hallettj 2 months ago 100%
    Anyone using difftastic with fugitive.vim?

    [Difftastic](https://github.com/Wilfred/difftastic) is a diff tool that uses treesitter parsing to compare code AST nodes instead of comparing lines. After following the [instructions for use with git](https://difftastic.wilfred.me.uk/git.html) I'm seeing some very nice diffs when I run `git diff` or run `git show --ext-diff`. I thought it would be nice to get the same output for hunk diffs in the fugitive status window, and in fugitive buffers in general (which use the `git` filetype). But I haven't seen any easy way to do it. Has anyone got a setup like this? I can run a command in neovim like `:Git show --ext-diff` to get difftastic output in a buffer. I'm thinking maybe I can set up fugitive to use the `--ext-diff` flag by default, or set up some aliases. But there is no syntax highlighting for the difftastic outputs since the ANSI color codes that difftastic uses in interactive terminal output don't work in neovim, and the syntax highlighting for the `git` filetype assumes standard diff output which is not compatible with difftastic output. For me losing colors is not a worthwhile trade for the otherwise more readable diff output. My best idea right now is to set up a new filetype called `difftastic`, and write a new treesitter grammar or syntax plugin for it. Then set up some kind of neovim configuration to feed output from difftastic into buffers with the new filetype. There is [an open neovim issue](https://github.com/neovim/neovim/issues/15064) discussing adding syntax-aware diffs directly to neovim, but that doesn't seem to have gone anywhere.

    14
    0
    linux Linux My fellow software engineer, It's the year 2024...
    Jump
  • hallettj hallettj 2 months ago 93%

    Are there other relevant standards? The XDG base directory specification has been around for a long time, and is well established.

    Maybe your comment wooshed over my head; if so I apologize.

    14
  • linux Linux My fellow software engineer, It's the year 2024...
    Jump
  • hallettj hallettj 2 months ago 100%

    Are you saying that you don't want to write your software according to the XDG spec, or that you don't want to set the XDG env vars on your system? If it's the second that's fine - apps using XDG work just fine if you ignore it. If it's the first I'd suggest reconsidering because XDG can make things much easier for users of your software who have system setups or preferences that are different from yours; and using XDG doesn't cause problems for users who ignore it.

    OP's recommendation is aimed mostly at software authors.

    25
  • linux Linux My fellow software engineer, It's the year 2024...
    Jump
  • hallettj hallettj 2 months ago 100%

    So yes, "XDG" stands for "Cross-Desktop Group" - but I don't agree that using the spec assumes a windowing system. The base directory spec involves checking for certain environment variables for guidance on where to put files, and falling back to certain defaults if those variables are not set. It works fine on headless systems, and on systems that are not XDG-aware (I suppose that means systems that don't set the relevant env vars).

    OTOH as another commenter pointed out the base directory spec can make software work when it otherwise wouldn't on a system that doesn't have a typical home directory layout or permissions.

    24
  • memes memes Living the life
    Jump
  • hallettj hallettj 2 months ago 100%

    Oh, good point

    4
  • memes memes Living the life
    Jump
  • hallettj hallettj 2 months ago 87%

    The picture looks like an Indian Runner duck to me

    6
  • neovim Neovim Fancy markdown conceals for neovim
    Jump
  • hallettj hallettj 2 months ago 100%

    I went and fetched a link: markview.nvim

    7
  • asklemmy Asklemmy Fellas of Lemmy, what's your Every Day Carry (EDC)?
    Jump
  • hallettj hallettj 3 months ago 100%

    I also have a slimfold micro that I've been using so long I don't remember how old it is.

    3
  • houseplants Houseplants Creepy crawlies in my pelargonium
    Jump
  • hallettj hallettj 3 months ago 100%

    I recognize those from every Serpa Design terrarium video ever made: "Next I put in springtails to control fungus, and eat dead plant matter."

    3
  • asklemmy Asklemmy Europeans of Lemmy, what places in Europe should foreigners avoid at all cost?
    Jump
  • hallettj hallettj 3 months ago 92%

    There was a post earlier today complaining about questions that aren't open-ended, and therefore don't adhere to the community rules. So here we are with a question with many possible answers (which makes it properly open-ended).

    12
  • linux Linux Rofi as primary menu — recommendations?
    Jump
  • hallettj hallettj 3 months ago 83%

    I guess it's not relevant for your setup, but I like rofi because there is a fork that works in Wayland, and it's the only Wayland window switcher I have found that isn't tied to a specific window manager.

    4
  • linux_gaming Linux Gaming Moonlight isn't working
    Jump
  • hallettj hallettj 3 months ago 100%

    To start the firewall after you stopped it:

    sudo systemctl start firewalld
    

    systemctl is part of systemd - it starts and stops various services, shows statuses, lists available services, etc.

    There is documentation on opening ports here, plus more details on enabling & disabling the firewall: https://docs.fedoraproject.org/en-US/quick-docs/firewalld/#_controlling_ports_using_firewalld

    3
  • linux_gaming
    Linux Gaming hallettj 4 months ago 94%
    Blank red videos in game running in Wine?

    I installed [StarCraft: Mass Recall](https://www.sc2mapster.com/projects/starcraft-mass-recall) which is an impressive project that recreates the original StarCraft and Brood War campaigns in StarCraft 2. Everything works except that the cinematics and some of the game assets are flat, blank red. For example some of the video portraits in the briefing rooms display correctly, but Mengsk is a solid red square. In the first mission Raynor's vulture is flat red while everything else looks correct. Sound works correctly including in cinematics. The game assets aren't a huge deal, but the cinematics are a big part of the reason for playing these campaigns IMO. I've tried everything I can think of. I tried some different Wine runners. I tried disabling DXVK. I installed a number of dependencies that look like they provide video codecs: - amstream - devenum - quartz - xvid - ffdshow Does anyone have ideas about what else I might try? What I did figure out is a working command to run the mod, which took me a while. I used Bottles, installed Battle.net through the Bottles program installer, installed StarCraft 2 via Battle.net, and finally installed Mass Recall by unzipping and copying its files to the StarCraft `Maps/` and `Mods/` directories. Then I was able to run Mass Recall with this command: ```sh $ bottles-cli shell -b "<bottle name>" -i '"C:\Program Files (x86)\StarCraft II\Support64\SC2Switcher_x64.exe" "C:\Program Files (x86)\StarCraft II\Maps\Starcraft Mass Recall\SCMR Campaign Launcher.SC2Map"' ```

    15
    2
    linux
    Linux hallettj 5 months ago 97%
    Using passkeys on Linux & Android

    Passkeys seem like a great idea, and we are at a point where, although things are still very much in flux, software passkeys managed by password managers are starting to be usable. I thought I'd share the workflow that's working for me on Linux with some sites, and ask the community for more tips & tricks. A passkey is a client certificate - which is an old idea, but now there are some new standards in place*. When you log into a website, instead of sending a password you send a message signed using the private key on your hardware security device, or stored in your password manager. If you use a password manager the flow is about the same as with passwords: your password manager pops up and asks if you want to log in to the given website. But instead of sending a password to the browser, message signing takes place in the password manager. Unlike passwords those signed messages can't be replayed. Arguably you can skip sending MFA codes and get about the same (or maybe better) security with passkeys than you were getting with passwords + MFA. Complications come up because support for passkey APIs is still patchy. On Linux I think there is system-level support for hardware keys, but not for passkey managers (password managers that can do passkey signing). But you can close that gap using browser extensions! I'm using Enpass with it's Firefox extension. Signing into websites in Firefox using passkeys works quite well in some of the sites I've tried. (I've also tested with Bitwarden's browser extension, and it works just as well.**) Although _creating_ passkeys doesn't work on all of those sites. - I was able to create a passkey on Github, and sign in with it. - I was able to create a passkey for the demo at https://www.passkeys.io/, and sign in with it. - I couldn't create passkeys for Google, but I could log in with passkeys created on another device, and synced by Enpass to my Linux machine. - I can use a passkey for MFA on Discord, but they don't seem to be using them for logins yet. - I'm not getting options to use my passkeys on Amazon or Paypal, but I was able to create passkeys for these sites on Android. Without using a browser extension Chrome on Linux does have a feature to sign in with passkeys on mobile devices. I don't think this works with third-party passskey managers. On some sites Chrome gave me the option to log in using the automatically-generated, Google-managed passkey on my phone. It didn't actually worked for me - my phone showed a message saying "connecting to device" but never actually connected. That brings me to the Android side. Since some sites will let me log in with passkeys but not create them it's helpful to have another option for creating passkeys. Android is further along in implementing system level passkey support (only in Android 14 or later). But it's not perfect yet. Firefox for Android is not working with passkey managers yet, but there is [a ticket](https://bugzilla.mozilla.org/show_bug.cgi?id=1862132) to track this. Third-party passkey managers work in Chrome for Android, but only if you enable an experimental flag: - open `chrome://flags/` - find the setting "Android Credential Management for passkeys" - set the value to "Enabled for Google Password Manager and 3rd party passkeys" --- \* "Passkey" seems to be an umbrella term for WebAuthn or FIDO U2F. It looks like WebAuthn is a part of FIDO2. ** From a cursory look at the two I feel more comfortable with Enpass' browser extension than with Bitwarden's. I'm not positive, but it looks like Bitwarden loads credentials in the extension itself which puts all of your secrets in the browser process. OTOH the Enpass extension uses IPC to send requests to the Enpass desktop app. But as many will point out, Bitwarden's clients are open-source and audited while Enpass' software is closed-source.

    45
    6
    "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearNI
    nixos hallettj 6 months ago 100%
    [HowTo] gnome-keyring as ssh agent in lightweight window manager

    cross-posted from: https://leminal.space/post/4750886 > It took me some time to work out how to get my ssh agent set up in [Niri](https://github.com/YaLTeR/niri) so I though I would share what I did. I'm using NixOS and Home Manager. I put this in my Home Manager config: > > ```nix > services.gnome-keyring = { > enable = true; > components = [ "pkcs11" "secrets" "ssh" ]; > }; > home.sessionVariables.SSH_AUTH_SOCK = "$XDG_RUNTIME_DIR/keyring/ssh"; > ``` > > I'm using GDM according to NixOS' default configuration which I think runs gnome-keyring (I thought I saw it in the process list before I set up the user unit), and I think that configuration is automatically unlocking gnome-keyring when I log in via PAM integration. But apparently I need to run gnome-keyring again in my window manager session. Home Manager's `services.gnome-keyring` adds a systemd user unit that does that.

    8
    0
    nix
    Nix / NixOS hallettj 6 months ago 100%
    [HowTo] gnome-keyring as ssh agent in lightweight window manager

    It took me some time to work out how to get my ssh agent set up in [Niri](https://github.com/YaLTeR/niri) so I though I would share what I did. I'm using NixOS and Home Manager. I put this in my Home Manager config: ```nix services.gnome-keyring = { enable = true; components = [ "pkcs11" "secrets" "ssh" ]; }; home.sessionVariables.SSH_AUTH_SOCK = "$XDG_RUNTIME_DIR/keyring/ssh"; ``` I'm using GDM according to NixOS' default configuration which I think runs gnome-keyring (I thought I saw it in the process list before I set up the user unit), and I think that configuration is automatically unlocking gnome-keyring when I log in via PAM integration. But apparently I need to run gnome-keyring again in my window manager session. Home Manager's `services.gnome-keyring` adds a systemd user unit that does that.

    9
    1
    "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearNI
    nixos hallettj 6 months ago 90%
    Nix, NPM, and Dependabot https://sitr.us/2024/03/08/nix-npm-and-dependabot.html
    8
    3
    neovim
    Neovim hallettj 7 months ago 100%
    Treesitter query to match adjacent Rust nodes?

    I'd like a treesitter query that matches a Rust struct together with all of its attributes. For example, ```rust #[derive(Debug)] #[serde(rename_all = "camel_case")] pub struct MyType { pub foo: i32, } ``` The lines beginning with `#` are attributes that are logically connected to the struct declaration. But the treesitter grammar for Rust parses attributes as adjacent nodes, not as children of the struct declaration: ```scm (attribute_item ; [27, 0] - [27, 16] (attribute ; [27, 2] - [27, 15] (identifier) ; [27, 2] - [27, 8] arguments: (token_tree ; [27, 8] - [27, 15] (identifier)))) ; [27, 9] - [27, 14] (attribute_item ; [28, 0] - [28, 35] (attribute ; [28, 2] - [28, 34] (identifier) ; [28, 2] - [28, 7] arguments: (token_tree ; [28, 7] - [28, 34] (identifier) ; [28, 8] - [28, 18] (string_literal)))) ; [28, 21] - [28, 33] (struct_item ; [29, 0] - [31, 1] (visibility_modifier) ; [29, 0] - [29, 3] name: (type_identifier) ; [29, 11] - [29, 17] body: (field_declaration_list ; [29, 18] - [31, 1] (field_declaration ; [30, 4] - [30, 16] (visibility_modifier) ; [30, 4] - [30, 7] name: (field_identifier) ; [30, 8] - [30, 11] type: (primitive_type)))) ; [30, 13] - [30, 16] ``` How can I get produce a query that I can use in mini.ai that matches the struct, and all attributes? I've tried this query using Neovim's new built-in `:EditQuery` command: ```scm ((attribute_item)* . (struct_item)) @custom_capture.outer ``` It looks like it does what I want. But when I try using `@custom_capture.outer` in mini.ai it matches the struct declaration, but not the attributes. I tried using `#make-range!` like this, ```scm ((attribute_item)* @_start . (struct_item) @_end (#make-range! "custom_capture.outer" @_start @_end)) ``` That matches the struct and the second attribute, but does not get the first attribute. I'm guessing that's because the `.` specifies that nodes must be adjacent, and the second attribute is the only one that is adjacent to a struct_item. Following that thinking I tried this, ```scm ((attribute_item)? @_start . (attribute_item)* . (struct_item) @_end (#make-range! "custom_capture.outer" @_start @_end)) ``` That gets the struct and all the attributes, but only if my cursor is on the first attribute line when I use the textobject. If my cursor is on any subsequent line then I get the second attribute and the struct, but the first attribute is missed. One problem is I'm not clear whether `((attribute_item) . (struct_item))` matches an attribute_item and a struct_item that are adjacent, or matches an attribute_item that precedes a struct_item, but does not also match the struct_item. I tried experimenting with the second interpretation and used this query, ```scm (((attribute_item) . [(attribute_item) (struct_item)])* @_start (struct_item) @_end (#make-range! "custom_capture.outer" @_start @_end)) ``` That captures what I want, but in some cases if I have two struct declarations and I try to match only the second one the query selects both structs instead. Is that the way to do a lookahead? Or is there another way? I've kinda hit a wall looking at documentation, other examples, and running my own experiments. Does anyone have any pointers to help understand these queries on a deeper level? **Edit:** It looks like this stuff is in flux, so I should mention that I'm using the latest nightly as of March 2 2024, and I made sure that all of my plugins are up-to-date.

    11
    0