oscar

joined 1 year ago
[–] oscar 1 points 3 months ago

gdu is another alternative. It is sometimes faster than ncdu for me.

[–] oscar 6 points 3 months ago

I used vscode for a few years, but I eventually went back to neovim/tmux. It's a lot less resource heavy, and it's easy to just ssh and jump in from home. I also much prefer a modal editor and I don't want to have to touch a mouse.

[–] oscar 2 points 4 months ago (1 children)

What makes Servo a better bet than Ladybird? Who backs it?

[–] oscar 14 points 4 months ago

Since people keep bringing up tauri, here's the comparison made in the README:

Dioxus vs Tauri

Tauri is a framework for building desktop (and soon, mobile) apps where your frontend is written in a web-based framework like React, Vue, Svelte, etc. Whenever you need to do native work, you can write Rust functions and call them from your frontend.

  • Natively Rust: Tauri's architecture limits your UI to either JavaScript or WebAssembly. With Dioxus, your Rust code is running natively on the user's machine, letting you do things like spawning threads, accessing the filesystem, without any IPC bridge. This drastically simplifies your app's architecture and makes it easier to build. You can build a Tauri app with Dioxus-Web as a frontend if you'd like.

  • Different scopes: Tauri needs to support JavaScript and its complex build tooling, limiting the scope of what you can do with it. Since Dioxus is exclusively focused on Rust, we're able to provide extra utilities like Server Functions, advanced bundling, and a native renderer.

  • Shared DNA: While Tauri and Dioxus are separate projects, they do share libraries like Tao and Wry: windowing and webview libraries maintained by the Tauri team.

[–] oscar 2 points 4 months ago* (last edited 4 months ago)

That's OK, we all got our own preferences 😉 But I think you will be pretty good to go on t495. It has apparently been linux certified on older Ubuntu, which Mint is based on.

https://ubuntu.com/certified/201905-27049

Also linux certified by Lenovo:

https://support.lenovo.com/us/en/solutions/pd500343-linux-certification-thinkpad-t495-20njz4krus

[–] oscar 3 points 4 months ago (2 children)
[–] oscar 1 points 5 months ago (1 children)

Oof, that's annoying.

Weird that :syntax off doesn't work, from a small test it seems to do the trick for me. But I guess as long as vim works there's no need to replace it 🙂

[–] oscar 2 points 5 months ago* (last edited 5 months ago) (4 children)

Try running this: :set indentexpr= and then :set noautoindent. Without any config file, this works for me while in a makefile that looks like this:

foo: foo.c bar.h
        $(CC) $< -o $@

The indentexpr option is set by filetype, but disabling filetype indent after already opening a makefile is too late, it would need to happen before opening it (in either a config file or directly after running nvim without any file specified).

However, indentexpr seems to only control the automatic indentation when hitting enter at the target line, but not within the recipe for it. To fix that I also had to disable autoindent.

[–] oscar 3 points 5 months ago

Ah dang, you're right, I must have read it too quickly. Yeah then I also think it's something about not loading the config, it can be investigated by checking the runtime values like I described in my second edit.

[–] oscar 5 points 5 months ago* (last edited 5 months ago) (10 children)

Using a the ubuntu 24.04 docker image for testing, I was able to disable automatic indentation with this config in ~/.config/nvim/init.lua:

vim.cmd("filetype indent off")

If you prefer using vim syntax it would instead be the following in ~/.config/nvim/init.vim:

filetype indent off

Note: it seems this file is not loaded if a init.lua file is present in that directory

Edit to add: So the reason this is required is, similar to vim (so you may already be familiar with this), there are filetype-specific configurations loaded. These usually reside in /usr/share/nvim/runtime/<plugin/indent/syntax/etc>/<filetype>. You can configure what files to load using the :filetype command.

There's more info here: https://neovim.io/doc/user/filetype.html

Second edit: Also when filetype indent/plugin/syntax is on, it seems to be loaded after your user config, so it overrides it. You can investigate if your actual config was applied or not by running, for example, :set autoindent? or :set cindent?. If the values do not match your configuration, it was likely overridden by :filetype. This was the case for me.

[–] oscar 1 points 5 months ago

Gotcha. That's actually good because it will be easier to troubleshoot. I will try to reproduce in a barebones config and see if I can figure something out. What language are you editing, and what version of neovim do you use? Distro may also be relevant in case they package some indent.vim file(s).

view more: ‹ prev next ›