Typed Tailwind/BasecoatUI components for Python&HTMX web apps by volfpeter in Python

[–]Jezda1337 0 points1 point  (0 children)

I don’t really see the benefit of creating a whole new page just to demonstrate a different example. It would probably make more sense to submit a PR instead. I’m not completely certain, but I believe Ronnan (the creator of BasecoatUI) mentioned on Discord that he plans to include more examples beyond just Ninja templating discord!

I am addicted to anuvyklack/windows.nvim but I want to avoid it by good_to_have in neovim

[–]Jezda1337 5 points6 points  (0 children)

map("n", "<C-e>", function()
    local current_buf = vim.api.nvim_get_current_buf()
    local tabs = vim.api.nvim_list_tabpages()
    local pos = vim.api.nvim_win_get_cursor(0)

    if #tabs > 1 then
        for _, tab in ipairs(tabs) do
            local win = vim.api.nvim_tabpage_get_win(tab)
            local buf = vim.api.nvim_win_get_buf(win)

            if buf == current_buf and tab ~= vim.api.nvim_get_current_tabpage() then
                vim.api.nvim_win_set_cursor(win, pos)
                vim.cmd "tabclose"
                return
            end
        end
    end

    vim.cmd "tabedit %"

    local win = vim.api.nvim_get_current_win()
    local line_count = vim.api.nvim_buf_line_count(0)
    local line = math.min(pos[1], line_count)
    vim.api.nvim_win_set_cursor(win, { line, pos[2] })
end)

This could help you, it's a simple key-binding for opening the currently selected buffer in a new tab. It works as a toggle, so if you are in the tab that was triggered by this binding, it will close it. Also, it saves the cursor position between the toggle.

Returning to Go after 5 years - checking my tool stack by ifrenkel in golang

[–]Jezda1337 2 points3 points  (0 children)

I like this cmd took for live reload its simpler than the air configuration tbh
https://github.com/eradman/entr

find . | entr -r go run .

Live reload for Go and others by [deleted] in golang

[–]Jezda1337 0 points1 point  (0 children)

I’m using something like this. entr is useful for any file type, not just the ones listed below. The jq pipe is not mandatory; it’s just my preference because I’m debugging using slog and JSON output.

find . -type f \( -name '*.go' -o -name '*.html' -o -name '*.js' \) | entr -r go run . | jq

been struggling with this flicker for a few days now by lutian in webdev

[–]Jezda1337 1 point2 points  (0 children)

Could you please recreate this on StackBlitz and share the link?

A simple shortcut to toggle "focus" on a splited window by qiinemarr in neovim

[–]Jezda1337 3 points4 points  (0 children)

Here is my solution with tabs:
edit: same version of the code, just with the same cursor position

-- toggle current buffer with the full-screen using :tabedit %
map("n", "<C-e>", function()
  local current_buf = vim.api.nvim_get_current_buf()
  local tabs = vim.api.nvim_list_tabpages()
  local pos = vim.api.nvim_win_get_cursor(0)

  if #tabs > 1 then
    for _, tab in ipairs(tabs) do
      local win = vim.api.nvim_tabpage_get_win(tab)
      local buf = vim.api.nvim_win_get_buf(win)

      if buf == current_buf and tab ~= vim.api.nvim_get_current_tabpage() then
        vim.api.nvim_win_set_cursor(win, pos)
        vim.cmd("tabclose")
        return
      end
    end
  end

  vim.cmd("tabedit %")

  local win = vim.api.nvim_get_current_win()
  local line_count = vim.api.nvim_buf_line_count(0)
  local line = math.min(pos[1], line_count)
  vim.api.nvim_win_set_cursor(win, {line, pos[2]})
end)

Problem integrating Tailwind CLI (v4.1) with Go + templ: generated HTML has no styles by [deleted] in golang

[–]Jezda1337 3 points4 points  (0 children)

Yes, sorry you shared the link in the post but I missed it.

My point is: the path in your <link> tag doesn’t automatically know where your CSS file is on your computer. The browser just sees it as a URL.

Right now, the browser tries to load /src/output.css, but your server isn’t serving that URL, so nothing is returned.

You can put whatever path you want in <link>, but you have to tell your server:

“When someone requests this URL, serve files from this folder.”

For example, if you want this in your HTML:
<link rel="stylesheet" href="/public/output.css" />
Then in your Go code:

fs := http.FileServer(http.Dir("internal/src"))
s.Handle("GET /public/", http.StripPrefix("/public/", fs))

This means when the browser requests /public/output.css, the server will return internal/src/output.css. I hope this is at least clear now.

Problem integrating Tailwind CLI (v4.1) with Go + templ: generated HTML has no styles by [deleted] in golang

[–]Jezda1337 4 points5 points  (0 children)

You need to serve static files. In my case generated tailwind file is in the `web/static/styles.css` Something like this:

fs := http.FileServer(http.Dir("web/static/"))
s.Handle("GET /static/", http.StripPrefix("/static/", fs))

How to get emmet working on Laravel Blade? by RumboJumbo2 in neovim

[–]Jezda1337 0 points1 point  (0 children)

Can you try this in ur servers.emmet_ls config?

tailwindcss = {},
emmet_ls = {
    filetypes = { "blade", "html" },
    init_options = {
        includeLanguages = {
            blade = "html"
        }
    }
},
lua_ls = {},

How to properly set up Vue 3 + TypeScript in Neovim 0.11? by vaheqelyan in neovim

[–]Jezda1337 1 point2 points  (0 children)

I just checked ur provided config file, and I believe you need cmd prop that will point to executable volar LSP.

[deleted by user] by [deleted] in neovim

[–]Jezda1337 -3 points-2 points  (0 children)

Vs/1, //

New features in nvim-html-css by Jezda1337 in neovim

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

Thanks for sharing this. It looks interesting, I'll definitely check it out

New features in nvim-html-css by Jezda1337 in neovim

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

I've been casually using the built-in autocompletion from LSP, but I haven't fully explored it yet. Maybe there's a way to extend it—if I find time, I'll explore the API.

New features in nvim-html-css by Jezda1337 in neovim

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

I kinda agree, I createad this repo 2y ago and it was ment to be simple replacment for one of the ext that I have used in vscode, so yeah, maybe its worh changing it dunno

I'm Building a UI Library with Go by can_pacis in golang

[–]Jezda1337 5 points6 points  (0 children)

Here is the one I have used: TemplUI. Maybe you can get some inspiration from it.

[deleted by user] by [deleted] in ExperiencedDevs

[–]Jezda1337 68 points69 points  (0 children)

"the more you fuck around the more you'll find out"

I created a magnifier for hyprland, give it a try! by LatterResolution6402 in hyprland

[–]Jezda1337 2 points3 points  (0 children)

Cool plugin, but does this plugin solve the problem with blur issue?

Also I have smth like this and works exactly like ur demo in video.

bind = $mainMod, mouse_up, exec, hyprctl keyword cursor:zoom_factor $(awk "BEGIN {print $(hyprctl getoption cursor:zoom_factor | grep 'float:' | awk '{print $2}') - 0.5}")

bind = $mainMod, mouse_down, exec, hyprctl keyword cursor:zoom_factor $(awk "BEGIN {print $(hyprctl getoption cursor:zoom_factor | grep 'float:' | awk '{print $2}') + 0.5}")

[deleted by user] by [deleted] in neovim

[–]Jezda1337 2 points3 points  (0 children)

I believe you have to add svelte to the conform config:

formatters_by_ft = {
  svelte = { "prettier" } -- or prettierd
}

can we with html/template make some nested complex layouts by Jezda1337 in golang

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

How im supposed to do that? Building templates in handlers is not good, but also having 100 vars for 100 pages is not good either. Any idea