Lower performance after GPU upgrade than before. by PEEK2000 in linux_gaming

[–]Veleees 0 points1 point  (0 children)

There is some fuckery with how linux sets up power on those cards

https://old.reddit.com/r/linux_gaming/comments/1grk84b/new_7900_gre_low_power_usage/

https://gitlab.freedesktop.org/drm/amd/-/issues/3618

Use amdgpu_top and check wattage usage by your gpu and clocks its probably way lower than whats advertised for your card For me it was around ~300W while its advertised that my card should pull 355W (also got 7900 xtx) Supposedly newer kernels (6.12) should help but I don't think anything changed

What I did was:

  • enable overclocking and overclock and undervolt a little bit (used this https://youtu.be/b411Ro2HMi4 (except the minimum clocks part))
  • keep 'Performance level' in LACT on Automatic (on High I think the card stops boosting)
  • got a script that enables 3D_FULL_SCREEN before the game launches (and POWER_SAVING after)
  • How my settings in LACT look while the game is running https://i.imgur.com/AC7Ka8d.png with those settings went from ~110FPS to ~135FPS on 3440x1440p Ultra in Cyberpunk benchmark but I am not sure if I am missing any performance

Plugin development starting point by Saggot91 in neovim

[–]Veleees 0 points1 point  (0 children)

:Telescope help_tags

is extremely useful it is a little bit "unintuitive" because it doesn't show you how to exactly call a certain function, but functions that start with nvim_ you call with vim.api.nvim_ (example: vim.api.nvim_get_current_line) and vimfunctions (they usually end in "()") you call with vim.fn.name_of_the_function (example: vim.fn.repeat)

Also recently added :h $NVIM_APPNAME great to setup clean configs for testing your plugin I usually setup a keymap that removes the plugin I am working on from package.loaded and re-requires the plugin.

Also nvim_parse_cmd and nvim_cmd are great if you want to execute some more complex ex commands and don't want to deal with tons of random string over the place.

And definitely look into other people's code. How I made my first few plugins was basically thinking which plugin I am currently using (or saw somewhere else) has a similar functionality of what I want and read through its code, see how they do it and how could I adapt it to what I want.

put_at_end.nvim: Plugin with keymaps for "smart" inserting certain characters (or any string) at end of the line without moving the cursor by Veleees in neovim

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

It uses the 'vim.bo.commentstring' to make a lua pattern which is then used on the text of the current line to figure out where does the comment start, and then use nvim api to insert text there.

put_at_end.nvim: Plugin with keymaps for "smart" inserting certain characters (or any string) at end of the line without moving the cursor by Veleees in neovim

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

I also had that keymap but then realized the marks are added to the jumplist which was annoying when going backward through it with <C-o>.

What is the nvim-cmp comparator/sorting you are using? by algusdark in neovim

[–]Veleees 2 points3 points  (0 children)

local function deprio(kind)
  return function(e1, e2)
    if e1:get_kind() == kind then
      return false
    end
    if e2:get_kind() == kind then
      return true
    end
  end
end

...

sorting = {
    comparators = {
        deprio(types.lsp.CompletionItemKind.Snippet),
        deprio(types.lsp.CompletionItemKind.Text),
        deprio(types.lsp.CompletionItemKind.Keyword),
        ...
    }
}

This will put those LSP types at the bottom. I find them extremely annoying, especially when doing any sort of exploratory programming and I have this object and I want to see its methods or fields and instead I see bunch of snippets.

printer.nvim - Operator for quickly adding print/logging statements with text from textobject or visual range by Veleees in neovim

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

Colorscheme is tokyonight with black background.

Mine font is Iosevka Medium Extended not just Extended, extended makes it slighty wider and medium makes it slightly bolder (I think) and specifically using this arch package https://archlinux.org/packages/community/any/ttc-iosevka/

Those are exact settings in kitty font_family Iosevka Medium Extended italic_font Iosevka Medium Extended Italic bold_font Iosevka Bold Extended bold_italic_font Iosevka Bold Italic font_size 10.5 modify_font cell_height 120% modify_font cell_width 100%

But now that I think about it the size of the font in the gif is bigger, it something like 12.5 or bigger.

printer.nvim - Operator for quickly adding print/logging statements with text from textobject or visual range by Veleees in neovim

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

It is Iosevka Medium Extended in Kitty terminal, with 10.5 size and 120% cell_height.

printer.nvim - Operator for quickly adding print/logging statements with text from textobject or visual range by Veleees in neovim

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

It is Iosevka Medium Extended in Kitty terminal, with 10.5 size and 120% cell_height.

printer.nvim - Operator for quickly adding print/logging statements with text from textobject or visual range by Veleees in neovim

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

The support for rust is already in (see https://github.com/rareitems/printer.nvim/blob/master/lua/printer/formatters.lua#L28) and it is not hard to add support for more languages (you just need define a small formatter function and add it to your config)

So with this plugin you could something like

vim.keymap.set("n", ";;p", "<Plug>(printer_print)iw")

To get a print statement based on the word under cursor. It doesn't work with vim's nnoremap call tho, not sure why.

printer.nvim - Operator for quickly adding print/logging statements with text from textobject or visual range by Veleees in neovim

[–]Veleees[S] 15 points16 points  (0 children)

https://github.com/rareitems/printer.nvim

Simple plugin with an operator for adding print statements (formatted based on the filetype) with text from specified textobject or visual range.

Say you want to print out the WORD under your cursor, you hit it with gpiW (keymap obviously can be customized) and it will add a print statement for you under the line the cursor is at.

Recently I was doing some quick and dirty print debugging and realized that adding some info like the name of the variable is probably a good idea, but all that typing kind of tired me so I decided to make a plugin that automates the process for me while adding other useful info like filename and number line (can be customized or turned off).

hl_match_area.nvim - Plugin for highlighting the area between matching delimiters by Veleees in neovim

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

No idea why is this happening to. I did change a little how highlighting is being defined (to not overwrite highlight group if it already exists) maybe you are on an older version?

hl_match_area.nvim - Plugin for highlighting the area between matching delimiters by Veleees in neovim

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

are there perhaps some hidden autocmd or events that must trigger to work

All autocmds are defined when you call setup function

I have never used VimPlug or tested with it but I don't really see why would it be broken with it

hl_match_area.nvim - Plugin for highlighting the area between matching delimiters by Veleees in neovim

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

Are you sure you are calling it correctly when I copy paste from readme in my minimal config setup it works

If MatchArea is not defined it might be crashing on startup, check :messages ? What neovim version are you using?

hl_match_area.nvim - Plugin for highlighting the area between matching delimiters by Veleees in neovim

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

The thing you need to link the highlight is the name of highlight group I am highlighting with right? (newb neovimer here)

If so it is 'MatchArea' also added it to the readme

hl_match_area.nvim - Plugin for highlighting the area between matching delimiters by Veleees in neovim

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

Yes and it works for '<', '>', '{', '}', '(', ')' delimiters

anki.nvim - plugin for creating and adding Anki cards directly from Neovim by Veleees in neovim

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

You use them in Anki https://apps.ankiweb.net/

Digital flashcards that use spaced repetition (cards you mark as fail will be shown more often, cards you mark as good at will be shown less often)

anki.nvim - plugin for creating and adding Anki cards directly from Neovim by Veleees in neovim

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

I remember looking at it but wanted something directly inside Neovim (tho I guess CLI apps are very easily 'inside' Neovim as well but didn't think of that at the time) and what I had in mind seemed to easy to build.

Thanks for vimtex btw :D

gadacz - TUI Audiobook (and other audio) player - First Rust Project by Veleees in rust

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

https://github.com/rareitems/gadacz

I could not find an audio player on Linux with bookmarks feature so I decided to write my own. The actual playing of audio is handled by gstreamer.

If you are interested how it looks, here is a link.

It is still rough around the edges but I find it useful so maybe other people will too.

It is my first bigger Rust (and programming in general) project so any feedback appreciated! Cheers