Add latest changes

This commit is contained in:
Patrick Wadström 2025-05-05 06:58:49 +02:00
parent db7472253e
commit f440af0a50
No known key found for this signature in database
GPG Key ID: CC0281C09CD6713D
13 changed files with 91 additions and 54 deletions

View File

@ -1,3 +1,18 @@
[font]
size = 11.0
[font.normal]
family = "Source Code Pro"
[font.bold]
family = "Source Code Pro"
[font.bold_italic]
family = "Source Code Pro"
[font.italic]
family = "Source Code Pro"
# Colors (Nord) # Colors (Nord)
# Default colors # Default colors

View File

@ -2,10 +2,10 @@
LocationMode=path-bar LocationMode=path-bar
ShowHidden=false ShowHidden=false
ShowSizeColumn=true ShowSizeColumn=true
GeometryX=860 GeometryX=4265
GeometryY=1509 GeometryY=97
GeometryWidth=840 GeometryWidth=840
GeometryHeight=630 GeometryHeight=630
SortColumn=name SortColumn=modified
SortOrder=ascending SortOrder=ascending
StartupMode=recent StartupMode=recent

View File

@ -4,7 +4,6 @@ require('user.settings')
require('user.keys') require('user.keys')
--require('plugins.rust') --require('plugins.rust')
require('plugins.lspconfig') require('plugins.lspconfig')
require('plugins.null-ls')
require('plugins.cmp') require('plugins.cmp')
require('plugins.lualine') require('plugins.lualine')
require('plugins.inlayhints') require('plugins.inlayhints')

View File

@ -1,24 +1,21 @@
local null_ls = require("null-ls") --local eslint = require("eslint")
local eslint = require("eslint")
null_ls.setup() --eslint.setup({
-- bin = 'eslint_d', -- or `eslint_d`
eslint.setup({ -- code_actions = {
bin = 'eslint_d', -- or `eslint_d` -- enable = true,
code_actions = { -- apply_on_save = {
enable = true, -- enable = true,
apply_on_save = { -- types = { "directive", "problem", "suggestion", "layout" },
enable = true, -- },
types = { "directive", "problem", "suggestion", "layout" }, -- disable_rule_comment = {
}, -- enable = true,
disable_rule_comment = { -- location = "separate_line", -- or `same_line`
enable = true, -- },
location = "separate_line", -- or `same_line` -- },
}, -- diagnostics = {
}, -- enable = true,
diagnostics = { -- report_unused_disable_directives = false,
enable = true, -- run_on = "type", -- or `save`
report_unused_disable_directives = false, -- },
run_on = "type", -- or `save` --})
},
})

View File

@ -7,7 +7,15 @@ lsp_defaults.capabilities = vim.tbl_deep_extend(
require('cmp_nvim_lsp').default_capabilities() require('cmp_nvim_lsp').default_capabilities()
) )
require'lspconfig'.tsserver.setup({ lspconfig.denols.setup({
on_attach = on_attach,
root_dir = lspconfig.util.root_pattern("deno.json", "deno.jsonc"),
})
lspconfig.ts_ls.setup({
on_attach = on_attach,
root_dir = lspconfig.util.root_pattern("pnpm-workspace.yaml", "package.json"),
single_file_support = false,
settings = { settings = {
typescript = { typescript = {
inlayHints = { inlayHints = {
@ -65,6 +73,7 @@ require('lspconfig').tailwindcss.setup({
}, },
}) })
require 'lspconfig'.eslint.setup({ require 'lspconfig'.eslint.setup({
settings = { settings = {
packageManager = 'npm' packageManager = 'npm'

View File

@ -1,9 +0,0 @@
local null_ls = require("null-ls")
null_ls.setup({
sources = {
null_ls.builtins.formatting.stylua,
null_ls.builtins.diagnostics.eslint,
null_ls.builtins.completion.spell,
},
})

View File

@ -10,5 +10,6 @@ vim.keymap.set("n", "<leader>xx", "<cmd>TroubleToggle<cr>",
vim.keymap.set("n", "<leader>gd", function() vim.lsp.buf.definition() end) vim.keymap.set("n", "<leader>gd", function() vim.lsp.buf.definition() end)
vim.keymap.set("n", "<leader>gr", function() vim.lsp.buf.references() end) vim.keymap.set("n", "<leader>gr", function() vim.lsp.buf.references() end)
vim.keymap.set("n", "<leader>gi", function() vim.lsp.buf.implementation() end) vim.keymap.set("n", "<leader>gi", function() vim.lsp.buf.implementation() end)
vim.keymap.set("n", "<leader>gg", '<cmd>Lspsaga finder<CR>', { silent = true, noremap = true })
vim.keymap.set("n", "<leader>tt", function() require('lsp-inlayhints').toggle() end) vim.keymap.set("n", "<leader>tt", function() require('lsp-inlayhints').toggle() end)

View File

@ -64,8 +64,7 @@ return require('packer').startup(function()
'nvim-treesitter/nvim-treesitter', 'nvim-treesitter/nvim-treesitter',
run = ':TSUpdate' run = ':TSUpdate'
} }
use 'jose-elias-alvarez/null-ls.nvim' --use 'muniftanjim/eslint.nvim'
use 'muniftanjim/eslint.nvim'
use 'kyazdani42/nvim-web-devicons' use 'kyazdani42/nvim-web-devicons'
use { use {
'folke/trouble.nvim', 'folke/trouble.nvim',
@ -103,6 +102,14 @@ return require('packer').startup(function()
use 'wakatime/vim-wakatime' use 'wakatime/vim-wakatime'
use {
"nvimdev/lspsaga.nvim",
after = 'nvim-lspconfig',
config = function()
require('lspsaga').setup({})
end,
}
if packer_bootstrap then if packer_bootstrap then
require('packer').sync() require('packer').sync()
end end

View File

@ -49,8 +49,8 @@ local function save_profiles(threshold)
end end
time([[Luarocks path setup]], true) time([[Luarocks path setup]], true)
local package_path_str = "/home/patrick/.cache/nvim/packer_hererocks/2.1.1720049189/share/lua/5.1/?.lua;/home/patrick/.cache/nvim/packer_hererocks/2.1.1720049189/share/lua/5.1/?/init.lua;/home/patrick/.cache/nvim/packer_hererocks/2.1.1720049189/lib/luarocks/rocks-5.1/?.lua;/home/patrick/.cache/nvim/packer_hererocks/2.1.1720049189/lib/luarocks/rocks-5.1/?/init.lua" local package_path_str = "/home/patrick/.cache/nvim/packer_hererocks/2.1.1741730670/share/lua/5.1/?.lua;/home/patrick/.cache/nvim/packer_hererocks/2.1.1741730670/share/lua/5.1/?/init.lua;/home/patrick/.cache/nvim/packer_hererocks/2.1.1741730670/lib/luarocks/rocks-5.1/?.lua;/home/patrick/.cache/nvim/packer_hererocks/2.1.1741730670/lib/luarocks/rocks-5.1/?/init.lua"
local install_cpath_pattern = "/home/patrick/.cache/nvim/packer_hererocks/2.1.1720049189/lib/lua/5.1/?.so" local install_cpath_pattern = "/home/patrick/.cache/nvim/packer_hererocks/2.1.1741730670/lib/lua/5.1/?.so"
if not string.find(package.path, package_path_str, 1, true) then if not string.find(package.path, package_path_str, 1, true) then
package.path = package.path .. ';' .. package_path_str package.path = package.path .. ';' .. package_path_str
end end
@ -119,11 +119,6 @@ _G.packer_plugins = {
path = "/home/patrick/.local/share/nvim/site/pack/packer/start/editorconfig-vim", path = "/home/patrick/.local/share/nvim/site/pack/packer/start/editorconfig-vim",
url = "https://github.com/editorconfig/editorconfig-vim" url = "https://github.com/editorconfig/editorconfig-vim"
}, },
["eslint.nvim"] = {
loaded = true,
path = "/home/patrick/.local/share/nvim/site/pack/packer/start/eslint.nvim",
url = "https://github.com/muniftanjim/eslint.nvim"
},
["fzf.vim"] = { ["fzf.vim"] = {
loaded = true, loaded = true,
path = "/home/patrick/.local/share/nvim/site/pack/packer/start/fzf.vim", path = "/home/patrick/.local/share/nvim/site/pack/packer/start/fzf.vim",
@ -149,6 +144,14 @@ _G.packer_plugins = {
path = "/home/patrick/.local/share/nvim/site/pack/packer/start/lsp-inlayhints.nvim", path = "/home/patrick/.local/share/nvim/site/pack/packer/start/lsp-inlayhints.nvim",
url = "https://github.com/lvimuser/lsp-inlayhints.nvim" url = "https://github.com/lvimuser/lsp-inlayhints.nvim"
}, },
["lspsaga.nvim"] = {
config = { "\27LJ\2\n9\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\flspsaga\frequire\0" },
load_after = {},
loaded = true,
needs_bufread = false,
path = "/home/patrick/.local/share/nvim/site/pack/packer/opt/lspsaga.nvim",
url = "https://github.com/nvimdev/lspsaga.nvim"
},
["lualine.nvim"] = { ["lualine.nvim"] = {
loaded = true, loaded = true,
path = "/home/patrick/.local/share/nvim/site/pack/packer/start/lualine.nvim", path = "/home/patrick/.local/share/nvim/site/pack/packer/start/lualine.nvim",
@ -174,11 +177,6 @@ _G.packer_plugins = {
path = "/home/patrick/.local/share/nvim/site/pack/packer/start/nordtheme-vim", path = "/home/patrick/.local/share/nvim/site/pack/packer/start/nordtheme-vim",
url = "https://github.com/ericvw/nordtheme-vim" url = "https://github.com/ericvw/nordtheme-vim"
}, },
["null-ls.nvim"] = {
loaded = true,
path = "/home/patrick/.local/share/nvim/site/pack/packer/start/null-ls.nvim",
url = "https://github.com/jose-elias-alvarez/null-ls.nvim"
},
["nvim-cmp"] = { ["nvim-cmp"] = {
loaded = true, loaded = true,
path = "/home/patrick/.local/share/nvim/site/pack/packer/start/nvim-cmp", path = "/home/patrick/.local/share/nvim/site/pack/packer/start/nvim-cmp",
@ -288,6 +286,15 @@ time([[Defining packer_plugins]], false)
time([[Config for trouble.nvim]], true) time([[Config for trouble.nvim]], true)
try_loadstring("\27LJ\2\n9\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\ftrouble\frequire\0", "config", "trouble.nvim") try_loadstring("\27LJ\2\n9\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\ftrouble\frequire\0", "config", "trouble.nvim")
time([[Config for trouble.nvim]], false) time([[Config for trouble.nvim]], false)
-- Load plugins in order defined by `after`
time([[Sequenced loading]], true)
vim.cmd [[ packadd nvim-lspconfig ]]
vim.cmd [[ packadd lspsaga.nvim ]]
-- Config for: lspsaga.nvim
try_loadstring("\27LJ\2\n9\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\flspsaga\frequire\0", "config", "lspsaga.nvim")
time([[Sequenced loading]], false)
_G._packer.inside_compile = false _G._packer.inside_compile = false
if _G._packer.needs_bufread == true then if _G._packer.needs_bufread == true then

View File

@ -274,6 +274,7 @@ exec swayidle -w \
timeout 600 'swaylock -f -c 000000' \ timeout 600 'swaylock -f -c 000000' \
timeout 900 'swaymsg "output * dpms off"' \ timeout 900 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \ resume 'swaymsg "output * dpms on"' \
timeout 1800 'systemctl suspend' \
before-sleep 'swaylock -f -c 000000' before-sleep 'swaylock -f -c 000000'
set $lockman exec bash ~/.config/sway/lockman.sh set $lockman exec bash ~/.config/sway/lockman.sh
bindsym $mod+Mod1+Ctrl+l $lockman bindsym $mod+Mod1+Ctrl+l $lockman
@ -319,4 +320,4 @@ exec_always {
# #
# App Specific Styling # App Specific Styling
#for_window [app_id="termite"] border pixel #for_window [app_id="termite"] border pixel
for_window [app_id=pavucontrol] floating enable #for_window [app_id=pavucontrol] floating enable

View File

@ -13,6 +13,8 @@
"pulseaudio", "pulseaudio",
"custom/headset", "custom/headset",
"network", "network",
"temperature",
"custom/fan",
"cpu", "cpu",
"memory", "memory",
"backlight", "backlight",
@ -64,7 +66,7 @@
}, },
"temperature": { "temperature": {
// "thermal-zone": 2, // "thermal-zone": 2,
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", "hwmon-path": "/sys/class/hwmon/hwmon4/temp1_input",
"critical-threshold": 80, "critical-threshold": 80,
// "format-critical": "{temperatureC}°C {icon}", // "format-critical": "{temperatureC}°C {icon}",
"format": "{temperatureC}°C {icon}", "format": "{temperatureC}°C {icon}",
@ -89,6 +91,11 @@
// "format-full": "", // "format-full": "",
"format-icons": ["", "", "", "", ""] "format-icons": ["", "", "", "", ""]
}, },
"custom/fan": {
"exec": "sensors | awk '/fan1:/ {print $2}'",
"format": "{} ",
"interval": 5,
},
"network": { "network": {
// "interface": "wlp2*", // (Optional) To force the use of this interface // "interface": "wlp2*", // (Optional) To force the use of this interface
"format-wifi": "{essid} ({signalStrength}%) ", "format-wifi": "{essid} ({signalStrength}%) ",

View File

@ -33,7 +33,7 @@ window#waybar {
border-radius: 5px; border-radius: 5px;
} }
#custom-headset, #cpu, #memory, #backlight, #clock, #battery, #pulseaudio, #network { #custom-headset, #cpu, #memory, #backlight, #clock, #battery, #pulseaudio, #network, #temperature, #custom-fan {
background-color: #4c566a; background-color: #4c566a;
padding: 0px 10px; padding: 0px 10px;
margin: 5px 0px; margin: 5px 0px;

3
.zshrc
View File

@ -1,4 +1,5 @@
zstyle :compinstall filename '/home/patrick/.zshrc' zstyle :compinstall filename '/home/patrick/.zshrc'
fpath+=~/.zfunc
autoload -Uz promptinit && promptinit autoload -Uz promptinit && promptinit
autoload -Uz compinit && compinit autoload -Uz compinit && compinit
autoload -Uz colors && colors autoload -Uz colors && colors
@ -107,3 +108,5 @@ export GPG_TTY=$(tty)
# Add JBang to environment # Add JBang to environment
alias j!=jbang alias j!=jbang
export PATH="$HOME/.jbang/bin:$PATH" export PATH="$HOME/.jbang/bin:$PATH"
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"