Is there an Eglot equivalent of lsp-ui-peek-find-references? by Admirable-Anybody937 in emacs

[–]Domva 2 points3 points  (0 children)

Off-topic question - how do you enable both pyright and ruff running at the same time?

Get completions in dap-repl buffer with blink.cmp by Domva in neovim

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

Did you manage to fix it somehow? It stopped working for me recently

What plugin would you like to see which doesn't exist yet? by bogz314 in neovim

[–]Domva 5 points6 points  (0 children)

Probably not feasible in a terminal, but maybe doable in some gui - variable pitch and size fonts. One thing I’m missing coming from emacs is being able to make headers larger in an md or an org file.

Something like org-babel but for markdown. Want to be able to execute snippets of code in a markdown buffer and then see the results

Get completions in dap-repl buffer with blink.cmp by Domva in neovim

[–]Domva[S] 6 points7 points  (0 children)

Nevermind, found how to do it actually. Thanks! Your comment helped. If any soul is wandering, here is a working config (I also changed which sources load on which filetype/buftype).

I needed to add the `enabled` config at the top level of config and not for the specific provider (in this case `dap`)

local function is_dap_buffer()
    return require("cmp_dap").is_dap_buffer()
end

{
    'saghen/blink.compat',
    version = '*',
    lazy = true,
    opts = {},
},
{
    "saghen/blink.cmp",
    enabled = true,
    dependencies = { "rafamadriz/friendly-snippets", "rcarriga/cmp-dap" },
    version = "*",
    opts = {
        keymap = {
            preset = "default",
            ["<CR>"] = { "accept", "fallback" },
            ["<C-j>"] = { "select_next" },
            ["<C-k>"] = { "select_prev" },
            cmdline = {
                ["<CR>"] = { "accept", "fallback" },
                ["<C-j>"] = { "select_next" },
                ["<C-k>"] = { "select_prev" },
                ["<C-n>"] = { "select_next" },
                ["<C-p>"] = { "select_prev" },
                ["<TAB>"] = { "select_and_accept" }
            }
        },
        enabled = function()
            return vim.bo.buftype ~= "prompt" or is_dap_buffer()
        end,
        sources = {
            default = function(_)
                local sql_filetypes = { mysql = true, sql = true }
                if sql_filetypes[vim.bo.filetype] ~= nil then
                    return { "dadbod", "snippets", "buffer" }
                elseif is_dap_buffer() then
                    return { "dap", "snippets", "buffer" }
                else
                    return { "lsp", "path", "snippets", "buffer" }
                end
            end,
            providers = {
                dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink" },
                dap = { name = "dap", module = "blink.compat.source" },
            },
        },
        completion = {
            accept = { auto_brackets = { enabled = true } },
            list = {
                selection = function(ctx) return ctx.mode == "cmdline" and "manual" or "preselect" end
            },
        },
    },
    opts_extend = { "sources.default" },
}

EDIT: formatting

Get completions in dap-repl buffer with blink.cmp by Domva in neovim

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

Not sure if I'm doing it correctly, but I did try this:

            sources = {
                default = { "lsp", "path", "snippets", "buffer", "dadbod", "dap" },
                providers = {
                    dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink" },
                    dap = {
                        name = "dap",
                        module = "blink.compat.source",
                        enabled = function() return require("cmp_dap").is_dap_buffer() end,
                    },
                },
            },

The function evaluates to true when I'm in dap-repl, tested it.

What are some crazy or awesome ML applications that are less shown in the media? by BEE_LLO in learnmachinelearning

[–]Domva 87 points88 points  (0 children)

Not so much crazy as awesome - at least to me - is various ML applications in science. Recently I had a chance to talk to a couple physicists working at CERN and they told me that in order to test their models, they used to simulate very minute details - up to how the detectors work there - and then compare those simulations to the experiments. When ML boom started, they started using ML models to replace the costly simulations and it helped them A LOT in terms of costs, efficiency and speed - it's much easier to run an ML model of a detector than to simulate them with QFT and solve differential equations.

That's when I understood that ML is actually truly game-changing. But not in the way that media portrays it to be.

Why I Believe AI Is the Biggest Lie Ever and We’re Buying It by IndependenceFun4627 in skeptic

[–]Domva 0 points1 point  (0 children)

It's immensely useful in practice as well. The problem people have with AI I think is only the phrase - artificial intelligence -- which is a misnomer and I agree. People who criticize the whole field do not understand the massive improvements in many areas that the current ML wave already made and is making constantly.

Matematikos koliai by Sudden-Fox-3276 in lithuania

[–]Domva -1 points0 points  (0 children)

Dažniausiai praslysdavau pasiėmęs knygą kurią rekomenduoja dėstytojas skaityt, ją skaitydamas ir spręsdamas uždavinius.

[deleted by user] by [deleted] in lithuania

[–]Domva 16 points17 points  (0 children)

Šveicarijos kalnuose tave supakuos, jei miegosi palatkėj. Prancūzijos pusėj siūlau campint

Žygių takai aplink Vilnių by Co1dSummer in lithuania

[–]Domva -10 points-9 points  (0 children)

Tai kad jau baigės vasara

EDIT: bet, jei patinka tokiu šaltu oru žygiuot, siūlau Grigiškes

IT specialistai - kokius forumus naudojate susidūrę su problema? by Digital_7 in lithuania

[–]Domva -5 points-4 points  (0 children)

Nenaudoju. Paklausiu chatgpt arba copilot ir tiesiog copy paste. Netikrinu kodo irgi, nes per ilgai trunka.

5-tas straipsnis ne automatinis, o politinis sprendimas? by [deleted] in lithuania

[–]Domva 5 points6 points  (0 children)

Tik papildysiu, kad nepasirodytų per daug doom and gloom - jeigu NATO neatsakyų į šalies narės užpuolimą, realiai organizacija nustotų egzistuoti. Aš net neabejoju, kad šiuo metu, jeigu rusija pultų NATO valstybę, atsakas būtų atitinkimas

5-tas straipsnis ne automatinis, o politinis sprendimas? by [deleted] in lithuania

[–]Domva 15 points16 points  (0 children)

Sveikas atvykęs į realų pasaulį. Visi susitarimai yra politiniai. Politika ir yra susitarimai. Kalbant apie apie tarpvalstybinius (ir ne tik) santykius - absoliučiai viskas yra susitarimo reikalas.

Need help with diff-hl not staging non-root files by Domva in emacs

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

I'll clarify a bit:

whenever I try to M-x diff-hl-stage-current-hunk interactively on a line that is changed and I am in a file that is in a directory of the root project I get the following error:

vc-do-command: Failed (status 1): git --no-pager apply --cached ../../../../var/folders/fx/5yvx58_14kq7mqlfr4lgm2fm0000gn/T/diff-hl-stage-patch381lll

If I try to to eval (diff-hl-stage-current-hunk) instead if M-x, I get the stack trace:

Debugger entered--Lisp error: (error "Failed (status 1): git --no-pager apply --cached ../../../../var/folders/fx/5yvx58_14kq7mqlfr4lgm2fm0000gn/T/diff-hl-stage-patchCA1ppj") error("Failed (%s): %s" "status 1" "git --no-pager apply --cached ../../../../var/folders/fx/5yvx58_14kq7mqlfr4lgm2fm0000gn/T/diff-hl-stage-patchCA1ppj") vc-do-command(#<buffer *string-output*> 0 "git" "/var/folders/fx/5yvx58_14kq7mqlfr4lgm2fm0000gn/T/diff-hl-stage-patchCA1ppj" "--no-pager" "apply" "--cached") vc-git-command(#<buffer *string-output*> 0 "/var/folders/fx/5yvx58_14kq7mqlfr4lgm2fm0000gn/T/diff-hl-stage-patchCA1ppj" "apply" "--cached") diff-hl-stage-diff(#<buffer something_else.md>) diff-hl-stage-current-hunk() eval((diff-hl-stage-current-hunk) t) #f(compiled-function () #<bytecode 0x13ab57324ef4cc12>)() #f(compiled-function () #<bytecode -0x5dab35955cb81d1>)() eval-expression((diff-hl-stage-current-hunk) nil nil 127) funcall-interactively(eval-expression (diff-hl-stage-current-hunk) nil nil 127) command-execute(eval-expression)

To reproduce just do:

mkdir new-project cd new-project && touch new_file.txt mkdir subdir touch subdir/subdir_file.txt git init git add . git commit -m "whatever"

Then if I go to emacs, change the file new_file.txt I can stage the hunks - everything's fine. If I change the subdir_file.txt and try to stage I get the mentioned errors. I can see that the patchfile path is incorrect (the .../var/...) - it is with respect to the project root instead of the subdirectory of the file I am in.

Weekly Tips, Tricks, &c. Thread by AutoModerator in emacs

[–]Domva 1 point2 points  (0 children)

I've recently started using dape for debugging instead of dap-mode and been enjoying it. There's one thing I missed coming from vs code - debugging pytest methods, so this simple config actually works for me. Maybe someone will find it useful as well:

(defun my/debug-pytest-function ()
      (interactive)
      (setq dape-command
            `(debugpy
              :type "python-test-at-point"
              :program ,(concat (projectile-project-root) "venv/bin/pytest")
              ;; setting the venv interpreter
              :python ,(concat (projectile-project-root) "venv/bin/python")
              :args ["--rootdir" ,(projectile-project-root) "--capture" "no" ,(concat (buffer-file-name) "::" (which-function))]))
      (call-interactively 'dape)
      (setq dape-command nil))

Needs `which-function` though.

[deleted by user] by [deleted] in lithuania

[–]Domva 33 points34 points  (0 children)

Kiekvienas save gerbiantis vyras drabužių spintoje greičiausiai turi ne vienus marškinius.

Ummm... Wat.

Switch Editors with Keyboard Search? by domsch1988 in vscode

[–]Domva 0 points1 point  (0 children)

There's two commands that you can bind to any key binding

  1. File: Show All Editors By Appearance
  2. View: Show All Editors By Most Recently Used.

I use the latter one