all repos

dotfiles @ 1225f8c

i use rach linux btw
4 files changed, 21 insertions(+), 45 deletions(-)
nvim: include filename in ruler; dd to delete qf item; use zmx instead of tmux
Author: Oleksandr Smirnov olexsmir@gmail.com
Committed at: 2026-08-31 21:32:03 +0300
Authored at: 2026-08-31 20:14:16 +0300
Parent: afb46d4
M config/nvim/after/ftplugin/go.lua
···
        11
        11
         

      
        12
        12
         -- DLV

      
        13
        13
         vim.fn.sign_define("Breakpoint", { text = "b", texthl = "Error" })

      
        14
        
        -local dlv = { pane_id = nil, signs = {} }

      
        15
        
        -local function get_dlv_pane_id()

      
        16
        
        -  if dlv.pane_id then return dlv.pane_id end

      
        17
        
        -  local res = vim

      
        18
        
        -    .system(

      
        19
        
        -      { "tmux", "list-panes", "-s", "-F", "#{pane_id}:#{pane_current_command}" },

      
        20
        
        -      { text = true }

      
        21
        
        -    )

      
        22
        
        -    :wait()

      
        23
        
        -  if res.code ~= 0 then

      
        24
        
        -    vim.notify("Failed to list tmux panes", vim.log.levels.ERROR)

      
        25
        
        -    return

      
        26
        
        -  end

      
        27
        
        -

      
        28
        
        -  for line in res.stdout:gmatch "[^\n]+" do

      
        29
        
        -    local pane_id, command = line:match "([^:]+):(.*)"

      
        30
        
        -    if command and command:match "^dlv" then

      
        31
        
        -      dlv.pane_id = pane_id

      
        32
        
        -      return pane_id

      
        33
        
        -    end

      
        34
        
        -  end

      
        35
        
        -

      
        36
        
        -  vim.notify("No dlv session found", vim.log.levels.ERROR)

      
        37
        
        -end

      
        38
        
        -

      
        
        14
        +Config.map("n", "<localleader>b", function()

      
        
        15
        +  local file, line = vim.fn.expand "%:p", vim.fn.line "."

      
        
        16
        +  vim.fn.sign_place(0, "Breakpoints", "Breakpoint", file, { lnum = line })

      
        
        17
        +  vim.system { "zmx", "send", "dlv", ("break %s:%d\n"):format(file, line) }

      
        
        18
        +end, true)

      
        39
        19
         Config.map("n", "<localleader>B", function()

      
        40
        
        -  for _, sid in ipairs(dlv.signs) do

      
        41
        
        -    vim.fn.sign_unplace("Breakpoints", { id = sid })

      
        42
        
        -  end

      
        43
        
        -  dlv.signs = {}

      
        44
        
        -  dlv.tab_id = nil

      
        45
        
        -  vim.system { "tmux", "send-keys", "-t", get_dlv_pane_id(), "clearall", "Enter" }

      
        46
        
        -  vim.notify("Cleared all breakpoints.", vim.log.levels.INFO)

      
        47
        
        -end, true)

      
        48
        
        -

      
        49
        
        -Config.map("n", "<localleader>b", function()

      
        50
        
        -  local line = vim.fn.line "."

      
        51
        
        -  local cmd = string.format("break %s:%d", vim.fn.expand "%:p", line)

      
        52
        
        -  vim.system { "tmux", "send-keys", "-t", get_dlv_pane_id(), cmd, "Enter" }

      
        53
        
        -

      
        54
        
        -  local fullpath = vim.fn.expand "%:p"

      
        55
        
        -  local sid = tonumber(string.format("%d%04d", vim.fn.bufnr(), line)) --[[ @as number]]

      
        56
        
        -  vim.fn.sign_place(sid, "Breakpoints", "Breakpoint", fullpath, { lnum = line })

      
        57
        
        -  table.insert(dlv.signs, sid)

      
        
        20
        +  vim.fn.sign_unplace "Breakpoints"

      
        
        21
        +  vim.system { "zmx", "send", "dlv", "clearall\n" }

      
        58
        22
         end, true)

      
M config/nvim/after/ftplugin/qf.lua
···
        1
        1
         Config.map("n", "q", "<cmd>quit<cr>", true)

      
        
        2
        +Config.map("n", "dd", function()

      
        
        3
        +  local line = vim.api.nvim_win_get_cursor(0)[1]

      
        
        4
        +  local qflist = vim.fn.getqflist()

      
        
        5
        +

      
        
        6
        +  -- remove line from list

      
        
        7
        +  table.remove(qflist, line)

      
        
        8
        +  vim.fn.setqflist(qflist, 'r')

      
        
        9
        +

      
        
        10
        +  -- restore cursor position

      
        
        11
        +  local max_lines = vim.api.nvim_buf_line_count(0)

      
        
        12
        +  vim.api.nvim_win_set_cursor(0, { math.min(line, max_lines), 0 })

      
        
        13
        +end, true)

      
M config/nvim/after/lsp/clerk.lua
···
        3
        3
           cmd = { "clerk", "lsp" },

      
        4
        4
           filetypes = { "ledger" },

      
        5
        5
           settings = {

      
        6
        
        -    latinToCyrillicCompletion = true,

      
        
        6
        +    latin_to_cyrillic_completion = true,

      
        7
        7
           }

      
        8
        8
         }

      
M config/nvim/init.lua
···
        104
        104
         vim.o.laststatus = 0

      
        105
        105
         vim.o.showmode = false

      
        106
        106
         vim.o.ruler = true

      
        107
        
        -vim.o.rulerformat = "%50(%=%{%v:lua.require'ruler'()%}%)"

      
        
        107
        +vim.o.rulerformat = "%45(%=%{%v:lua.require'ruler'()%}%)"

      
        108
        108
         

      
        109
        109
         vim.o.list = true

      
        110
        110
         vim.opt.listchars:append {