chasteinsect

joined 11 months ago
[–] chasteinsect@programming.dev 2 points 2 weeks ago

Thanks for taking the time to write this out.

[–] chasteinsect@programming.dev 3 points 3 weeks ago* (last edited 3 weeks ago) (2 children)

Does lifting sanctions on a country that you're at war with the smart thing to do? Literally helps to fund their enemy.

Also:

Energy analysts, including Brent Erickson, a managing principal at Obsidian Risk Advisors, have said the administration’s efforts to control prices would not have a meaningful impact until the strait is opened to vessels.

[–] chasteinsect@programming.dev 10 points 3 weeks ago (4 children)

They even lifted sanctions on Iranian oil

https://www.theguardian.com/us-news/2026/mar/20/us-sanctions-iranian-oil

They're doing great

[–] chasteinsect@programming.dev 1 points 4 weeks ago (1 children)

Hmm maybe i'll do something similar. I was thinking recently of using a new alias when doing purchases online but haven't decided yet. Kinda don't want to over-complicate things you know?

[–] chasteinsect@programming.dev 0 points 4 weeks ago (2 children)
[–] chasteinsect@programming.dev 0 points 4 weeks ago

Harpoon 2 — Mark up to 4 files and jump between them instantly. Once you start using this, you can’t go back.

You can replace harpoon with native argslist, if you don't need any advanced features. Works great for me. Interesting that you feel the need to use both Harpoon and Snipe, though. I max put like 4 different buffers into "Harpoon" and if I need to navigate elsewhere I just use my picker (mini.pick) to search through files or grep for words.

Lazy-load everything. Most plugins don’t need to load until you actually use them.

If you don't have a lot of heavy plugins IMO you don't really need to lazy load. Ever since I switched to 0.12 (lazy -> native pack) I don't lazy load anything and honestly I see absolutely no difference and you avoid a lot of the complexity.

vim-commentary — gcc to comment a line. Classic.

This is native in nvim already.

auto-session — Restores your buffers and layout when you reopen a project.

You can also achieve this with native nvim functionality if you don't need anything complex.

nvim-ufo — Better code folding with treesitter.

I'm curious why the need for this vs native functionality?

[–] chasteinsect@programming.dev 5 points 4 weeks ago

That's my philosophy. The more unprocessed, whole, plant based, the better.

[–] chasteinsect@programming.dev 4 points 4 weeks ago (3 children)

Exactly why I only use email aliases for newsletters and stuff

[–] chasteinsect@programming.dev 1 points 1 month ago

EU is going down the same path. The “EU alternative” stuff is just bogus. It’s just a matter of time before EU starts doing the same.

It's not bogus if you are yourself European or if the alternative is Big Tech. But I feel you. There are lots of shitty European companies that are not that much better. I avoided the switch to Spotify because even though they are "European" they gave a lot of money to Joe Rogan and to Trump on his inauguration.

Also, the EU did recently reject the chat control proposal so at least that's something...

[–] chasteinsect@programming.dev 1 points 1 month ago (2 children)

Konsole from what I recall isn't GPU accelerated so it's noticeably slower. https://sw.kovidgoyal.net/kitty/performance/ (metrics might be a bit outdated by now) I recommend Kitty.

[–] chasteinsect@programming.dev 10 points 1 month ago (1 children)

What a friendly country! And people think i'm crazy when I try to avoid buying Chinese stuff as much as I can.

Satellite communications giant Viasat was also compromised, allowing hackers to gain access to tools used by law enforcement to access the communications of others.

Yeah let's keep installing surveillance backdoors guys it's safe surely.

 

Was really nostalgic going through old Counter-Strike 1.6 maps.

 

Claude Code made a C compiler. And it's completely useless

 

Video description : Subscription services exist for nearly everything consumers buy. Many, like Netflix or Spotify, start out affordable, but the cost adds up over time. And while signing up is effortless, cancelling can be difficult. Companies such as Adobe and Amazon have even been accused by the Federal Trade Commission of using dark patterns to trap consumers in subscriptions.

But rising costs are only part of the problem. The subscription model is eroding consumer’s opportunity to own what they buy. So how did we get to the point where practically everything is a subscription? And why is owning nothing making everything so expensive?

00:00 - Intro 01:58 - Why subscriptions are everywhere 06:26 - Companies love subscriptions 09:13 - Subscriptions are sneaky 10:29 - Cancelling is difficult 13:39 - Own nothing economy 16:52 - Consumers fight back 22:56 - The future of subscriptions 24:24 - Credits

 

From : https://techhub.social/@sawaba@infosec.exchange/115924627853343043 (mastodon)

The enshittification of computer repair is happening.

AI has amazingly managed to make repairable computers practically worthless.

The increase in memory and storage pricing is destroying the second-hand market for computing hardware and this makes me sad. I watched a video from someone that runs a repair shop, and this is what's happening:

The memory/storage alone is worth more than the rest of the computer, so people are stripping them out to sell separately.

The second hand market is now flooded with computers that have no memory or storage. Buying new memory or storage to put in these used computers is now more expensive than buying a new computer.

So we now suddenly have a giant e-waste problem PLUS a giant problem for repair shops that want to stay in business.

In the video, he was basically saying that they have to pivot to the only computers that folks aren't stripping RAM and storage out of - computers that have those things soldered on. The irony here is that repair shops now have to ignore the most repairable computers and focus on the least repairable computers instead.

 

Found it interesting.

Lobste.rs thread : https://lobste.rs/s/1qmcac/tools_built_on_tree_sitter_s_concrete

 

I came across this while reading the book NeoDB Book | Life After Cars by by Sarah Goodyear, Doug Gordon, and Aaron Naparstek. Found it interesting as this is a guy that a lot of car enjoyers look up to.

From the book: "Henry Ford was, of course, the man most responsible for inaugurating mass production of the automobile—the man who refined the car as the ultimate expression of American consumer culture. He was also a man who had some exceptionally repellent ideas about “bloodlines.” As Jonathan Greenblatt of the Anti-Defamation League said on Twitter at the time of Trump’s remarks, “Henry Ford was an antisemite and one of America’s staunchest proponents of eugenics"

The book is great ! Would recommend. This is from a chapter called "Power Likes Horsepower", which explores the deep political and cultural ties between cars, power, and extremist ideologies in the U.S. and beyond. It traces how figures like Henry Ford used the automotive industry to promote divisive, often racist and anti-Semitic beliefs, and how modern politicians- like Donald Trump and JD Vance - continue to weaponize car-related rhetoric to fuel culture wars, resist climate action, and stoke fear over policies like electric vehicles or urban planning.

 

This is an older blog post I came across while reading this related one on syntax highlighting:

I am sorry, but everyone is getting syntax highlighting wrong @ tonsky.me. It was posted here 3 months ago.

I think both make great points and has pushed me to into a rabbit hole of re-writing my current Nord theme into something a bit more minimal, only for me to eventually realize Nord theme with barely any syntax highlighting (mostly white text) looks very bleak and I didn't want to spend the time to hunt all the highlight groups to make things look good, so I tried out the Alabaster theme, which the guy from the 2nd article created and I love it, feels like it really hits that middle spot between too much highlighting and not enough.

Here's the theme I used for nvim :

https://github.com/p00f/alabaster.nvim?tab=readme-ov-file

I changed some things (matching bracket background color for visibility, comments grayed out and property names of tables should be yellow, instead green).

You can see the picture of how it looks here

 

Part 1 (Intro)

I am in the process of moving away from astronvim https://docs.astronvim.com/ to a more minimal neovim configuration. I needed something more native to replace Harpoon https://github.com/ThePrimeagen/harpoon, which is a sort of plugin-based buffer switcher, bookmarker.

I eventually came across this reddit thread that implemented something like what i was searching with native arglist: https://www.reddit.com/r/neovim/comments/1om84w2/persistent_harpoon_with_arglist/. The problem was, since arglist doesn't persist by itself when you close neovim, he implemented his own state management for it. He also considered marks-based replacement but it had other, bigger problems.

An idea came to my mind: doesn’t Neovim’s built-in session management already save and restore the arglist?

So I went digging, found the help page https://neovim.io/doc/user/usr_21.html#_sessions and apparently it does !

   A Vim session contains all the information about what you are editing.
This includes things such as the file list, window layout, global variables,
options and other information

AstroNvim uses Resession.nvim https://github.com/stevearc/resession.nvim to manage sessions. I used them in my workflow but sparingly...Honestly, if not for the arglist, I probably would have chosen to not use them at all. Anyways, upon further reading I realized just how simple native session management really is and that I wouldn't need any other extra plugins for my use case.

Part 2 (Sessions)

So I came across this blog post: https://aymanbagabas.com/blog/2023/04/13/simple-vim-session-management.html It implements session management in a hands-off manner. Basically: If you open a directory with nvim, it checks if that directory is a project directory (looks for git file). If it is, it loads the session from ./.nvim/session.vim (if it's there), and on closing saves the session to the same place.

This was fine. I tried it, but soon realized I didn't need this amount of complexity. So I opted for a way simpler setup:

-- #Sessions

-- Save current session to .nvim/session.vim
vim.keymap.set("n", "<leader>ss", function()
    vim.cmd("!mkdir -p .nvim")
    vim.cmd("mksession! .nvim/session.vim")
    print("Session saved!")
end, { desc = "Save current session " })

-- Load session from .nvim/session.vim
vim.keymap.set("n", "<leader>sl", function()
    vim.cmd("source .nvim/session.vim")
    print("Session loaded")
end, { desc = "Load session" })


-- Save session on exit
vim.api.nvim_create_autocmd("vimleave", {
    callback = function(data)
        -- only save session if there's a .nvim/session.nvim file
        local sessionfile = ".nvim/session.vim"

        if vim.fn.filereadable(sessionfile) then
            vim.cmd("mksession! " .. sessionfile)
        end
    end,
})

1 keybinding to save session in ./.nvim/session.vim 1 to load it and 1 autocommand: when you exit Neovim, if a session.vim file already exists, it’s overwritten with the current session state.

Really simple setup that explicitly gives me control when to save my session and when not to. It's way better than what I had back in AstroNvim, where it would auto-save for every directory. And now they're stored in the same project directory, which I like.

Part 3(Arglist)

Now that I had sessions I just needed to add some keybindings to interact with the arglist. For that, this blog post explained everything really well and I based a lot of my keybindings off of it:

https://jkrl.me/vim/2025/05/28/nvim-arglist.html

This is what I ended up with :

-- Show the list
vim.keymap.set("n", "<leader>al", "<C-L><Cmd>args<CR>")

-- Navigate forward / backwards / first / last
vim.keymap.set("n", "[a", '<cmd>exe v:count1 .. "N"<bar>args<cr><esc>')
vim.keymap.set("n", "]a", '<cmd>exe v:count1 .. "n"<bar>args<cr><esc>')
vim.keymap.set("n", "[A", "<cmd>first<bar>args<cr><esc>")
vim.keymap.set("n", "]A", "<cmd>last<bar>args<cr><esc>")

-- Jump to arglist entry 1..6 with Alt+number (and show args)
for i = 1, 6 do
    vim.keymap.set("n", ("<M-%d>"):format(i), ("<cmd>argument %d | args<cr><esc>"):format(i), {
        desc = ("Arglist: go to %d"):format(i),
        silent = true,
    })
end

-- Add current buffer to list
vim.keymap.set("n", "<leader>aa", "<cmd>$arge %<bar>argded<bar>args<cr>")

-- Insert current buffer at x position, shift everything to the right
-- Prefix a number before shortcut that will be the x position in which to insert the current buffer
-- If you don't enter any number before the command, insert at position 0
vim.keymap.set("n", "<leader>ai", function()
    local count = vim.v.count
    vim.cmd(count .. "arge %")
    vim.cmd("args")
end)

-- Delete current buffer from list
vim.keymap.set("n", "<leader>ad", "<cmd>argd %<bar>args<cr>")
-- Delete all
vim.keymap.set("n", "<leader>aD", "<cmd>%argd<cr><C-L>")


A lot of it is self-explanatory from the comments. I use alt + number to navigate through my arglist, don't really even need those navigate forward / backward keybindings but whatever.

And I added a simple autocmd from the Reddit post that jumps to your last cursor position when you open a buffer.

-- #go to last loc when opening a buffer
vim.api.nvim_create_autocmd("bufreadpost", {
    desc = "go to last edit location when opening a new buffer",
    group = vim.api.nvim_create_augroup("last_loc", { clear = true }),
    callback = function(event)
        local exclude = { "gitcommit" }
        local buf = event.buf
        if vim.tbl_contains(exclude, vim.bo[buf].filetype) or vim.b[buf].last_loc_flag then
            return
        end
        vim.b[buf].last_loc_flag = true
        local mark = vim.api.nvim_buf_get_mark(buf, '"')
        local lcount = vim.api.nvim_buf_line_count(buf)
        if mark[1] > 0 and mark[1] <= lcount then
            pcall(vim.api.nvim_win_set_cursor, 0, mark)
        end
    end,
})

Really happy with the results. Everything was like 60 lines of code and using native neovim functionality. I replaced a session plugin and harpoon and it works IMO better than what I had previously.

 

Before coming across this video I did not know of a way to replace things over multiple files without relying on LSP rename functionality. Apparently you can grep -> send to quickfix list -> use :cdo to run a command once per match.

There's also this quicker.nvim plugin (same creator as oil.nvim) that let's you treat your quickfix list as a buffer you then can edit anything in there and afterwards save, similar to oil.nvim giving you a bit of a more streamlined experience.

I'm not sure whether I'll end up using it but the :cdo command will for sure come in handy!

view more: ‹ prev next ›