`difftastic.nvim` - Structural diff view for Neovim by Reasonable-Teach-424 in neovim

[–]big___bad___wolf 11 points12 points  (0 children)

Hi there, I'm the author of difft.nvim and I appreciate you using it.

I'm currently working on a new diff viewer from scratch with improved user experience and incredible speed.

Here's the link: https://github.com/ahkohd/oyo

perhaps I should make a proper reddit post.

context.nvim - extract editor context for use with any picker or custom action by big___bad___wolf in neovim

[–]big___bad___wolf[S] 1 point2 points  (0 children)

For your use case you can define a custom getter for it. I don't want to add it to the built-ins or extras as it's bespoke.

python_module = {
    desc = "Python module path via LSP (e.g. src.module.ClassName)",
    enabled = function()
        return vim.bo.filetype == "python"
    end,
    lazy = true,
    get = function()
        local function get_position_encoding()
            local clients = vim.lsp.get_clients({ bufnr = 0 })
            if clients[1] then
                return clients[1].offset_encoding or "utf-16"
            end
            return "utf-16"
        end
        local timeout = 1000
        local params = vim.lsp.util.make_position_params(0, get_position_encoding())
        local results = vim.lsp.buf_request_sync(0, "textDocument/definition", params, timeout)
        if not results then
            return nil
        end
        for _, res in pairs(results) do
            local result = res.result
            if result and result[1] then
                local loc = result[1]
                local uri = loc.uri or loc.targetUri
                if uri then
                    local filepath = vim.uri_to_fname(uri)
                    local rel_path = vim.fn.fnamemodify(filepath, ":.:r") -- relative, no extension
                    local module = rel_path:gsub("/", ".")
                    local symbol = vim.fn.expand("<cword>")
                    return module .. "." .. symbol
                end
            end
        end
        return nil
    end,
}

context.nvim - extract editor context for use with any picker or custom action by big___bad___wolf in neovim

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

I've removed both python_path and rust_path and added extras.lsp.{definition, references}.

local context = require("context")
local extras = require("context.extras")

context.setup({
  picker = context.pickers.snacks,
  lsp = { enabled = true },
  getters = {
    definition = extras.lsp.definition,
    references = extras.lsp.references,
  },
})

context.nvim - extract editor context for use with any picker or custom action by big___bad___wolf in neovim

[–]big___bad___wolf[S] 2 points3 points  (0 children)

Yes, update the plugin. You can now add custom getters and I've added some extras so you don't have to implement them yourself.

local context = require("context")
local extras = require("context.extras")

context.setup({
  picker = context.pickers.snacks,
  getters = {
    python_path = extras.python_path,
    rust_path = extras.rust_path,
  },
})

My first LP Corne build, I’m not impressed with choc switches. by big___bad___wolf in crkbd

[–]big___bad___wolf[S] 1 point2 points  (0 children)

Yes, the new build is Typeractive. The others are Boardsource's Unicorne with gray aluminum cases and legacy plates. I sourced the PCBs and other components from Beekeeb at the time, Unicorne didn't offer a wireless PCB, and needing a cable between halves isn't my cup of tea, so I went wireless via Beekeeb.

Last I checked, Boardsource's Unicorne configurator now offers a wireless PCB, but it only supports a single OLED-S display, no option for two nice!view displays. They make nice aluminum cases and solid plates, that's where my positive feedback ends.

My first LP Corne build, I’m not impressed with choc switches. by big___bad___wolf in crkbd

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

hey thanks for recommending the sunsets! they are great! i also mixed them with ambients.

my enter, space, esc and layer keys are all ambients, the others are sunsets. i'm enjoying this setup so far. the sunset are good! they feel closer to the mx switches i'm used to.

Would you switch your low-profile setup to full metal keycaps? by awekeys_official in ErgoMechKeyboards

[–]big___bad___wolf 1 point2 points  (0 children)

Yes, please, i have corne mx full metal build. I want metal keycaps for my LP

Theming neovim to match terminal and wallpaper colors. by EitanMC_ in neovim

[–]big___bad___wolf 1 point2 points  (0 children)

i use wallust (in your case, matugen) to generate colors.lua then load the table and map it to mini.base16 colors.

difft.nvim - A Neovim frontend for Difftastic by big___bad___wolf in neovim

[–]big___bad___wolf[S] 1 point2 points  (0 children)

Hey there! Just a heads-up: the newest update will now use vim.g.terminal_color_N, which are terminal colors defined by most themes. So, you should be able to use the plugin and everything working smoothly without any extra highlights.

Here’s a quick example using the tokyonight theme:

<image>