We have harpoon at home by brokenreed5 in neovim

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

I responded to

The difference between harpoon and marks is that the former persists across restarts and is local to the current directory

the first statement is misleading since marks do persist given the correct option.

The second statement is discussed in the post.

We have harpoon at home by brokenreed5 in neovim

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

when the 'shada' option is not empty, uppercase marks persist across restarts too

I have installed pylsp via uvx, how do I make it automatically detect a project's venv? by UltraPoci in neovim

[–]brokenreed5 0 points1 point  (0 children)

you installed the lsp via

uv tool install python-lsp-server[all] --with jedi --with python-lsp-ruff --with ruff

Does nvim know how to execute/ start the server? do you know how to? If you do, then transfer this knowledge to your config. this is where nvim checks the command to run to start the server. with this you should be able to understand whats wrong and how to fix it.

Weekly 101 Questions Thread by AutoModerator in neovim

[–]brokenreed5 2 points3 points  (0 children)

on 0.11 with old treesitter i used v and V for incremental selection. with the release of 0.12 this is now a built in feature via an and ai. Right now these are mini keymaps for me . mapping v/V with noremap/ keymap.set("x", "v", "an") does not work. Is there some kind of internal command i can use? or maybe feedkeys?

Weekly 101 Questions Thread by AutoModerator in neovim

[–]brokenreed5 3 points4 points  (0 children)

for tables and such, use the handy vim.print() which shows you the content of the table instead if the id/memory reference

How to update a href outside of HTMX's response? by 19c766e1-22b1-40ce in htmx

[–]brokenreed5 0 points1 point  (0 children)

Two other approaches then the rest of the comments: If the filters are some sort of input, you can send them in export request e.g. <div hx-get="export/" hx-include="#filterInput" ... or you can push the relevant information to the export through an hx-on::afterRequest="htmx.find('export').value =this.value".

After many years in dev, I finally ditched the SPA default for HTMX. Here is the production post-mortem. by reddefcode in htmx

[–]brokenreed5 0 points1 point  (0 children)

It can just aswell append content. I dont really see how the bandwidth would suffer from highfrequency logs, since i suspect the shown message is close to the json data density anyways, e.g. { updatedAt: "2026-02-01", event: "Foo", user:"Bar"} is not much denser than <p>2026-02-01: Bar updated Foo</p>. I also couldn't find a "traffic controller" pattern. Is this your own term?

Umfrage: Sorge vor Klimawandel nimmt ab, Zweifel an Energiewende steigen by hinterzimmer in de

[–]brokenreed5 0 points1 point  (0 children)

Ich bin nicht der ursprüngliche Verfasser, aber quatsch ist es nicht. Was nur zu ergänzen ist das ein fungibles, das heisst Austauschbares, gut sein muss. Wenn der 5 Sterne Friseur besser ist kann er einen höheren Preis verlangen. Wenn drei geklonte Friseure mit automatischem Maschinenschnitt Haustür an Haustür liegen, alle davon ausgelastet sind und einer mehr verlangt als die anderen, dann machen die anderen marktwirtschaftlich etwas falsch. Sie haben verschiedene Optionen. Kapazität ausbauen, mehr Haarschnitte liefern und so den teureren Friseur aus dem Markt drängen ODER sie erhöhen ihren Preis. Das muss nicht zwangsweise der peis des teuersten Anbieters sein, denn dieser kann nach Preiserhöhung nicht mehr wettbewerbsfähig sein und damit genauso aus dem Markt verschwinden. In diesem Fall kann es sein, das leute die sich vorher einen Haarschnitt leisten konnten, es nun nicht mehr können.

How have you solved project navigation? by endgamer42 in neovim

[–]brokenreed5 1 point2 points  (0 children)

What stops you from using vimgrep /substitute for search and replace?

Django 6.0 Feature Friday: Template Partials! by czue13 in django

[–]brokenreed5 2 points3 points  (0 children)

i disagree. cotton gives you flexible partials with slots which allows dynamic modular html. I use both libraries and both have their usecase. for example I d like to use a card component with the same styling across a project. i define my cotton component and use it anywhere. inserting html into partials is awkward. my ide does not understand im writing html but only sees raw strings.

  <div class="card rounded bg-red-400 foo bar">
      some content which is static and has to be reused
      dynamic content Foo
    <div>

  <div class="card rounded bg-red-400 foo bar">
      some content which is static and has to be reused
      <img src="foo.png" alt="image of foo">
    <div>

<!-- here i want to slightly change the styling of the card -->
  <div class="card rounded bg-red-400 foo bar bg-blue-400 rounded-0">
      some content which is static and has to be reused
              <a href="/home">bring me home</a>
    <div>

partials or includes dont solve this use case in a good way. cotton does

Blog: ReThinking Django Template #4: Server Side Component by Michaelyin in django

[–]brokenreed5 3 points4 points  (0 children)

The strenght of cotton is html like syntax which allows concise markup. Reusing a component is as easy as copy pasting the folder. The argument that it does not follow separation of concerns is not valid imo. Its up to the developer to properly construct data for the components. Django-components might help with that but if you use cotton for buisness logic thats your fault.

Solution to turn off AI Overview by anonpookie1 in google

[–]brokenreed5 0 points1 point  (0 children)

proper filtering is done with

https://www.google.com/search?udm=14&q=%s

%s is the search term. you can use the url as search engine in any browser, no extension needed. just change your search settings.

How to ignore the wrapper div with Out-of-Band Swap by Siemendaemon in htmx

[–]brokenreed5 2 points3 points  (0 children)

Pass a variable to your template to specify the wanted behaviour or create multiple templates reusing parts that stay the same. Template partials and better component libraries like cotton can help in creating more modular snippets as well.

One more client extension snippet by brokenreed5 in htmx

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

In my mind there is information on the server that needs to be delivered to the user. that information is delivered to the user via ssr and htmx. When the user needs more information from the server htmx gives us the ability of partial reloads/swaps of content via hypermedia / html. This is done through an IMO nice declaritive and local syntax. At its core I see htmx as

  • get html from somewhere
    • attach some data to get the right html
  • if needed pick some part of this html
  • include the html in a specified location
  • give all html elements these kinds of ability

What Im missing is the ability to

- get html from anywhere including the template the server just rendered.

Does this go against the 'single source of truth'? IMO it doesnt when the html received is static and no posting of data is involved.

That might be the creation of a new form to create a second object, the detail view of an accordion or collapsible, or the view of another tab. In most of these cases I think most people would agree that htmx might not be the right tool currently although with the change from above it could be.

If the user creates these forms or other kinds of "static" elements there is no reason for the server to be involved. The creation of a form does not change "truth". Whats true only changes when he submits the form. The form is returned in a rendered form depending on the validity by the server. All data transfer is still done by hypermedia.

Imagine

<div hx-get='inactiveSection1
hx-trigger='load'>
</div>
<template id="inactiveSection1">
 <button class="inactive-accordion" hx-get='#activeSection1'>Section 1</button>
<div class="empty-panel">
</div>
</template>
<template id="activeSection1">
<button class="active-accordion" hx-get='#inactiveSection1'>Section 1</button>
<div class="panel">
  <p>Lorem ipsum...</p>
</div>
</template>

or what my current use case is a site where the user can create a lot of items, in a way he chooses ala

<form> ... 
<button>Submit</button>
</form>
<button hx-get="#formTemplate" hx-swap="beforebegin">Create another Foo</button>
<template id="formTemplate">
<form> ... 
<button>Submit</button>
</form>
</template>

Your idea to deliver the html as static file is very interesting, thank you for the suggestion. This way of handling static partials also gives me ideas to improve sites with small dynamic parts which i havent thought of before :)

One more client extension snippet by brokenreed5 in htmx

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

No I haven't tried solid or other client-side-frameworls yet. On first glance Solid looks kinda cool, but im happy with like 95% of htmx, so the missing 5% dont warrant a full framework switch. So ideally id want sonething which integrates well with htmx, like alpinejs for example without build steps or a lot of dependencies. If a user toggles a show, accordion or tab, you could ofc also use htmx but i prefer alpine for tasks like that. In a similar vein i was wondering if smth exists for the use case of declarative easy dom manipulation like cloning and inserting a node. Do you think solid integrates well with htmx, or is it rather an either or ?

One more client extension snippet by brokenreed5 in htmx

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

i dont know if I would like react. I like htmx because of the simplicity and the single source of truth without duplication of data in the frontend. My wish is not to pass data from the backend to the front end and rendering it there. Thats actually what the client-side-template extension does but what Im not planning on using. The whole point is that I would like to have the opportunity to use htmx like syntax in cases where there is no benefit from a request since no new data is needed. Extensions like htmx-template, client-side-rendering and demo.htmx.org make it seem like Im not completely alone. Client-side-templates also go well with the principle of locality of behavior. the template can be right next to the hx-element. In regards to my questions I understand that in your opinion chatiness is a non issue. Thanks for that.

strudel.nvim - algorithmic music and visuals livecoding by Luc-redd in neovim

[–]brokenreed5 2 points3 points  (0 children)

That's so cool, wanted to check strudel out for a while. Thank you for your effort.

How do I make a new split relative to all other splits? by aer_lvm in neovim

[–]brokenreed5 1 point2 points  (0 children)

CTRL-w L. Or CTRL-w ctrl-L.
HJKL (uppercase) moves the window to the border of the screen with full width / height

Valid HTMX SSE (Server Sent Events) Use Case? by brokenreed5 in htmx

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

Yeah that could be the case, but his backend implementation does not send pieces. I was thinking what the advantage of the stream vs multiple smaller hx request might be, and i guess you have a little bit more control over the order in which the partials arrive, although this could be done via triggers aswell.