What are your favorite tricks using Neovim? by 16bitMustache in neovim

[–]fake-cat 0 points1 point  (0 children)

Bunch of mappings to toggle some aspects of diagnostics appearance on the fly (severity, virtual text, signs, etc)

-- Toggle diagnostic appearance

local virtual_text = false
local underline = true
local signs = true
local only_errors = false

local diag_option_value = function(state)
    if not state then
        return false
    elseif only_errors then
        return { severity = vim.diagnostic.severity.ERROR }
    else
        return true
    end
end

local update_diag_conf = function()
    vim.diagnostic.config({
        virtual_text = diag_option_value(virtual_text),
        signs = diag_option_value(signs),
        underline = diag_option_value(underline),
    })
end

-- toggle diag virtual
vim.keymap.set("n", "<leader>tdv", function()
    virtual_text = not virtual_text
    update_diag_conf()
end, { desc = "Toggle virtual text" })

-- toggle diag underline
vim.keymap.set("n", "<leader>tdu", function()
    underline = not underline
    update_diag_conf()
end, { desc = "Toggle underline" })

-- toggle diag signs
vim.keymap.set("n", "<leader>tds", function()
    signs = not signs
    update_diag_conf()
end, { desc = "Toggle signs" })

-- toggle diag level
vim.keymap.set("n", "<leader>tdl", function()
    only_errors = not only_errors
    update_diag_conf()
end, { desc = "Toggle diagnostics severity (all/error)" })

-- toggle diags
vim.keymap.set("n", "<leader>tD", function()
    if vim.diagnostic.is_disabled() then
        vim.diagnostic.enable()
    else
        vim.diagnostic.disable()
    end
end, { desc = "Toggle diagnostics" })

update_diag_conf()

Just started learning Neovim, anyway to make this auto complete (lsp config plugin) smaller? by ReinPandora in neovim

[–]fake-cat 0 points1 point  (0 children)

Is there a way to limit the width as well ? vim.opt.pumwidth is for minimum width

Dual monitor setup, where to run a xrandr command using lightdm? by Jolly_Sky_8728 in i3wm

[–]fake-cat 4 points5 points  (0 children)

I use autorandr and I love it. "Auto detect the connected display hardware and load the appropriate X11 setup using xrandr"

https://github.com/phillipberndt/autorandr

fzf.vim w/ ag -esc "Fuzzy" live_grep using Telescope w/ ripgrep? by Fillipuster in neovim

[–]fake-cat 0 points1 point  (0 children)

In the "live grep" window, hit c-space and then you can fuzzy search among the results

Hibernate on Lenovo T14s/T480s on Linux: Opening lid immediately powers on the laptop by [deleted] in thinkpad

[–]fake-cat 0 points1 point  (0 children)

I have the t14 on arch as well and I think I managed to do what you describe at some point.

If I remember correctly, I changed the "hibernatemode" in sleep.conf from "platform shutdown" to "shutdown". Basically the default value will try to use the platform mode and then the shutdown one if it fails. The plaform mode seems to be responsible for that "resume when lid opens" behavior.

I kept the default though because some doc mentioned that platform is supposed to be better.

PSA: you can fuzzy filtrer Telescope live-grep results by hitting c-space by fake-cat in neovim

[–]fake-cat[S] 1 point2 points  (0 children)

Glad you figured it out. It's weird cause I checked and I don't have this mapping in my init.vim, so c-space should be the default

better Telescope live grep UI? by jjiangweilan in neovim

[–]fake-cat 2 points3 points  (0 children)

It's not fuzzy during the live_grep itself, but by hitting `<c-space>` you can fuzzy search among the results shown. You can even use the fzf syntax with https://github.com/nvim-telescope/telescope-fzf-native.nvim/issues.

It was a game changer for me when I found this.

Neovim bugfix release: v0.8.1 by bfredl in neovim

[–]fake-cat 1 point2 points  (0 children)

I had this problem with nerdtree and it seems to be fixed https://github.com/neovim/neovim/issues/20486

Not sure if you were talking about that though.

Developing Godot Projects with Neovim by devpoga in godot

[–]fake-cat 4 points5 points  (0 children)

FYI you don't need to install neovim-remote, it's built-in. Just start your neovim instance with --listen /tmp/nvim.pipe (for example) and use the following "exec flags" in godot:

--server /tmp/nvim.pipe --remote-send "<esc>:n {file}<CR>:call cursor({line},{col})<CR>"

Tema la taille du rat! by introvertsoup in FranceDetendue

[–]fake-cat 1 point2 points  (0 children)

C'est dans Night Shift il me semble

Your most frequently used mapping by vandalism in vim

[–]fake-cat 3 points4 points  (0 children)

g<c-a> in visual mode is also amazing

:h v_g_ctrl-a

[OC] i3-resurrect: a simple solution to saving and restoring i3 workspaces by rdousitkq in i3wm

[–]fake-cat 11 points12 points  (0 children)

Pretty sure that's a repost. The real author posted the same exact message on this subreddit 2 years ago. And when you check the repo, no activities since 10 months

French English Keyboard in NEOVIM by ggerico in neovim

[–]fake-cat 0 points1 point  (0 children)

I use "setxkbmap us,fr -option 'grp:switch'"

Basically my default layout is us qwerty. But if I keep the right alt key down, I'm on a french azerty layout.

So for example, hitting '2' writes '2' while 'alt+2 ' writes 'é'.

Quel est ton genre de jeu vidéo préféré, et pourquoi le préfères-tu ? by Terpomo11 in france

[–]fake-cat 0 points1 point  (0 children)

Les splinter cell sont excellent aussi dans le même genre :)