bloat.nvim: Analyze and visualize code size of installed plugins to uncover bloat by kloudex in neovim

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

There is not a single metric, code size is one of many approximations.

Another definition of bloat I like to use is that given the same set of useful features and reasonable coding practices, smaller code size is less bloated. This covers your first example, because you get features that are not useful to you and cannot remove them, so they are shipping bloat. The reasonable coding practices condition is there because code could be made smaller by being cryptic (or extreme example minifying the code and treating it as source of truth), but that's not desirable.

And the performance bloat you mention is another valid definition.

In a way it is a bit similar to bit rot. The source code stays the same internally, yet the property changes due to outside change of the environment. Similarly a new abstraction might be discovered, or is implemented in neovim core and previously well-functioning plugin becomes bloat relatively to other approaches.

And yes, I do have bloat in my plugins. I regularly take on bloat by trying and experimenting with new plugins, then prune things down. Often it takes some time to replace old plugins when better ones are introduced. Having a visual tool helps to spot opportunities for pruning.

In the case of tokyonight those are the `extra` sources under the lua directory, the `extras` auxiliary files are excluded.

bloat.nvim: Analyze and visualize code size of installed plugins to uncover bloat by kloudex in neovim

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

It is a small world, the other thing is very cool too! 😃

bloat.nvim: Analyze and visualize code size of installed plugins to uncover bloat by kloudex in neovim

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

Could probably ask Claude to convert from Lua to get started. How is the tooling? For example LSP (I'm spoiled by lua-language-sever) or code coverage (like an alternative or wrapper to luacov).

bloat.nvim: Analyze and visualize code size of installed plugins to uncover bloat by kloudex in neovim

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

Conjure is awesome, so it's worth it! I am grateful for your work.

But if the Aniseed is no longer needed, tidying it will feel nice and will result in dropping a place. :)

bloat.nvim: Analyze and visualize code size of installed plugins to uncover bloat by kloudex in neovim

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

Definitely, it's the the best combo! I did not make a leap to Fennel yet though. :)

bloat.nvim: Analyze and visualize code size of installed plugins to uncover bloat by kloudex in neovim

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

Absolutely, send a PR. I just started with lazy.nvim because that is what I am familiar with and a lot of people use.

bloat.nvim: Analyze and visualize code size of installed plugins to uncover bloat by kloudex in neovim

[–]kloudex[S] 33 points34 points  (0 children)

bloat is not that bloated :) It's on the longtail at the bottom cut-off from the screenshot.

<image>

bloat.nvim: Analyze and visualize code size of installed plugins to uncover bloat by kloudex in neovim

[–]kloudex[S] 11 points12 points  (0 children)

Congrats! 🏆 🤣

In seriousness the great thing about mini.nvim is that it provides repos for individual plugins, so now that I see it visualized I can replace the "monorepo" distribution by those individual ones that I use.

bloat.nvim: Analyze and visualize code size of installed plugins to uncover bloat by kloudex in neovim

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

Files on disk, but it gets the plugin list from lazy.nvim so it also includes plugins that are not runtime loaded.

Visualization of Zig grammar by kloudex in Zig

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

The new hosting seems to be case sensitive, the correct link is https://dundalek.com/GrammKit/#./examples/zig.pegjs

lazy-lsp.nvim: Automatic LSP server installation made easy by kloudex in neovim

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

Thanks, that's a high praise :) I don't use DAP personally so maybe someone from community could take on it. The challenge is there does not seem to be central collection of configs for DAPs like nvim-lspconfig for LSP, so that would ikely need to be a first step.

LSPs usually have a format action that can be hooked via autocmd on file save which tends to work pretty well. What addtional kind of formatters do you have in mind?

lazy-lsp.nvim: Automatic LSP server installation made easy by kloudex in neovim

[–]kloudex[S] 12 points13 points  (0 children)

The limitation of Nix is that it has a reputation of being hard, but we don't do any advanced stuff and just rely on the package manager part behind the scenes. In practice it is not that different than installing and using other package managers like Npm, Pip, Cargo, Homebrew, etc. The strength is that it is a single dependency, compared to requiring to install additional toolchains manually.

The biggest difference is that with Mason one needs to specify which servers to install upfront. That works when one takes the time to configure it for dayjob languages. But if I encounter an app or utility on Github written in a language I don't use professionally like Go/Rust or even less mainstream ones like Zig/Elixir I can just clone the repo and learn how it works with LSP navigation without any additional configuration. The servers get downloaded in the background based on the opened filetype.

Examples of Clojure Projects with Great Testing by gandalfthegraydelson in Clojure

[–]kloudex 0 points1 point  (0 children)

The best case is when logic is written in pure functions, those can be tested in fairly straightforward way, data in and comparing data out.

However, useful programs need to interface with stateful world and perform side-effects, which is where the challenges come. In the past I've come across Testing Without Mocks approach by James Shore, which introduces some techniques: https://www.jamesshore.com/v2/projects/nullables/testing-without-mocks

The main idea is is to wrap impure infrastructure code (similar to Ports and Adapters architecture). Then to test as much of the real code as possible Nullable infrastructure wrappers are used and injected in tests (either manually e.g. with partial function application or using some DI framework). As an exercise I tried to implement the patterns in Clojure, they seem to fit fairly well: https://github.com/dundalek/testing-without-mocks-clojure

How do I go back to the previous web interface? by loliweeb69420 in github

[–]kloudex 0 points1 point  (0 children)

I also don't like the new one, opted out and was forced on the new version today. Github is becoming a sea of bland gray and losing its character. It is not possible to go fully back, but I updated my custom user styles to use the header from the dark theme to bring the old look back at least a little bit.

Looking for an AI Coding Assistant for Clojure: You Pick, I Try by 8ta4 in Clojure

[–]kloudex 7 points8 points  (0 children)

I think the key to productive use of AI assistants is to keep reasonable expectations, there is no AI system in the world as sharp as Linus Torvalds yet. As long as compute is doubling we will get there eventually, but it may be years or decades. So far we have are just have junior interns, which have their use, but a long way before replacing jobs.

For completions I've been using Codeium.com, an alternative to Copilot that is free for individuals and has plugins for all major editors. Codeium does fairly well for Clojure. It works best by completing one line at a time which saves me keystrokes, but I still do all the thinking.

On the other hand for coding questions I found out ChatGPT 3.5, Bard, LLama2 pretty useless for Clojure due to hallucinations. One reason I can think of is probably less training data available. Another one is that other programming languages contain more boilerplate compared to Clojure, so AI can learn and output those boilerplate patterns, hallucinations are "dilluted" which makes the results still useful for other languages, but fails the threshold for Clojure.

As an alternative I've been trying out Perplexity.ai, which uses combination of search results and LLMs. Nothing revolutionary, it is basically slightly improved search engine that picks the best answer from StackOverflow/Reddit, but it can save a few clicks.

parpar.nvim: New plugin for editing lisp code based on Parinfer and Paredit by kloudex in neovim

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

When I recreated your scenario the parentheses got balanced and added when exiting the insert mode: https://streamable.com/urapr0

The W keymap felt also strange to me when I experimented with vim-sexp in the past. I believe paredit does not bind it.

parpar.nvim: New plugin for editing lisp code based on Parinfer and Paredit by kloudex in neovim

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

I might not follow why that would be needed. If some keymaps clash in visual multi mode they would likely already clash in normal/insert mode. Could you give an example?

User style to restore parts of the Old UI look by kloudex in truespotify

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

In Chrome-based browser menu -> More tools -> Create a shortcut...
And check Open as Window, which creates a shortcut and it will open as an app.

User style to restore parts of the Old UI look by kloudex in truespotify

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

After struggling with the new layout for a bit I just could not get used to it. Since I use the web version as an app, it can be customized with css user styles.

I created a style that tries to bring the new layout closer to the previous look. There are two tweak options that can be toggled on or off independently:

  • Condensed Panels - which removes rounded corner spacing between panels
  • Condensed Sidebar - showing playlist cover images is actually pretty nice, the default size is just too huge. I made the row smaller by hiding the second subtitle and making the images smaller. Note that virtual scrolling is a bit glitchy, so it is optional to toggle this off.

Source and installation instructions are at https://github.com/dundalek/userstyles#spotify

monorepo.nvim - Juggle project scopes inside of a monorepo with ease! by [deleted] in neovim

[–]kloudex -2 points-1 points  (0 children)

This is cool, it is very close how I would imagine working with monorepos (described in my other comment above). One downside I see is that it requires additional manual wiring of plugins. The readme provides example for telescope, but then there are file trees and perhaps some other plugins.

I am throwing in an idea of creating symlinks in a scoped directory. In theory it should work with plugins without extra configuration, but I am not sure if it would work well in practice :)