diff --git a/configs/nvim/.luarc.json b/configs/nvim/.luarc.json new file mode 100644 index 0000000..e1b9d70 --- /dev/null +++ b/configs/nvim/.luarc.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json", + "Lua.workspace.checkThirdParty": false +} \ No newline at end of file diff --git a/configs/nvim/init.lua b/configs/nvim/init.lua index 5ffd5e6..3bcdd15 100644 --- a/configs/nvim/init.lua +++ b/configs/nvim/init.lua @@ -4,10 +4,11 @@ require("core.plugins") require("core.options") require("core.autocommands") -require("core.theme") require("core.keymappings") require("configs.dashboard") require("configs.lsp") +require("theme.catpuccin") + require("overlays") diff --git a/configs/nvim/lua/configs/autocomplete.lua b/configs/nvim/lua/configs/autocomplete.lua index d0ffe8d..981e61d 100644 --- a/configs/nvim/lua/configs/autocomplete.lua +++ b/configs/nvim/lua/configs/autocomplete.lua @@ -7,7 +7,9 @@ local cmp_autopairs = require("nvim-autopairs.completion.cmp") require("nvim-autopairs").setup() require("copilot").setup() -require("copilot_cmp").setup() +require("copilot_cmp").setup({ + clear_after_cursor = true +}) cmp.setup({ window = { diff --git a/configs/nvim/lua/configs/lsp.lua b/configs/nvim/lua/configs/lsp.lua index c219316..4ebb90c 100644 --- a/configs/nvim/lua/configs/lsp.lua +++ b/configs/nvim/lua/configs/lsp.lua @@ -83,6 +83,11 @@ lsp.prismals.setup({ on_attach = on_attach, }) +lsp.emmet_ls.setup({ + capabilities = capabilities, + on_attach = on_attach, +}) + lsp.solargraph.setup({ filetypes = { "ruby" }, on_attach = on_attach, @@ -130,11 +135,30 @@ lsp.html.setup({ capabilities = capabilities, on_attach = on_attach, }) -lsp.intelephense.setup({ +lsp.phpactor.setup({ capabilities = capabilities, on_attach = on_attach, }) - +lsp.intelephense.setup({ + capabilities = capabilities, + on_attach = on_attach, + settings = { + intelephense = { + stubs = { + "wordpress", + "woocommerce", + "wordpress-globals", + "wp-cli", + }, + environment = { + includePaths = '/home/max/.composer/vendor/php-stubs/' -- this line forces the composer path for the stubs in case inteliphense don't find it... + }, + files = { + maxSize = 5000000; + }; + }; + } +}) lsp.cssls.setup({ capabilities = capabilities, on_attach = on_attach, diff --git a/configs/nvim/lua/configs/scrollbar.lua b/configs/nvim/lua/configs/scrollbar.lua new file mode 100644 index 0000000..d278d4e --- /dev/null +++ b/configs/nvim/lua/configs/scrollbar.lua @@ -0,0 +1,15 @@ +require("scrollbar").setup({ + handlers = { + cursor = true, + diagnostic = true, + gitsigns = true, -- Requires gitsigns + handle = true, + search = false, -- Requires hlslens + }, + excluded_filetypes = { + "prompt", + "TelescopePrompt", + "noice", + "NvimTree", + }, +}) diff --git a/configs/nvim/lua/core/autocommands.lua b/configs/nvim/lua/core/autocommands.lua index 31f437d..c18328c 100644 --- a/configs/nvim/lua/core/autocommands.lua +++ b/configs/nvim/lua/core/autocommands.lua @@ -1,7 +1,6 @@ -local cmd = vim.cmd +local config_group = vim.api.nvim_create_augroup("Config", {}) -local config_group = vim.api.nvim_create_augroup('Config', {}) -vim.api.nvim_create_autocmd({ 'TextYankPost' }, { +vim.api.nvim_create_autocmd({ "TextYankPost" }, { group = config_group, callback = function() vim.highlight.on_yank() @@ -22,9 +21,9 @@ vim.api.nvim_create_autocmd({ 'TextYankPost' }, { -- command = 'silent! loadview' -- }) -cmd [[ +vim.cmd([[ augroup filetypedetect au BufNewFile,BufRead *.frag setl ft=glsl au BufNewFile,BufRead *.vert setl ft=glsl augroup END -]] +]]) diff --git a/configs/nvim/lua/core/keymappings.lua b/configs/nvim/lua/core/keymappings.lua index 6e48bbb..a06f934 100644 --- a/configs/nvim/lua/core/keymappings.lua +++ b/configs/nvim/lua/core/keymappings.lua @@ -12,7 +12,7 @@ local remap = { noremap = true } g.mapleader = " " -- Allows to easily exit terminal mode -map('t', '', [[]], remap) +-- map('t', '', [[]], remap) map("n", "", ":Telescope find_files", options) map("n", "", ":lua require'telescope.builtin'.live_grep{ cwd = vim.fn.getcwd() }", options) diff --git a/configs/nvim/lua/core/plugins.lua b/configs/nvim/lua/core/plugins.lua index 44d04f1..40b3f0b 100644 --- a/configs/nvim/lua/core/plugins.lua +++ b/configs/nvim/lua/core/plugins.lua @@ -30,13 +30,25 @@ return packer.startup(function(use) use("rktjmp/fwatch.nvim") -- Used to check dark/light theme use({ "catppuccin/nvim", as = "catppuccin" }) + -- use 'folke/tokyonight.nvim' use("nvim-lualine/lualine.nvim") -------------------- -- Layout Plugins -- -------------------- - use("dstein64/nvim-scrollview") -- ScrollBars + use({ + "petertriho/nvim-scrollbar", + config = function() + require("configs.scrollbar") + end + }) + use({ + "lewis6991/gitsigns.nvim", + config = function() + require('gitsigns').setup() + end + }) use("akinsho/nvim-toggleterm.lua") use({ @@ -50,14 +62,12 @@ return packer.startup(function(use) use({ "kyazdani42/nvim-tree.lua", requires = { "kyazdani42/nvim-web-devicons" }, - cmd = "NvimTreeToggle", config = function() require("configs.tree") end, }) use("nvim-lua/popup.nvim") use("goolord/alpha-nvim") -- startup screen - -- use("Pocco81/true-zen.nvim") use({ "numToStr/Comment.nvim", event = "BufReadPre", @@ -65,7 +75,6 @@ return packer.startup(function(use) require("Comment").setup() end, }) - -- use("gfeiyou/command-center.nvim") use("glepnir/lspsaga.nvim") -- better windows for lsp replace, goto definition etc... --------------------- @@ -134,8 +143,10 @@ return packer.startup(function(use) }, event = { "BufReadPre", "CmdlineChanged" }, config = function() - require("configs.autocomplete") - require("configs.snippets") + vim.schedule(function() + require("configs.autocomplete") + require("configs.snippets") + end) end, }) diff --git a/configs/nvim/lua/core/theme-tundra.lua b/configs/nvim/lua/core/theme-tundra.lua deleted file mode 100644 index 7e71d1a..0000000 --- a/configs/nvim/lua/core/theme-tundra.lua +++ /dev/null @@ -1,43 +0,0 @@ -require("nvim-tundra").setup({ - transparent_background = true, - editor = { - search = {}, - substitute = {}, - }, - syntax = { - booleans = { bold = true, italic = true }, - comments = { bold = true, italic = true }, - conditionals = {}, - constants = { bold = true }, - functions = {}, - keywords = {}, - loops = {}, - numbers = { bold = true }, - operators = { bold = true }, - punctuation = {}, - strings = {}, - types = { italic = true }, - }, - diagnostics = { - errors = {}, - warnings = {}, - information = {}, - hints = {}, - }, - plugins = { - lsp = true, - treesitter = true, - cmp = true, - context = true, - dbui = true, - gitsigns = true, - telescope = true, - }, - overwrite = { - colors = {}, - highlights = {}, - }, -}) - -vim.opt.background = "dark" -vim.cmd("colorscheme tundra") diff --git a/configs/nvim/lua/core/theme.lua b/configs/nvim/lua/theme/catpuccin.lua similarity index 92% rename from configs/nvim/lua/core/theme.lua rename to configs/nvim/lua/theme/catpuccin.lua index e0a159d..e5347c5 100644 --- a/configs/nvim/lua/core/theme.lua +++ b/configs/nvim/lua/theme/catpuccin.lua @@ -1,5 +1,5 @@ -- Enable Theming / Syntax -vim.g.catppuccin_flavour = "mocha" -- latte, frappe, macchiato, mocha +vim.g.catppuccin_flavour = "frappe" -- latte, frappe, macchiato, mocha local cat = require("catppuccin") cat.setup({ diff --git a/configs/nvim/lua/theme/tokyo.lua b/configs/nvim/lua/theme/tokyo.lua new file mode 100644 index 0000000..799d2ab --- /dev/null +++ b/configs/nvim/lua/theme/tokyo.lua @@ -0,0 +1,37 @@ +require("tokyonight").setup({ + -- your configuration comes here + -- or leave it empty to use the default settings + style = "night", -- The theme comes in three styles, `storm`, `moon`, a darker variant `night` and `day` + light_style = "day", -- The theme is used when the background is set to light + transparent = true, -- Enable this to disable setting the background color + -- terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim + styles = { + -- Style to be applied to different syntax groups + -- Value is any valid attr-list value for `:help nvim_set_hl` + comments = { italic = true }, + keywords = { italic = true }, + functions = {}, + variables = {}, + -- Background styles. Can be "dark", "transparent" or "normal" + -- sidebars = "dark", -- style for sidebars, see below + -- floats = "dark", -- style for floating windows + }, + -- sidebars = { "qf", "help" }, -- Set a darker background on sidebar-like windows. For example: `["qf", "vista_kind", "terminal", "packer"]` + day_brightness = 0.3, -- Adjusts the brightness of the colors of the **Day** style. Number between 0 and 1, from dull to vibrant colors + hide_inactive_statusline = false, -- Enabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard **StatusLine** and **LuaLine**. + dim_inactive = true, -- dims inactive windows + lualine_bold = true, -- When `true`, section headers in the lualine theme will be bold + + --- You can override specific color groups to use other groups or a hex color + --- function will be called with a ColorScheme table + ---@param colors ColorScheme + on_colors = function(colors) end, + + --- You can override specific highlights to use other groups or a hex color + --- function will be called with a Highlights and ColorScheme table + ---@param highlights Highlights + ---@param colors ColorScheme + on_highlights = function(highlights, colors) end, +}) + +vim.cmd("colorscheme tokyonight") diff --git a/configs/nvim/lua/theme/tundra.lua b/configs/nvim/lua/theme/tundra.lua new file mode 100644 index 0000000..e69de29 diff --git a/configs/nvim/lua/utils/theme-reloader.lua b/configs/nvim/lua/utils/theme-reloader.lua index 93bca11..877f3d0 100644 --- a/configs/nvim/lua/utils/theme-reloader.lua +++ b/configs/nvim/lua/utils/theme-reloader.lua @@ -29,8 +29,10 @@ local function updateTheme() local light = string.find(line, "light") if light then vim.g.catppuccin_flavour = "latte" + vim.cmd("Catppuccin latte") else vim.g.catppuccin_flavour = "mocha" + vim.cmd("Catppuccin mocha") end vim.cmd("colorscheme catppuccin") end diff --git a/configs/nvim/stylua.toml b/configs/nvim/stylua.toml new file mode 100644 index 0000000..bb258b9 --- /dev/null +++ b/configs/nvim/stylua.toml @@ -0,0 +1,6 @@ +column_width = 120 +line_endings = "Unix" +indent_type = "Spaces" +indent_width = 4 +quote_style = "AutoPreferDouble" +no_call_parentheses = false diff --git a/configs/sway/config b/configs/sway/config index 1653add..71598e5 100644 --- a/configs/sway/config +++ b/configs/sway/config @@ -188,7 +188,10 @@ input "1739:24385:Synaptics_TM2438-005" { # # Workspaces: # +# + corner_radius 4 for_window [class="zoom"] floating enable + for_window [class="wezterm"] corner_radius 20 for_window [app_id="com.github.gi_lom.dialect"] floating enable, resize set 800 400, sticky enable for_window [app_id="gnome-calculator"] floating enable for_window [app_id="qalculate-gtk"] floating enable diff --git a/configs/waybar/config b/configs/waybar/config index dbc8598..a23437a 100644 --- a/configs/waybar/config +++ b/configs/waybar/config @@ -57,6 +57,7 @@ "clock": { "interval": 60, "format": "{:%H:%M}", + "on-click": "gnome-calendar", "max-length": 25 }, "battery": { @@ -64,7 +65,7 @@ "warning": 30, "critical": 15 }, - "format": "{capacity}% {icon}", + "format": "{capacity}%{icon}", "format-charging": "{capacity}% ", "format-plugged": "{capacity}% ", "format-alt": "{time} {icon}", @@ -89,7 +90,7 @@ "format-alt": "{ifname}: {ipaddr}/{cidr}" }, "pulseaudio": { - "format": "{volume}% {icon} {format_source}", + "format": "{volume}% {icon} {format_source}", "format-bluetooth": "{volume}% {icon} {format_source}", "format-bluetooth-muted": " {icon} {format_source}", "format-muted": " {format_source}", diff --git a/configs/waybar/style.css b/configs/waybar/style.css index 4cbb7fc..11529f3 100644 --- a/configs/waybar/style.css +++ b/configs/waybar/style.css @@ -3,7 +3,6 @@ font-family: Font Awesome, Hack Nerd Font Mono; font-weight: 600; font-size: 13px; - /* opacity: 0.95; */ } window#waybar { @@ -15,12 +14,15 @@ window > box { margin-bottom: 0px; background: #2b303b; background: @theme_bg_color; - padding: 5px 8px; border-radius: 4px; + + padding: 7px; + padding-left: 4px; + padding-right: 5px; } #workspaces button { - padding:0px 10px; + padding: 0px 8px; color: @theme_fg_color; background: transparent; border-radius: 2px; @@ -31,22 +33,16 @@ window > box { } #workspaces button.active, -#workspaces button.focused{ +#workspaces button.focused { background-color: @theme_fg_color; color: @theme_bg_color; } #clock { - margin: 0px 16px 0px 10px; - min-width: 10px; + margin: 0px 10px 0px 10px; } -.custom-spotify { - /*padding: 0 10px;*/ - /*margin: 0 4px;*/ - opacity: 0.5; -} #custom-power { color: #cc241d; @@ -76,10 +72,30 @@ window > box { color: #fe8019; } -#waybar > box:nth-child(2) > box:nth-child(3) > * > label { - padding: 0 3px; +#custom-power-consumption, +#custom-power-profile, +#custom-dpi, +#custom-theme, +#pulseaudio, +#battery, +#network { + /* margin: 0px 5px; */ + /* padding: 0px 5px; */ + padding-right: 10px; + padding-left: 7px; + /* margin-left: 2px; */ + border-right: 1px solid rgba(255, 255, 255, 0.2); + /* background: rgba(255, 255, 255, 1); */ + /* border-radius: 2px; */ } -#custom-waybar-mpris{ - margin-left: 20px; +#battery { + /* padding-left: 5px; */ + border-right: none; + padding-right: 5px; + +} + +widget:hover { + background-color: red; } diff --git a/configs/zsh/aliases.sh b/configs/zsh/aliases.sh index 2b875d0..1ca25b7 100644 --- a/configs/zsh/aliases.sh +++ b/configs/zsh/aliases.sh @@ -30,3 +30,11 @@ alias dc="docker-compose" alias t="tmux" alias nx="pnpm exec nx" + +if type lsd &> /dev/null; then + alias ls="lsd" +fi + +if type bat &> /dev/null; then + alias cat="bat" +fi