This commit is contained in:
Yakov Shatilov 2024-11-23 22:35:43 +03:00
parent d2ecdf5ca6
commit 854470e7b2
6 changed files with 96 additions and 36 deletions

1
.gitignore vendored
View File

@ -1,2 +1 @@
*

View File

@ -6,7 +6,8 @@
autogenerated = 0 # remove this line to remove the warning
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=eDP-1,1920x1080@60,auto,1.5
monitor=eDP-1,1920x1080@60,auto,1.333333
# monitor=eDP-1,1920x1080@60,auto,1
# monitor=eDP-1,disable
monitor=HDMI-A-1,2560x1440@144,auto,1
# monitor=HDMI-A-1,1920x1080@60,auto,1
@ -30,6 +31,20 @@ env = XCURSOR_SIZE,24
env = QT_QPA_PLATFORMTHEME,qt6ct # change to qt6ct if you have that
env = GTK_THEME, adw-gtk3-dark
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
env = QT_QPA_PLATFORM,wayland;xcb
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
env = QT_QPA_PLATFORMTHEME,qt5ct
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
env = GDK_BACKEND,wayland,x11,*
env = QT_QPA_PLATFORM,wayland;xcb
env = SDL_VIDEODRIVER,wayland
env = CLUTTER_BACKEND,wayland
# env = bitdepth, 10
# env = SDL_VIDEODRIVER, wayland
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
kb_layout = us,ru
@ -147,7 +162,7 @@ $mainMod = SUPER
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, Q, exec, $terminal
bind = $mainMod, C, killactive,
# bind = $mainMod, M, exit,
bind = $mainMod SHIFT CTRL, M, exit,
bind = $mainMod, E, exec, $fileManager
bind = $mainMod, V, togglefloating,
bind = $mainMod, W, exec, $menu

View File

@ -1,7 +1,8 @@
preload = /usr/share/backgrounds/manjaro/beehive4k-d.png
# preload = /usr/share/backgrounds/manjaro/beehive4k-d.png
preload = /home/yash/Pictures/wallpapers/sichen.jpg
wallpaper = eDP-1,/usr/share/backgrounds/manjaro/beehive4k-d.png
wallpaper = HDMI-A-1,/usr/share/backgrounds/manjaro/beehive4k-d.png
wallpaper = eDP-1,/home/yash/Pictures/wallpapers/sichen.jpg
wallpaper = HDMI-A-1,/home/yash/Pictures/wallpapers/sichen.jpg
splash = false

View File

@ -1,30 +1,30 @@
{
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"LuaSnip": { "branch": "master", "commit": "878ace11983444d865a72e1759dbcc331d1ace4c" },
"NvChad": { "branch": "v2.5", "commit": "d2f98ccd265bbd11e3b33c232435ceba16e67df2" },
"base46": { "branch": "v2.5", "commit": "b48abead2b70aa1671ce604dc781f8fb2036a133" },
"LuaSnip": { "branch": "master", "commit": "45db5addf8d0a201e1cf247cae4cdce605ad3768" },
"NvChad": { "branch": "v2.5", "commit": "0e61fb765632508edf28a166ea8c6f1573d3069d" },
"base46": { "branch": "v2.5", "commit": "9b81403ef6e29a70bffb7990a0f3dbe5f6095047" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"conform.nvim": { "branch": "master", "commit": "f3b930db4964d60e255c8f9e37b7f2218dfc08cb" },
"friendly-snippets": { "branch": "main", "commit": "d0610077b6129cf9f7f78afbe3a1425d60f6e2f1" },
"gitsigns.nvim": { "branch": "main", "commit": "75dc649106827183547d3bedd4602442340d2f7f" },
"go.nvim": { "branch": "master", "commit": "8f8ab4b968d08bd70ecda1f2909fb5e6177452ca" },
"guihua.lua": { "branch": "master", "commit": "a53b76514ad42d92a821d75d712ef71e71898fcf" },
"indent-blankline.nvim": { "branch": "master", "commit": "d98f537c3492e87b6dc6c2e3f66ac517528f406f" },
"lazy.nvim": { "branch": "main", "commit": "eab487c2520f0fe9e54eb5e3ea0606e20512492e" },
"mason.nvim": { "branch": "main", "commit": "0fb4e56837f13b81a972fcc0554be1327b39061e" },
"nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" },
"nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
"nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" },
"nvim-lspconfig": { "branch": "master", "commit": "b124ef3bd4435a6db7ff03ea2f5a23e1e0487552" },
"nvim-tree.lua": { "branch": "master", "commit": "5a87ffe35c4739ffb6b62052572583ad277a20ae" },
"nvim-treesitter": { "branch": "master", "commit": "b7d50e59b1b2990b3ce8761d4cf595f4b71c87e2" },
"nvim-web-devicons": { "branch": "master", "commit": "b77921fdc44833c994fdb389d658ccbce5490c16" },
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
"telescope.nvim": { "branch": "master", "commit": "dfa230be84a044e7f546a6c2b0a403c739732b86" },
"ui": { "branch": "v2.5", "commit": "0c283b6aed4eed585a497c9031b18b5009bfe4dd" },
"which-key.nvim": { "branch": "main", "commit": "4b7167f8fb2dba3d01980735e3509e172c024c29" }
"conform.nvim": { "branch": "master", "commit": "0ebe875d9c306f5fc829db38492ffff2a70d8e9d" },
"friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" },
"gitsigns.nvim": { "branch": "main", "commit": "1ef74b546732f185d0f806860fa5404df7614f28" },
"go.nvim": { "branch": "master", "commit": "8389adb56ab124b75d858df5f87b741eaca7b8b3" },
"guihua.lua": { "branch": "master", "commit": "225db770e36aae6a1e9e3a65578095c8eb4038d3" },
"indent-blankline.nvim": { "branch": "master", "commit": "18603eb949eba08300799f64027af11ef922283f" },
"lazy.nvim": { "branch": "main", "commit": "48b52b5cfcf8f88ed0aff8fde573a5cc20b1306d" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" },
"nvim-autopairs": { "branch": "master", "commit": "fd2badc24e675f947162a16c124d395bde80dbd6" },
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
"nvim-colorizer.lua": { "branch": "master", "commit": "194ec600488f7c7229668d0e80bd197f3a2b84ff" },
"nvim-lspconfig": { "branch": "master", "commit": "bdbc65aadc708ce528efb22bca5f82a7cca6b54d" },
"nvim-tree.lua": { "branch": "master", "commit": "ea55ef12036897fdc4476b115a395d2a34965c82" },
"nvim-treesitter": { "branch": "master", "commit": "ccbaee59547425ef8b766433a6020ac191f3151f" },
"nvim-web-devicons": { "branch": "master", "commit": "9793801f974bba70e4ac5d7eae6c4f5659993d8e" },
"plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" },
"telescope.nvim": { "branch": "master", "commit": "5972437de807c3bc101565175da66a1aa4f8707a" },
"ui": { "branch": "v2.5", "commit": "a2661fdcbd42be74c0c98fd51ffffb0f485f409e" },
"which-key.nvim": { "branch": "main", "commit": "bfec3d6bc0a9b0b2cb11644642f78c2c3915eef0" }
}

View File

@ -49,9 +49,53 @@ lspconfig.gopls.setup({
lspconfig.clangd.setup{}
-- typescript
-- lspconfig.tsserver.setup {
-- on_attach = on_attach,
-- on_init = on_init,
-- capabilities = capabilities,
-- }
-- lspconfig.pyright.setup{}
-- lspconfig.html.setup({
-- on_attach = on_attach,
-- capabilities = capabilities,
-- filetypes = { "html", "templ" },
-- })
-- lspconfig.htmx.setup({
-- on_attach = on_attach,
-- capabilities = capabilities,
-- filetypes = { "html", "templ" },
-- })
lspconfig.templ.setup({
on_attach = on_attach,
capabilities = capabilities,
filetypes = { "templ" },
})
lspconfig.tailwindcss.setup({
on_attach = on_attach,
capabilities = capabilities,
filetypes = { "templ" },
settings = {
tailwindCSS = {
includeLanguages = {
templ = "html",
},
},
},
})
local templ_format = function()
local bufnr = vim.api.nvim_get_current_buf()
local filename = vim.api.nvim_buf_get_name(bufnr)
local cmd = "templ fmt " .. vim.fn.shellescape(filename)
vim.fn.jobstart(cmd, {
on_exit = function()
-- Reload the buffer only if it's still the current buffer
if vim.api.nvim_get_current_buf() == bufnr then
vim.cmd('e!')
end
end,
})
end
vim.api.nvim_create_autocmd({ "BufWritePre" }, { pattern = { "*.templ" }, callback = templ_format })

View File

@ -4,6 +4,7 @@ local null_ls = require("null-ls")
local opts = {
sources = {
null_ls.builtins.formatting.clang_format,
-- null_ls.builtins.formatting.pylint,
},
on_attach = function (client, bufnr)
if client.supports_method("textDocument/formatting") then