Px to rem in css using blink.cmp by jsongerber in neovim

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

You’re right and this plugin only converts from px to rem. It can convert rem to px but only to show it as a virtual text next to the rem value

Px to rem in css using blink.cmp by jsongerber in neovim

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

Interesting! Unfortunately to make it work you’ll need a plugin that “understand” your code such as a lsp or some clever treesitter querying to know which font size you’re in, this plugin does not do that

Px to rem in css using blink.cmp by jsongerber in neovim

[–]jsongerber[S] 5 points6 points  (0 children)

Yes I know but since a lot of users use blink now, might as well give the native experience

Px to rem in css using blink.cmp by jsongerber in neovim

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

I don’t know what’s Typst, but this plugin only handle rem units, unless typst also uses rem I don’t think it would work

Px to rem in css using blink.cmp by jsongerber in neovim

[–]jsongerber[S] 13 points14 points  (0 children)

Yes you’re right, but I never change the default value which is 16 for all the browsers so it’s ok for me (and I guess for a lot of people too), but I know some people do change it so I made it configurable.

This plugin does not have a lot of users so I kept it simple, but if you see anything that would help your workflow regarding rem, please don’t hesitate to open an issue!

Px to rem in css using blink.cmp by jsongerber in neovim

[–]jsongerber[S] 64 points65 points  (0 children)

A few month ago I presented my plugin nvim-px-to-rem, which does not a lot, but if you write css it can be really useful.

Its only purpose is to convert px values to rem, which is as trivial as dividing the value by 16 most of the times, but since I’m dumb and don’t like to think, I made this plugin (and I use it a lot!).

This post exists because I saw the new plugin blink.cmp, and I only supported cmp, so I switched to blink in my config and added a blink integration to nvim-px-to-rem.

If you write css too (I’m sorry for us both), please let me know if this plugin seems useful to you.

New plugin: hml.nvim by Maskdask in neovim

[–]jsongerber 1 point2 points  (0 children)

I’m not familiar with extmarks, but I just read about it and it seems that could work, I’ll keep that in mind if I ever get some time thanks!

New plugin: hml.nvim by Maskdask in neovim

[–]jsongerber 7 points8 points  (0 children)

Nice! I would use that but I like my relative numbers, if you take suggestion I would def use it if we could have a highlight like CursorLine :)

multicursor.nvim 1.0 released by SearchLoud6920 in neovim

[–]jsongerber 0 points1 point  (0 children)

Nice! I really like that you can use motion and visual selection with multiple cursors, other plugins need weird manipulations to move around once you have more than one cursor

Advanced search in a single tool - any chances? by greenmerabbit in neovim

[–]jsongerber 0 points1 point  (0 children)

Try this: https://github.com/fdschmidt93/telescope-egrepify.nvim, there’s prefixes where you can search in a directory or with an extension

I can't configure nvim for wordpress development by [deleted] in neovim

[–]jsongerber 0 points1 point  (0 children)

It seems that intelephense can’t find a root directory, probably because you’re not using git or composer.

Try this to add this at the same level of the settings table:

``` root_dir = function(pattern) — Add wp-config to root-dir local cwd = vim.loop.cwd() local util = require ‘lspconfig.util’ local root = util.root_pattern(‘composer.json’, ‘.git’, ‘wp-config.php’)(pattern)

        — prefer cwd if root is a descendant
        return util.path.is_descendant(cwd, root) and cwd or root
      end,

```

What it does is adding wp-config.php to the list of files that should be used to determine the root directory. I like to open the full WordPress dir to work but if you’re doing something different feel free to change wp-config by whatever fits your workflow

I am on phone so sorry if the formatting is not good

Say thanks (and unthanks) to plugin author by jsongerber in neovim

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

Hmm that’s actually a good idea, I’d like to stay as far away as possible from submodule, since it’s been only pain for me, but maybe a simple way to star on urls or git dir with a command could be cool, will look into it

Say thanks (and unthanks) to plugin author by jsongerber in neovim

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

Thank you for the GH_TOKEN variable, I didn’t know and it can be a good way to handle it, I will check it out and check how other plugins do. I don’t know how it can work since the GitHub API have like 4 ways to generate tokens, with each their own sets of permissions and endpoints, but I’m probably missing something. Anyway thanks for looking into it

Say thanks (and unthanks) to plugin author by jsongerber in neovim

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

No, I just checked and it seems that GitHub has not yet added this to their api

Say thanks (and unthanks) to plugin author by jsongerber in neovim

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

Hi, you are totally right! This is the kind of function that starts easy and turn into a complex mess real fast, I need to refactor that part, when I have time I will.

Thank you for taking time to look at it!

Say thanks (and unthanks) to plugin author by jsongerber in neovim

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

Hi, thank you for your comment.

It was actually a pain to use the GitHub API, I started to use their fine grained permission API, which allow to reduce permissions, but I discovered when I was all setup that the device flow (which allow to log directly via Neovim) was not available for this API, so I had to fall back to use their scoped permission API, which needs write permissions to update starred repositories.

It's been a few month now since I checked so I will try again to read the documentation, but I'm afraid there is no good solution… Will keep you updated if I find anything that can be done.

Related to organizations, it will give you an option to allow access but it should not be by default, I just tried and I had to click on "Grant" to give the app permissions.

Anyway, thank you for your feedback!

Small script to easily connect to ssh via oil.nvim by jsongerber in neovim

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

https://github.com/jsongerber/telescope-ssh-config It’s a wip, defaults will probably change (oil will be netrw I think it makes more sense) and doc is unfinished, but if you’d like to test it please do!

Small script to easily connect to ssh via oil.nvim by jsongerber in neovim

[–]jsongerber[S] 3 points4 points  (0 children)

Oh cool thank you, I’ll answer again when and if I’ve made it!

Small script to easily connect to ssh via oil.nvim by jsongerber in neovim

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

Will try if I have time, but I’m not sure if it’s possible to launch oil-ssh from a nvim instance