From dda89a1ad65c35a6df873b2309382b022eb8beae Mon Sep 17 00:00:00 2001 From: Ayush Mukherjee Date: Mon, 16 Dec 2024 04:27:10 +0530 Subject: [PATCH] updates updates updates --- alacritty/alacritty.toml | 4 +- alacritty/tokyonight/tokyonight_moon.toml | 46 ++++++++++++++++++++++ alacritty/tokyonight/tokyonight_night.toml | 46 ++++++++++++++++++++++ nvim/after/queries/blade/highlights.scm | 13 ++++++ nvim/after/queries/blade/injections.scm | 21 ++++++++++ nvim/init.lua | 21 +++++++++- sway/config | 10 +++-- 7 files changed, 155 insertions(+), 6 deletions(-) create mode 100644 alacritty/tokyonight/tokyonight_moon.toml create mode 100644 alacritty/tokyonight/tokyonight_night.toml create mode 100644 nvim/after/queries/blade/highlights.scm create mode 100644 nvim/after/queries/blade/injections.scm diff --git a/alacritty/alacritty.toml b/alacritty/alacritty.toml index b6d5899..67c557f 100644 --- a/alacritty/alacritty.toml +++ b/alacritty/alacritty.toml @@ -1,5 +1,7 @@ [general] -import = ["/home/ayush/.config/alacritty/catppuccin/catppuccin-macchiato.toml"] +#import = ["/home/ayush/.config/alacritty/catppuccin/catppuccin-macchiato.toml"] +import = ["/home/ayush/.config/alacritty/tokyonight/tokyonight_moon.toml"] +#import = ["/home/ayush/.config/alacritty/tokyonight/tokyonight_night.toml"] [colors] draw_bold_text_with_bright_colors = false diff --git a/alacritty/tokyonight/tokyonight_moon.toml b/alacritty/tokyonight/tokyonight_moon.toml new file mode 100644 index 0000000..7f1f718 --- /dev/null +++ b/alacritty/tokyonight/tokyonight_moon.toml @@ -0,0 +1,46 @@ +# ----------------------------------------------------------------------------- +# TokyoNight Alacritty Colors +# Theme: Tokyo Night Moon +# Upstream: https://github.com/folke/tokyonight.nvim/raw/main/extras/alacritty/tokyonight_moon.toml +# Last Update: 16 Dec 2024, 4 AM, commit hash: 92c0e5391bc18b969180f64cab61eaa8d749ebde +# ----------------------------------------------------------------------------- + +# Default colors +[colors.primary] +background = '#222436' +foreground = '#c8d3f5' + +#[colors.cursor] +#cursor = '#c8d3f5' +#text = '#222436' + +# Normal colors +[colors.normal] +black = '#1b1d2b' +red = '#ff757f' +green = '#c3e88d' +yellow = '#ffc777' +blue = '#82aaff' +magenta = '#c099ff' +cyan = '#86e1fc' +white = '#828bb8' + +# Bright colors +[colors.bright] +black = '#444a73' +red = '#ff8d94' +green = '#c7fb6d' +yellow = '#ffd8ab' +blue = '#9ab8ff' +magenta = '#caabff' +cyan = '#b2ebff' +white = '#c8d3f5' + +# Indexed Colors +[[colors.indexed_colors]] +index = 16 +color = '#ff966c' + +[[colors.indexed_colors]] +index = 17 +color = '#c53b53' diff --git a/alacritty/tokyonight/tokyonight_night.toml b/alacritty/tokyonight/tokyonight_night.toml new file mode 100644 index 0000000..101c602 --- /dev/null +++ b/alacritty/tokyonight/tokyonight_night.toml @@ -0,0 +1,46 @@ +# ----------------------------------------------------------------------------- +# TokyoNight Alacritty Colors +# Theme: Tokyo Night +# Upstream: https://github.com/folke/tokyonight.nvim/raw/main/extras/alacritty/tokyonight_night.toml +# Last Update: 16 Dec 2024, 4 AM, commit hash: 92c0e5391bc18b969180f64cab61eaa8d749ebde +# ----------------------------------------------------------------------------- + +# Default colors +[colors.primary] +background = '#1a1b26' +foreground = '#c0caf5' + +#[colors.cursor] +#cursor = '#c0caf5' +#text = '#1a1b26' + +# Normal colors +[colors.normal] +black = '#15161e' +red = '#f7768e' +green = '#9ece6a' +yellow = '#e0af68' +blue = '#7aa2f7' +magenta = '#bb9af7' +cyan = '#7dcfff' +white = '#a9b1d6' + +# Bright colors +[colors.bright] +black = '#414868' +red = '#ff899d' +green = '#9fe044' +yellow = '#faba4a' +blue = '#8db0ff' +magenta = '#c7a9ff' +cyan = '#a4daff' +white = '#c0caf5' + +# Indexed Colors +[[colors.indexed_colors]] +index = 16 +color = '#ff9e64' + +[[colors.indexed_colors]] +index = 17 +color = '#db4b4b' diff --git a/nvim/after/queries/blade/highlights.scm b/nvim/after/queries/blade/highlights.scm new file mode 100644 index 0000000..805e628 --- /dev/null +++ b/nvim/after/queries/blade/highlights.scm @@ -0,0 +1,13 @@ +(directive) @function +(directive_start) @function +(directive_end) @function +(comment) @comment +((parameter) @include (#set! "priority" 110)) +((php_only) @include (#set! "priority" 110)) +((bracket_start) @function (#set! "priority" 120)) +((bracket_end) @function (#set! "priority" 120)) +(keyword) @function +(directive) @tag +(directive_start) @tag +(directive_end) @tag +(comment) @comment @spell diff --git a/nvim/after/queries/blade/injections.scm b/nvim/after/queries/blade/injections.scm new file mode 100644 index 0000000..f9c36e5 --- /dev/null +++ b/nvim/after/queries/blade/injections.scm @@ -0,0 +1,21 @@ +((text) @injection.content + (#not-has-ancestor? @injection.content "envoy") + (#set! injection.combined) + (#set! injection.language php)) +((text) @injection.content + (#not-has-ancestor? @injection.content "envoy") + (#set! injection.combined) + (#set! injection.language php)) + +; could be bash or zsh +; or whatever tree-sitter grammar you have. +((text) @injection.content + (#has-ancestor? @injection.content "envoy") + (#set! injection.combined) + (#set! injection.language bash)) + +; 🚧 Available for experimental split_parser see issue #5 +;((php_only) @injection.content +; (#set! injection.language php_only)) +;((parameter) @injection.content +; (#set! injection.language php_only)) diff --git a/nvim/init.lua b/nvim/init.lua index 0bf26af..23f58a9 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -32,6 +32,8 @@ require("packer").startup(function() as = "catpuccin", }) + use ("folke/tokyonight.nvim") + use("nvim-treesitter/nvim-treesitter") use("jose-elias-alvarez/null-ls.nvim") @@ -58,7 +60,7 @@ end) require("user.basics") -vim.cmd.colorscheme("catppuccin-macchiato") +vim.cmd.colorscheme("tokyonight-moon") vim.opt.guicursor = "n:block-Number,i:ver30" local function map(mode, shortcut, command) @@ -90,6 +92,23 @@ if not status_ok then return end +-- EmranMR Laravel Blade Treesitter +local parser_config = require "nvim-treesitter.parsers".get_parser_configs() +parser_config.blade = { + install_info = { + url = "https://github.com/EmranMR/tree-sitter-blade", + files = {"src/parser.c"}, + branch = "main", + }, + filetype = "blade", +} + +vim.filetype.add({ + pattern = { + ['.*%.blade%.php'] = 'blade', + }, +}) + configs.setup({ ensure_installed = "all", ignore_install = { "" }, diff --git a/sway/config b/sway/config index 07fdd0f..7afe10a 100644 --- a/sway/config +++ b/sway/config @@ -1,15 +1,17 @@ # set edp output eDP-1 { #mode 1920x1080@60.004Hz - #mode 1920x1080@144.003Hz + mode 1920x1080@144.003Hz #scale 1.0 - #adaptive_sync off + adaptive_sync on + pos 0 0 } output DP-1 { mode 2560x1440@144.000Hz scale 1.0 adaptive_sync off + pos 1920 0 } output HDMI-A-1 { @@ -278,8 +280,8 @@ bindsym XF86MonBrightnessUp exec sudo /usr/bin/light -A 10 bindsym XF86MonBrightnessDown exec sudo /usr/bin/light -U 10 # Custom Bindings for Applications -# Mod + n firefox -bindsym $mod+n exec firefox +# Mod + n Zen +bindsym $mod+n exec zen-browser # Mod + b (old: min) notesnook #bindsym $mod+b exec "min --use-gl=desktop --enable-features=VaapiVideoDecoder,VaapiVideoEncoder,CanvasOopRasterization --ozone-platform-hint=auto --ignore-gpu-blocklist --enable-gpu-rasterization --enable-zero-copy --disable-features=UseSkiaRenderer,UseChromeOSDirectVideoDecoder --canvas-oop-rasterization"