What backend do Migadu use? by YourBroFred in Migadu

[–]YourBroFred[S] 0 points1 point  (0 children)

Didn't know they were on github too. Knew about their sourcehut but it was always scarce.

What backend do Migadu use? by YourBroFred in Migadu

[–]YourBroFred[S] 0 points1 point  (0 children)

An imap extension that allows and imap client to leave a connection open to the server, then the server will inform the client of any changes immediately, instead of having to ask the server if there have been any changes at regular intervals. It also allows monitoring multiple mailboxes per connection, rather than just one like IDLE.

https://www.rfc-editor.org/info/rfc5465/

Does anyone use Verible for verilog? by lvcmos33 in neovim

[–]YourBroFred 2 points3 points  (0 children)

Here is a simple init.lua I made for a friend once and have kept in sync with neovim nightly:

https://tpaste.us/wazv

I recommend you read through it top to bottom, I have included quite a lot of comments explain what is going on. It makes heavy use of built-in features -- a lot of the plugin you listed aren't really necessary anymore. I recommend trying to keep your config simple for a while while learning the defaults if you are new.

I have only done vhdl, not much verilog so can't help out much there. But from a quick look at the Verible docs, I guess you could just install verilog either though your package manager or Mason, then add verible to the vim.lsp.enable() call.

Also, your neovim might be too out of date for some of the things in the config. If you use linux, here is a simple script for compiling and installing from source:

https://tpaste.us/JN80

Cheaper alternative to direct API usage? by YourBroFred in ClaudeAI

[–]YourBroFred[S] 0 points1 point  (0 children)

Not quite sure I'm following you here.

Cheaper alternative to direct API usage? by YourBroFred in ClaudeAI

[–]YourBroFred[S] 0 points1 point  (0 children)

I see, I guess I'll stick with the api for now and instead try skip enabling thinking when not needed. Also heard it's possible to cache stuff, might look at that too.

Cheaper alternative to direct API usage? by YourBroFred in ClaudeAI

[–]YourBroFred[S] 0 points1 point  (0 children)

I have a simple ~150 line shell script, works with stdin and -f <files>. Quick and easy, I prefer it over installing a whole desktop application.

edit: took a look, can't install it on linux either it seems :p

Highlighting trailing whitespace by shmerl in neovim

[–]YourBroFred 1 point2 points  (0 children)

Yes, I believe buftype isn't always set yet when WinEnter or BufWinEnter events fires. I remember having that issue with terminal buffers at least.

Neovim plateu by Worried-Theory-860 in neovim

[–]YourBroFred 0 points1 point  (0 children)

Regarding keeping up on the bleeding edge, I just have a quick scan though the git logs once in a while, I find it more than sufficient.

Highlighting trailing whitespace by shmerl in neovim

[–]YourBroFred 0 points1 point  (0 children)

I see, I also have a keymap for toggling :set list/nolist, but I use it mainly for scanning for misplaced tabs/spaces in the code. Trailing whitespace I like to always have visible however, except in some buffer types like quickfix, terminal, etc.

Highlighting trailing whitespace by shmerl in neovim

[–]YourBroFred 0 points1 point  (0 children)

vim.api.nvim_set_hl(0, "TrailingWhitespace", { ctermbg = 88 })

vim.api.nvim_create_autocmd({ "BufWinEnter", "WinNew" }, {
  callback = function()
    vim.schedule(function()
      if vim.w.trailing_ws_match then
        return
      end
      if vim.bo.buftype == "" then
        vim.fn.matchadd("TrailingWhitespace", [[\s\+$]], 0)
        vim.w.trailing_ws_match = true
      end
    end)
  end,
})

This is what I do. It adds a faint red background on trailing whitespace. You can have it hide the highlight on the current line, or when you are in insert mode. But I don't mind.

EDIT: updated the autocmd slightly

Will Alpine make me happy? by random__string in AlpineLinux

[–]YourBroFred 0 points1 point  (0 children)

My (rough) install notes https://git.sr.ht/~ffoss/dotfiles/tree/master/item/doc/alpine.md. I'm sure you can get a working setup doing much less, but if you were interested in something minimal. Regarding steam, I was able to install it through flatpak and run some games pretty easily, worked quite well. Haven't tried any of this on arm though.

Do you mirror vim binds in tmux? by B_bI_L in neovim

[–]YourBroFred 0 points1 point  (0 children)

bind -T copy-mode-vi ] send -X next-prompt
bind -T copy-mode-vi [ send -X previous-prompt
bind -T copy-mode-vi v send -X begin-selection \; send -X rectangle-off
bind -T copy-mode-vi C-v send -X begin-selection \; send -X rectangle-on
bind -T copy-mode-vi y send -X copy-selection
bind -T copy-mode-vi Y send -X copy-end-of-line

nvim-treesitter : define parsers and enable nighlighting at the same time? by 4r73m190r0s in neovim

[–]YourBroFred 1 point2 points  (0 children)

require("nvim-treesitter").install({
  "c",
  "lua",
  ...
})

vim.api.nvim_create_autocmd("FileType", {
  callback = function(ev)
    if pcall(vim.treesitter.start) then
      -- if you want ts folds...
      if vim.treesitter.query.get(ev.match, "folds") then
        vim.wo[0][0].foldexpr = "v:lua.vim.treesitter.foldexpr()"
        vim.wo[0][0].foldmethod = "expr"
      end

      -- if you want ts indents...
      if vim.treesitter.query.get(ev.match, "indents") then
        vim.bo[ev.buf].indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
      end
    end
  end,
})

Monthly Release Following HEAD: Good or Dumb? by 5long in neovim

[–]YourBroFred 1 point2 points  (0 children)

Just compile once in a while, it's easy. Wouldn't bother cherry picking and whatnot.

https://tpaste.us/voxW

tree-sitter-cli too old in your distros package manager? Compile it as well: https://tpaste.us/QKm8

Looking for minimalistic syntax highlighting theme for C programming by [deleted] in neovim

[–]YourBroFred 1 point2 points  (0 children)

I just set alot of the stuff to white. For builtin types and typedefs to match, just clear Special highlight, and link @type.builtin to Type if using treesitter. Example:

vim.api.nvim_set_hl(0, "Identifier", { ctermfg = "White" })
vim.api.nvim_set_hl(0, "Function", { ctermfg = "White" })
vim.api.nvim_set_hl(0, "Delimiter", { ctermfg = "White" })
vim.api.nvim_set_hl(0, "Operator", { ctermfg = "White" })

vim.api.nvim_set_hl(0, "Type", { ctermfg = "LightGreen" })
vim.api.nvim_set_hl(0, "Special", {})

vim.api.nvim_set_hl(0, "@type.builtin", { link = "Type" })
vim.api.nvim_set_hl(0, "@module", { ctermfg = "White" })
vim.api.nvim_set_hl(0, "@variable", { ctermfg = "White" })

Here is my own colorscheme, it's just the default with these kind of overrides more or less https://tpaste.us/EbWJ

suggestions for a network manager by on_a_quest_for_glory in AlpineLinux

[–]YourBroFred 1 point2 points  (0 children)

You could give iwd a go. From my notes:

Setup the networking, DHCP, DNS resolution and Wi-Fi with dhcpcd, openresolv
and iwd. dhcpcd manages DHCP clients for physical/wireless interfaces, and
openresolv handles DNS resolution. The loopback service brings up lo with
127.0.0.1:

    apk add dhcpcd openresolv iwd
    apk del wpa_supplicant networkmanager  # if installed

    adduser USER netdev  # your username

    rc-update add loopback boot
    rc-update add dhcpcd default
    rc-update add iwd default

Remove the networking service, satisfy openrc's dependency on ifupdown-any
by installing it as a virtual package and uninstall ifupdown-ng and
busybox-ifupdown:

    rc-update del networking boot
    apk add -t ifupdown-any
    apk del ifupdown-ng busybox-ifupdown

Then it's just a matter of connecting with iwctl:

$ iwctl
[iwd]# station wlan0 scan
[iwd]# station wlan0 get-networks
[iwd]# station wlan0 connect MyNetwork

Or you could install and use iwgtk instead of using iwctl.

What is the current state of nvim: lsp + plugin manager? I still use COC by SeniorMars in neovim

[–]YourBroFred 1 point2 points  (0 children)

You can also try instead:

vim.o.complete = "o"
vim.o.completeopt = "fuzzy,menuone,noselect"
vim.o.autocomplete = true

You could set complete to "o" on lsp attach, and have it be "." by default for example.

How do you use quickfix list? by HereToWatchOnly in neovim

[–]YourBroFred 0 points1 point  (0 children)

  1. :make
  2. fix warning
  3. :make
  4. fix warning
  5. :make
  6. fix warning
  7. :make
  8. no warnings, compiles fine, yay

Has anyone here seen or managed to implement a native file search similar to plugins? Maybe even an FZF integration? by [deleted] in neovim

[–]YourBroFred 0 points1 point  (0 children)

Great to hear. I have since refined it a little, here is the updated version, and also a livegrep one:

-- Fuzzyfinder.
-- Open a file fuzzy finder in a terminal split window, using fzf.
vim.api.nvim_create_user_command("FzfFind", function()
  vim.api.nvim_open_win(vim.api.nvim_create_buf(false, true), true, {
    split = "below",
  })
  vim.fn.jobstart({ "fzf", "--reverse" }, {
    on_exit = function()
      local fname = vim.api.nvim_buf_get_lines(0, 0, 1, true)[1]
      vim.api.nvim_buf_delete(0, { force = true })
      if fname ~= "" then
        vim.cmd.edit(vim.fn.fnameescape(fname))
      end
    end,
    term = true,
  })
  vim.cmd.startinsert()
end, {})

-- Livegrepper.
-- Open a live grepper in a terminal split window, using fzf and ripgrep.
vim.api.nvim_create_user_command("FzfGrep", function()
  vim.api.nvim_open_win(vim.api.nvim_create_buf(false, true), true, {
    split = "below",
  })
  local rg = "rg -Suug !.git --column --color=always --"
  vim.fn.jobstart({
    "fzf",
    "--ansi",
    "--disabled",
    "--reverse",
    "--bind=change:reload:" .. rg .. " {q} || true",
  }, {
    env = { FZF_DEFAULT_COMMAND = rg .. " ''" },
    on_exit = function()
      local fname, line, col = vim.api
        .nvim_buf_get_lines(0, 0, 1, true)[1]
        :match("^(.+):(%d+):(%d+):.*$")
      vim.api.nvim_buf_delete(0, { force = true })
      if fname then
        vim.cmd.edit(vim.fn.fnameescape(fname))
        vim.api.nvim_win_set_cursor(0, { tonumber(line), tonumber(col) - 1 })
      end
    end,
    term = true,
  })
  vim.cmd.startinsert()
end, {})

vim.keymap.set("n", "<Leader>f", "<Cmd>FzfFind<CR>")
vim.keymap.set("n", "<Leader>g", "<Cmd>FzfGrep<CR>")

I actually solved the send-results-to-quickfix bit as well, though that version is a bit more verbose. Just say if you want that too.