diff --git a/configs/nvim/ftplugin/qf.lua b/configs/nvim/ftplugin/qf.lua new file mode 100644 index 0000000..a929253 --- /dev/null +++ b/configs/nvim/ftplugin/qf.lua @@ -0,0 +1,7 @@ +-- Automatically close the goto definition buffer after leaving +local buffer_id = vim.api.nvim_win_get_buf(0) +vim.api.nvim_create_autocmd({ "bufwinleave", "bufleave" }, { + pattern = "*", + once = true, + command = "bdelete " .. buffer_id, +}) diff --git a/configs/nvim/lua/configs/lualine.lua b/configs/nvim/lua/configs/lualine.lua index 3b3c923..4df0b1f 100644 --- a/configs/nvim/lua/configs/lualine.lua +++ b/configs/nvim/lua/configs/lualine.lua @@ -45,13 +45,7 @@ local config = { -- Disable sections and component separators component_separators = "", section_separators = "", - theme = { - -- We are going to use lualine_c an lualine_x as left and - -- right section. Both are highlighted by c theme . So we - -- are just setting default looks o statusline - normal = { c = { fg = colors.fg, bg = colors.bg } }, - inactive = { c = { fg = colors.fg, bg = colors.bg } }, - }, + theme = "catppuccin", }, -- These are to remove the defaults diff --git a/configs/nvim/lua/configs/tree.lua b/configs/nvim/lua/configs/tree.lua index d45573d..6c3e649 100644 --- a/configs/nvim/lua/configs/tree.lua +++ b/configs/nvim/lua/configs/tree.lua @@ -1,5 +1,5 @@ -- Configure nvim-tree -require("nvim-tree").setup { +require("nvim-tree").setup({ hijack_cursor = true, update_cwd = false, trash = { @@ -12,23 +12,28 @@ require("nvim-tree").setup { hint = "", info = "", warning = "", - error = "" - } + error = "", + }, }, view = { hide_root_folder = true, - signcolumn = "no" + signcolumn = "no", }, renderer = { group_empty = true, highlight_opened_files = "all", icons = { + glyphs = { + git = { + untracked = "*", + }, + }, show = { folder_arrow = false, folder = true, file = true, - git = true - } - } - } -} + git = true, + }, + }, + }, +}) diff --git a/configs/nvim/lua/core/plugins.lua b/configs/nvim/lua/core/plugins.lua index 3d4fc9f..806a8dc 100644 --- a/configs/nvim/lua/core/plugins.lua +++ b/configs/nvim/lua/core/plugins.lua @@ -27,9 +27,9 @@ return packer.startup(function(use) -- Theming Section use("rktjmp/fwatch.nvim") -- Used to check dark/light theme -- use("EdenEast/nightfox.nvim") - -- use({ "catppuccin/nvim", as = "catppuccin" }) + use({ "catppuccin/nvim", as = "catppuccin" }) use("nvim-lualine/lualine.nvim") - use("sam4llis/nvim-tundra") + -- use("sam4llis/nvim-tundra") -- Layout Plugins use("dstein64/nvim-scrollview") -- ScrollBars @@ -104,7 +104,13 @@ return packer.startup(function(use) use({ "ThePrimeagen/harpoon" }) -- More IDE like features - + use("editorconfig/editorconfig-vim") + use({ + "iamcco/markdown-preview.nvim", + run = function() + vim.fn["mkdp#util#install"]() + end, + }) use({ "nvim-neotest/neotest", requires = { diff --git a/configs/nvim/lua/core/theme-cat.lua b/configs/nvim/lua/core/theme-cat.lua deleted file mode 100644 index 76001b5..0000000 --- a/configs/nvim/lua/core/theme-cat.lua +++ /dev/null @@ -1,48 +0,0 @@ --- Enable Theming / Syntax -vim.g.catppuccin_flavour = "mocha" -- latte, frappe, macchiato, mocha - -local cat = require("catppuccin") -cat.setup({ - transparent_background = true, - compile = { - enabled = true, - path = vim.fn.stdpath("cache") .. "/catppuccin", - }, - styles = { - comments = { "italic" }, - strings = { "italic" }, - }, - integrations = { - gitsigns = true, - telescope = true, - treesitter = true, - cmp = true, - nvimtree = { - enabled = true, - show_root = false, - }, - dap = { - enabled = true, - enable_ui = true, - }, - native_lsp = { - enabled = true, - }, - ts_rainbow = true, - indent_blankline = { - enabled = true, - colored_indent_levels = false, - }, - }, -}) - -require("nightfox").setup({ - options = { - transparent = true, - }, -}) - -vim.cmd("colorscheme catppuccin") - -require("utils.theme-reloader") -require("configs.lualine") diff --git a/configs/nvim/lua/core/theme-tundra.lua b/configs/nvim/lua/core/theme-tundra.lua new file mode 100644 index 0000000..7e71d1a --- /dev/null +++ b/configs/nvim/lua/core/theme-tundra.lua @@ -0,0 +1,43 @@ +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/core/theme.lua index e83960d..d69cd48 100644 --- a/configs/nvim/lua/core/theme.lua +++ b/configs/nvim/lua/core/theme.lua @@ -1,43 +1,50 @@ -require("nvim-tundra").setup({ +-- Enable Theming / Syntax +vim.g.catppuccin_flavour = "mocha" -- latte, frappe, macchiato, mocha + +local cat = require("catppuccin") +cat.setup({ transparent_background = true, - editor = { - search = {}, - substitute = {}, + compile = { + enabled = true, + path = vim.fn.stdpath("cache") .. "/catppuccin", }, - 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 }, + styles = { + comments = { "italic" }, + strings = { "italic" }, }, - diagnostics = { - errors = {}, - warnings = {}, - information = {}, - hints = {}, - }, - plugins = { - lsp = true, - treesitter = true, - cmp = true, - context = true, - dbui = true, + integrations = { gitsigns = true, telescope = true, - }, - overwrite = { - colors = {}, - highlights = {}, + treesitter = true, + cmp = true, + lsp_saga = true, + notify = true, + nvimtree = { + enabled = true, + show_root = false, + }, + dap = { + enabled = true, + enable_ui = true, + }, + native_lsp = { + enabled = true, + }, + ts_rainbow = true, + indent_blankline = { + enabled = true, + colored_indent_levels = false, + }, }, }) -vim.opt.background = "dark" -vim.cmd("colorscheme tundra") +-- require("nightfox").setup({ +-- options = { +-- transparent = true, +-- }, +-- }) + +vim.cmd("colorscheme catppuccin") + +require("utils.theme-reloader") +require("configs.lualine") diff --git a/configs/nvim/lua/utils/theme-reloader.lua b/configs/nvim/lua/utils/theme-reloader.lua index c9db2b7..93bca11 100644 --- a/configs/nvim/lua/utils/theme-reloader.lua +++ b/configs/nvim/lua/utils/theme-reloader.lua @@ -28,10 +28,11 @@ local function updateTheme() if line then local light = string.find(line, "light") if light then - -- vim.cmd("colorscheme dayfox") + vim.g.catppuccin_flavour = "latte" else - -- vim.cmd("colorscheme nightfox") + vim.g.catppuccin_flavour = "mocha" end + vim.cmd("colorscheme catppuccin") end end diff --git a/configs/sway/config b/configs/sway/config index 31e9792..45e7a43 100644 --- a/configs/sway/config +++ b/configs/sway/config @@ -174,6 +174,11 @@ input "1739:24385:Synaptics_TM2438-005" { bindsym $mod+Shift+$up move up bindsym $mod+Shift+$right move right + bindsym $mod+Control+Left move workspace to output left + bindsym $mod+Control+Right move workspace to output right + bindsym $mod+Control+Up move workspace to output up + bindsym $mod+Control+Down move workspace to output down + # Ditto, with arrow keys bindsym $mod+Shift+Left move left bindsym $mod+Shift+Down move down @@ -187,8 +192,9 @@ input "1739:24385:Synaptics_TM2438-005" { for_window [app_id="gnome-calculator"] floating enable for_window [app_id="qalculate-gtk"] floating enable for_window [title="Zoom Meeting.*"] floating disable - for_window [title="Firefox Developer Edition — Sharing Indicator"] floating enable, sticky enable, move position 10 980 + for_window [title="Firefox Developer Edition — Sharing Indicator"] floating enable, sticky enable, move position 10 980, resize set 75 50 for_window [title="Property Browser"] floating enable + for_window [title="Picture in Picture"] floating enable for_window [title="Zoom Meeting.*"] inhibit_idle visible for_window [app_id="firefox" title="^Picture-in-Picture$"] floating enable, move position 1300 600, sticky enable, resize set 600 450 diff --git a/configs/wezterm/wezterm.lua b/configs/wezterm/wezterm.lua index a608d89..f945e56 100644 --- a/configs/wezterm/wezterm.lua +++ b/configs/wezterm/wezterm.lua @@ -2,6 +2,14 @@ local wezterm = require("wezterm") local padding = 30 +local function scheme_for_appearance(appearance) + if appearance:find("Dark") then + return "3024 Night" + else + return "Catppuccin Latte" + end +end + return { font = wezterm.font("FiraCodeNerdFont"), font_size = 13, @@ -11,6 +19,7 @@ return { use_fancy_tab_bar = false, hide_tab_bar_if_only_one_tab = true, alternate_buffer_wheel_scroll_speed = 1, + color_scheme = scheme_for_appearance(wezterm.gui.get_appearance()), window_close_confirmation = "AlwaysPrompt", window_padding = { left = padding, diff --git a/configs/zsh/aliases.sh b/configs/zsh/aliases.sh index 90d03db..2b875d0 100644 --- a/configs/zsh/aliases.sh +++ b/configs/zsh/aliases.sh @@ -28,3 +28,5 @@ alias lt="tree -L 2 --filelimit 150 --dirsfirst" alias dc="docker-compose" alias t="tmux" + +alias nx="pnpm exec nx"