diff --git a/.bashrc b/.bashrc index e128513..c0785b1 100644 --- a/.bashrc +++ b/.bashrc @@ -59,3 +59,8 @@ export PATH=$PATH:$ANDROID_HOME/platform-tools export FLUTTER_HOME=$HOME/flutter export PATH=$PATH:$FLUTTER_HOME/bin export CHROME_EXECUTABLE=brave + +# pnpm +export PNPM_HOME="/home/ayush/.local/share/pnpm" +export PATH="$PNPM_HOME:$PATH" +# pnpm end \ No newline at end of file diff --git a/alacritty/alacritty.yml b/alacritty/alacritty.yml index 2bdc439..ee87fd7 100644 --- a/alacritty/alacritty.yml +++ b/alacritty/alacritty.yml @@ -20,8 +20,24 @@ draw_bold_text_with_bright_colors: false colors: # Default colors primary: - background: '0x1e2127' - foreground: '0xabb2bf' + background: '#282c34' + foreground: '#abb2bf' + + # Bright and dim foreground colors + # + # The dimmed foreground color is calculated automatically if it is not present. + # If the bright foreground color is not set, or `draw_bold_text_with_bright_colors` + # is `false`, the normal foreground color will be used. + #dim_foreground: '0x9a9a9a' + bright_foreground: '0xe6efff' + + # Cursor colors + # + # Colors which should be used to draw the terminal cursor. If these are unset, + # the cursor color will be the inverse of the cell color. + #cursor: + # text: '0x000000' + # cursor: '0xffffff' # Normal colors normal: @@ -32,7 +48,7 @@ colors: blue: '0x61afef' magenta: '0xc678dd' cyan: '0x56b6c2' - white: '0xabb2bf' + white: '0x828791' # Bright colors bright: @@ -43,4 +59,18 @@ colors: blue: '0x61afef' magenta: '0xc678dd' cyan: '0x56b6c2' - white: '0xffffff' + white: '0xe6efff' + + # Dim colors + # + # If the dim colors are not set, they will be calculated automatically based + # on the `normal` colors. + dim: + black: '0x1e2127' + red: '0xe06c75' + green: '0x98c379' + yellow: '0xd19a66' + blue: '0x61afef' + magenta: '0xc678dd' + cyan: '0x56b6c2' + white: '0x828791' diff --git a/electron-flags.conf b/electron-flags.conf new file mode 100644 index 0000000..9ecfca4 --- /dev/null +++ b/electron-flags.conf @@ -0,0 +1,2 @@ +--ozone-platform=wayland +--ozone-hint=wayland diff --git a/foot/foot.ini b/foot/foot.ini new file mode 100644 index 0000000..351ff5a --- /dev/null +++ b/foot/foot.ini @@ -0,0 +1,195 @@ +# -*- conf -*- + +# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd) +# term=foot (or xterm-256color if built with -Dterminfo=disabled) +# login-shell=no + +# app-id=foot +# title=foot +# locked-title=no + +font=Roboto Mono for Powerline:size=14 +# font-bold= +# font-italic= +# font-bold-italic= +# line-height= +# letter-spacing=0 +# horizontal-letter-offset=0 +# vertical-letter-offset=0 +# underline-offset= +# box-drawings-uses-font-glyphs=no +# dpi-aware=auto + +# initial-window-size-pixels=700x500 # Or, +# initial-window-size-chars= +# initial-window-mode=windowed +# pad=2x2 # optionally append 'center' +# resize-delay-ms=100 + +# notify=notify-send -a ${app-id} -i ${app-id} ${title} ${body} + +# bold-text-in-bright=no +# word-delimiters=,│`|:"'()[]{}<> +# selection-target=primary +# workers= + +[environment] +# name=value + +[bell] +# urgent=no +# notify=no +# command= +# command-focused=no + +[scrollback] +# lines=1000 +# multiplier=3.0 +# indicator-position=relative +# indicator-format= + +[url] +# launch=xdg-open ${url} +# label-letters=sadfjklewcmpgh +# osc8-underline=url-mode +# protocols=http, https, ftp, ftps, file, gemini, gopher +# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[] + +[cursor] +# style=block +# color= +# blink=no +# beam-thickness=1.5 +# underline-thickness= + +[mouse] +# hide-when-typing=no +# alternate-scroll-mode=yes + +[colors] +# alpha=1.0 +foreground=abb2bf +background=282c34 + +## Normal/regular colors (color palette 0-7) +# regular0=222222 # black +# regular1=cc9393 # red +# regular2=7f9f7f # green +# regular3=d0bf8f # yellow +# regular4=6ca0a3 # blue +# regular5=dc8cc3 # magenta +# regular6=93e0e3 # cyan +# regular7=dcdccc # white + +## Bright colors (color palette 8-15) +# bright0=666666 # bright black +# bright1=dca3a3 # bright red +# bright2=bfebbf # bright green +# bright3=f0dfaf # bright yellow +# bright4=8cd0d3 # bright blue +# bright5=fcace3 # bright magenta +# bright6=b3ffff # bright cyan +# bright7=ffffff # bright white + +## dimmed colors (see foot.ini(5) man page) +# dim0= +# ... +# dim7= + +## The remaining 256-color palette +# 16 = <256-color palette #16> +# ... +# 255 = <256-color palette #255> + +## Misc colors +# selection-foreground= +# selection-background= +# jump-labels= # black-on-yellow +# scrollback-indicator= # black-on-bright-blue +# search-box-no-match= # black-on-red +# search-box-match= # black-on-yellow +# urls= + +[csd] +# preferred=server +# size=26 +# font= +# color= +# hide-when-typing=no +# border-width=0 +# border-color= +# button-width=26 +# button-color= +# button-minimize-color= +# button-maximize-color= +# button-close-color= + +[key-bindings] +# scrollback-up-page=Shift+Page_Up +# scrollback-up-half-page=none +# scrollback-up-line=none +# scrollback-down-page=Shift+Page_Down +# scrollback-down-half-page=none +# scrollback-down-line=none +# clipboard-copy=Control+Shift+c XF86Copy +# clipboard-paste=Control+Shift+v XF86Paste +# primary-paste=Shift+Insert +# search-start=Control+Shift+r +# font-increase=Control+plus Control+equal Control+KP_Add +# font-decrease=Control+minus Control+KP_Subtract +# font-reset=Control+0 Control+KP_0 +# spawn-terminal=Control+Shift+n +# minimize=none +# maximize=none +# fullscreen=none +# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none +# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none +# pipe-selected=[xargs -r firefox] none +# show-urls-launch=Control+Shift+u +# show-urls-copy=none +# show-urls-persistent=none +# prompt-prev=Control+Shift+z +# prompt-next=Control+Shift+x +# unicode-input=none +# noop=none + +[search-bindings] +# cancel=Control+g Control+c Escape +# commit=Return +# find-prev=Control+r +# find-next=Control+s +# cursor-left=Left Control+b +# cursor-left-word=Control+Left Mod1+b +# cursor-right=Right Control+f +# cursor-right-word=Control+Right Mod1+f +# cursor-home=Home Control+a +# cursor-end=End Control+e +# delete-prev=BackSpace +# delete-prev-word=Mod1+BackSpace Control+BackSpace +# delete-next=Delete +# delete-next-word=Mod1+d Control+Delete +# extend-to-word-boundary=Control+w +# extend-to-next-whitespace=Control+Shift+w +# clipboard-paste=Control+v Control+Shift+v Control+y XF86Paste +# primary-paste=Shift+Insert +# unicode-input=none + +[url-bindings] +# cancel=Control+g Control+c Control+d Escape +# toggle-url-visible=t + +[text-bindings] +# \x03=Mod4+c # Map Super+c -> Ctrl+c + +[mouse-bindings] +# selection-override-modifiers=Shift +# primary-paste=BTN_MIDDLE +# select-begin=BTN_LEFT +# select-begin-block=Control+BTN_LEFT +# select-extend=BTN_RIGHT +# select-extend-character-wise=Control+BTN_RIGHT +# select-word=BTN_LEFT-2 +# select-word-whitespace=Control+BTN_LEFT-2 +# select-row=BTN_LEFT-3 + +# vim: ft=dosini diff --git a/link.sh b/link.sh index 291111a..d45485d 100755 --- a/link.sh +++ b/link.sh @@ -17,4 +17,5 @@ ln -s $(pwd)/.xinitrc ~/.xinitrc ln -s $(pwd)/.winitrc ~/.winitrc ln -s $(pwd)/.Xresources ~/.Xresources ln -s $(pwd)/gtklock ~/.config -ln -s $(pwd)/base16-shell ~/.config +ln -s $(pwd)/electron-flags.conf ~/.config +ln -s $(pwd)/foot ~/.config diff --git a/nvim/init.lua b/nvim/init.lua index 46bc437..b8062e4 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -28,18 +28,30 @@ require('packer').startup(function() } use 'joshdick/onedark.vim' - -- syntax highlighting - use 'posva/vim-vue' - use 'jwalton512/vim-blade' + use 'nvim-treesitter/nvim-treesitter' + + use 'jose-elias-alvarez/null-ls.nvim' + + use 'RRethy/vim-illuminate' + + -- cmp + use "hrsh7th/nvim-cmp" + use "hrsh7th/cmp-buffer" + use "hrsh7th/cmp-path" + use "hrsh7th/cmp-nvim-lsp" + use 'L3MON4D3/LuaSnip' + use 'saadparwaiz1/cmp_luasnip' + use "hrsh7th/cmp-nvim-lua" + end) -require("basics") +require("user.basics") -function map(mode, shortcut, command) +local function map(mode, shortcut, command) vim.keymap.set(mode, shortcut, command, { noremap = true }) end -function nmap(shortcut, command) +local function nmap(shortcut, command) map('n', shortcut, command) end @@ -59,7 +71,22 @@ require("tabline").setup{ ]]) } -require("mason").setup() +local status_ok, configs = pcall(require, "nvim-treesitter.configs") +if not status_ok then + return +end + +configs.setup({ + ensure_installed = "all", + ignore_install = { "" }, + sync_install = false, + highlight = { + enable = true, + disable = { "" }, + additional_vim_regex_highlighting = true, + }, + indent = { enable = true, disable = { "yaml" } } +}) nmap("", "TablineTabNew") nmap("", "TablineBufferNext") @@ -68,3 +95,7 @@ nmap("", "bd") nmap("", "bd!") nmap("", "ls") nmap("", "Goyo") + +require('user.cmp') +require('user.lsp') + diff --git a/nvim/lua/basics.lua b/nvim/lua/user/basics.lua similarity index 92% rename from nvim/lua/basics.lua rename to nvim/lua/user/basics.lua index 0aa937c..ff02bae 100644 --- a/nvim/lua/basics.lua +++ b/nvim/lua/user/basics.lua @@ -21,6 +21,7 @@ vim.opt.cursorline = true vim.opt.cmdheight = 2 vim.opt.hidden = true vim.opt.termguicolors = true +vim.opt.completeopt = { "menu", "menuone", "noselect" } vim.cmd([[ syntax on diff --git a/nvim/lua/user/cmp.lua b/nvim/lua/user/cmp.lua new file mode 100644 index 0000000..698632b --- /dev/null +++ b/nvim/lua/user/cmp.lua @@ -0,0 +1,129 @@ +local cmp_status_ok, cmp = pcall(require, "cmp") +if not cmp_status_ok then + return +end + +local snip_status_ok, luasnip = pcall(require, "luasnip") +if not snip_status_ok then + return +end + +require("luasnip/loaders/from_vscode").lazy_load() + +local check_backspace = function() + local col = vim.fn.col(".") - 1 + return col == 0 or vim.fn.getline("."):sub(col, col):match("%s") +end + +local kind_icons = { + Text = "", + Method = "", + Function = "", + Constructor = "", + Field = "", + Variable = "", + Class = "", + Interface = "", + Module = "", + Property = "", + Unit = "", + Value = "", + Enum = "", + Keyword = "", + Snippet = "", + Color = "", + File = "", + Reference = "", + Folder = "", + EnumMember = "", + Constant = "", + Struct = "", + Event = "", + Operator = "", + TypeParameter = "", +} + +cmp.setup({ + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) -- For `luasnip` users. + end, + }, + + mapping = cmp.mapping.preset.insert({ + [""] = cmp.mapping.select_prev_item(), + [""] = cmp.mapping.select_next_item(), + [""] = cmp.mapping(cmp.mapping.scroll_docs(-1), { "i", "c" }), + [""] = cmp.mapping(cmp.mapping.scroll_docs(1), { "i", "c" }), + [""] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }), + [""] = cmp.mapping({ + i = cmp.mapping.abort(), + c = cmp.mapping.close(), + }), + -- Accept currently selected item. If none selected, `select` first item. + -- Set `select` to `false` to only confirm explicitly selected items. + [""] = cmp.mapping.confirm({ select = true }), + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expandable() then + luasnip.expand() + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + elseif check_backspace() then + fallback() + else + fallback() + end + end, { + "i", + "s", + }), + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { + "i", + "s", + }), + }), + formatting = { + fields = { "kind", "abbr", "menu" }, + format = function(entry, vim_item) + vim_item.kind = kind_icons[vim_item.kind] + vim_item.menu = ({ + nvim_lsp = "", + nvim_lua = "", + luasnip = "", + buffer = "", + path = "", + emoji = "", + })[entry.source.name] + return vim_item + end, + }, + sources = { + { name = "nvim_lsp" }, + { name = "nvim_lua" }, + { name = "luasnip" }, + { name = "buffer" }, + { name = "path" }, + }, + confirm_opts = { + behavior = cmp.ConfirmBehavior.Replace, + select = false, + }, + window = { + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), + }, + experimental = { + ghost_text = true, + }, +}) + diff --git a/nvim/lua/user/lsp/handlers.lua b/nvim/lua/user/lsp/handlers.lua new file mode 100644 index 0000000..af834b2 --- /dev/null +++ b/nvim/lua/user/lsp/handlers.lua @@ -0,0 +1,91 @@ +local M = {} + +local status_cmp_ok, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp") +if not status_cmp_ok then + return +end + +M.capabilities = vim.lsp.protocol.make_client_capabilities() +M.capabilities.textDocument.completion.completionItem.snippetSupport = true +M.capabilities = cmp_nvim_lsp.default_capabilities(M.capabilities) + +M.setup = function() + local signs = { + + { name = "DiagnosticSignError", text = "" }, + { name = "DiagnosticSignWarn", text = "" }, + { name = "DiagnosticSignHint", text = "" }, + { name = "DiagnosticSignInfo", text = "" }, + } + + for _, sign in ipairs(signs) do + vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" }) + end + + local config = { + virtual_text = false, -- disable virtual text + signs = { + active = signs, -- show signs + }, + update_in_insert = true, + underline = true, + severity_sort = true, + float = { + focusable = true, + style = "minimal", + border = "rounded", + source = "always", + header = "", + prefix = "", + }, + } + + vim.diagnostic.config(config) + + vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { + border = "rounded", + }) + + vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { + border = "rounded", + }) +end + +local function lsp_keymaps(bufnr) + local opts = { noremap = true, silent = true } + local keymap = vim.api.nvim_buf_set_keymap + keymap(bufnr, "n", "gD", "lua vim.lsp.buf.declaration()", opts) + keymap(bufnr, "n", "gd", "lua vim.lsp.buf.definition()", opts) + keymap(bufnr, "n", "K", "lua vim.lsp.buf.hover()", opts) + keymap(bufnr, "n", "gI", "lua vim.lsp.buf.implementation()", opts) + keymap(bufnr, "n", "gr", "lua vim.lsp.buf.references()", opts) + keymap(bufnr, "n", "gl", "lua vim.diagnostic.open_float()", opts) + keymap(bufnr, "n", "\\lf", "lua vim.lsp.buf.format", opts) + keymap(bufnr, "n", "\\li", "LspInfo", opts) + keymap(bufnr, "n", "\\lI", "LspInstallInfo", opts) + keymap(bufnr, "n", "\\la", "lua vim.lsp.buf.code_action()", opts) + keymap(bufnr, "n", "\\lj", "lua vim.diagnostic.goto_next({buffer=0})", opts) + keymap(bufnr, "n", "\\lk", "lua vim.diagnostic.goto_prev({buffer=0})", opts) + keymap(bufnr, "n", "\\lr", "lua vim.lsp.buf.rename()", opts) + keymap(bufnr, "n", "\\ls", "lua vim.lsp.buf.signature_help()", opts) + keymap(bufnr, "n", "\\lq", "lua vim.diagnostic.setloclist()", opts) +end + +M.on_attach = function(client, bufnr) + if client.name == "tsserver" then + client.server_capabilities.documentFormattingProvider = false + end + + if client.name == "sumneko_lua" then + client.server_capabilities.documentFormattingProvider = false + end + + lsp_keymaps(bufnr) + local status_ok, illuminate = pcall(require, "illuminate") + if not status_ok then + return + end + illuminate.on_attach(client) +end + +return M diff --git a/nvim/lua/user/lsp/init.lua b/nvim/lua/user/lsp/init.lua new file mode 100644 index 0000000..365ec50 --- /dev/null +++ b/nvim/lua/user/lsp/init.lua @@ -0,0 +1,8 @@ +local status_ok, _ = pcall(require, 'lspconfig') +if not status_ok then + return +end + +require('user.lsp.mason') +require('user.lsp.handlers').setup() +require('user.lsp.null-ls') diff --git a/nvim/lua/user/lsp/mason.lua b/nvim/lua/user/lsp/mason.lua new file mode 100644 index 0000000..9a199cf --- /dev/null +++ b/nvim/lua/user/lsp/mason.lua @@ -0,0 +1,34 @@ +local servers = { + 'sumneko_lua', + 'pyright', + 'tsserver', +} + +require('mason').setup() +require('mason-lspconfig').setup({ + ensure_installed = servers, + automatic_installation = true, +}) + +local lsp_status_ok, lspconfig = pcall(require, 'lspconfig') +if not lsp_status_ok then + return +end + +local opts = {} + +for _, server in pairs(servers) do + opts = { + on_attach = require('user.lsp.handlers').on_attach, + capabilities = require('user.lsp.handlers').capabilities, + } + + server = vim.split(server, '@')[1] + + local require_ok, conf_opts = pcall(require, 'user.lsp.settings.' .. server) + if require_ok then + opts = vim.tbl_deep_extend("force", conf_opts, opts) + end + + lspconfig[server].setup(opts) +end diff --git a/nvim/lua/user/lsp/null-ls.lua b/nvim/lua/user/lsp/null-ls.lua new file mode 100644 index 0000000..0d3fe6c --- /dev/null +++ b/nvim/lua/user/lsp/null-ls.lua @@ -0,0 +1,20 @@ +local null_ls_status_ok, null_ls = pcall(require, "null-ls") +if not null_ls_status_ok then + return +end + +-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting +local formatting = null_ls.builtins.formatting +-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics +local diagnostics = null_ls.builtins.diagnostics + +null_ls.setup({ + debug = false, + sources = { + formatting.prettier.with({ extra_args = { "--no-semi", "--single-quote", "--jsx-single-quote" } }), + formatting.black.with({ extra_args = { "--fast" } }), + formatting.stylua, + -- diagnostics.flake8 + }, +}) + diff --git a/nvim/lua/user/lsp/settings/pyright.lsp b/nvim/lua/user/lsp/settings/pyright.lsp new file mode 100644 index 0000000..c2a518d --- /dev/null +++ b/nvim/lua/user/lsp/settings/pyright.lsp @@ -0,0 +1,9 @@ +return { + settings = { + python = { + analysis = { + typeCheckingMode = "off", + }, + }, + }, +} diff --git a/nvim/lua/user/lsp/settings/sumneko_lua.lsp b/nvim/lua/user/lsp/settings/sumneko_lua.lsp new file mode 100644 index 0000000..6d27e62 --- /dev/null +++ b/nvim/lua/user/lsp/settings/sumneko_lua.lsp @@ -0,0 +1,15 @@ +return { + settings = { + Lua = { + diagnostics = { + globals = { "vim" }, + }, + workspace = { + library = { + [vim.fn.expand("$VIMRUNTIME/lua")] = true, + [vim.fn.stdpath("config") .. "/lua"] = true, + }, + }, + }, + }, +} diff --git a/nvim/plugin/packer_compiled.lua b/nvim/plugin/packer_compiled.lua new file mode 100644 index 0000000..c880406 --- /dev/null +++ b/nvim/plugin/packer_compiled.lua @@ -0,0 +1,210 @@ +-- Automatically generated packer.nvim plugin loader code + +if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then + vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"') + return +end + +vim.api.nvim_command('packadd packer.nvim') + +local no_errors, error_msg = pcall(function() + +_G._packer = _G._packer or {} +_G._packer.inside_compile = true + +local time +local profile_info +local should_profile = false +if should_profile then + local hrtime = vim.loop.hrtime + profile_info = {} + time = function(chunk, start) + if start then + profile_info[chunk] = hrtime() + else + profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 + end + end +else + time = function(chunk, start) end +end + +local function save_profiles(threshold) + local sorted_times = {} + for chunk_name, time_taken in pairs(profile_info) do + sorted_times[#sorted_times + 1] = {chunk_name, time_taken} + end + table.sort(sorted_times, function(a, b) return a[2] > b[2] end) + local results = {} + for i, elem in ipairs(sorted_times) do + if not threshold or threshold and elem[2] > threshold then + results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms' + end + end + if threshold then + table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)') + end + + _G._packer.profile_output = results +end + +time([[Luarocks path setup]], true) +local package_path_str = "/home/ayush/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/ayush/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/ayush/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/ayush/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua" +local install_cpath_pattern = "/home/ayush/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so" +if not string.find(package.path, package_path_str, 1, true) then + package.path = package.path .. ';' .. package_path_str +end + +if not string.find(package.cpath, install_cpath_pattern, 1, true) then + package.cpath = package.cpath .. ';' .. install_cpath_pattern +end + +time([[Luarocks path setup]], false) +time([[try_loadstring definition]], true) +local function try_loadstring(s, component, name) + local success, result = pcall(loadstring(s), name, _G.packer_plugins[name]) + if not success then + vim.schedule(function() + vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {}) + end) + end + return result +end + +time([[try_loadstring definition]], false) +time([[Defining packer_plugins]], true) +_G.packer_plugins = { + ["cmp-buffer"] = { + loaded = true, + path = "/home/ayush/.local/share/nvim/site/pack/packer/start/cmp-buffer", + url = "https://github.com/hrsh7th/cmp-buffer" + }, + ["cmp-nvim-lsp"] = { + loaded = true, + path = "/home/ayush/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", + url = "https://github.com/hrsh7th/cmp-nvim-lsp" + }, + ["cmp-nvim-lua"] = { + loaded = true, + path = "/home/ayush/.local/share/nvim/site/pack/packer/start/cmp-nvim-lua", + url = "https://github.com/hrsh7th/cmp-nvim-lua" + }, + ["cmp-path"] = { + loaded = true, + path = "/home/ayush/.local/share/nvim/site/pack/packer/start/cmp-path", + url = "https://github.com/hrsh7th/cmp-path" + }, + cmp_luasnip = { + loaded = true, + path = "/home/ayush/.local/share/nvim/site/pack/packer/start/cmp_luasnip", + url = "https://github.com/saadparwaiz1/cmp_luasnip" + }, + ["editorconfig.nvim"] = { + loaded = true, + path = "/home/ayush/.local/share/nvim/site/pack/packer/start/editorconfig.nvim", + url = "https://github.com/gpanders/editorconfig.nvim" + }, + ["goyo.vim"] = { + loaded = true, + path = "/home/ayush/.local/share/nvim/site/pack/packer/start/goyo.vim", + url = "https://github.com/junegunn/goyo.vim" + }, + ["lualine.nvim"] = { + loaded = true, + path = "/home/ayush/.local/share/nvim/site/pack/packer/start/lualine.nvim", + url = "https://github.com/nvim-lualine/lualine.nvim" + }, + ["mason-lspconfig.nvim"] = { + loaded = true, + path = "/home/ayush/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim", + url = "https://github.com/williamboman/mason-lspconfig.nvim" + }, + ["mason.nvim"] = { + loaded = true, + path = "/home/ayush/.local/share/nvim/site/pack/packer/start/mason.nvim", + url = "https://github.com/williamboman/mason.nvim" + }, + ["null-ls.nvim"] = { + loaded = true, + path = "/home/ayush/.local/share/nvim/site/pack/packer/start/null-ls.nvim", + url = "https://github.com/jose-elias-alvarez/null-ls.nvim" + }, + ["nvim-cmp"] = { + loaded = true, + path = "/home/ayush/.local/share/nvim/site/pack/packer/start/nvim-cmp", + url = "https://github.com/hrsh7th/nvim-cmp" + }, + ["nvim-lspconfig"] = { + loaded = true, + path = "/home/ayush/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", + url = "https://github.com/neovim/nvim-lspconfig" + }, + ["nvim-treesitter"] = { + loaded = true, + path = "/home/ayush/.local/share/nvim/site/pack/packer/start/nvim-treesitter", + url = "https://github.com/nvim-treesitter/nvim-treesitter" + }, + ["nvim-web-devicons"] = { + loaded = false, + needs_bufread = false, + path = "/home/ayush/.local/share/nvim/site/pack/packer/opt/nvim-web-devicons", + url = "https://github.com/kyazdani42/nvim-web-devicons" + }, + ["onedark.vim"] = { + loaded = true, + path = "/home/ayush/.local/share/nvim/site/pack/packer/start/onedark.vim", + url = "https://github.com/joshdick/onedark.vim" + }, + ["packer.nvim"] = { + loaded = true, + path = "/home/ayush/.local/share/nvim/site/pack/packer/start/packer.nvim", + url = "https://github.com/wbthomason/packer.nvim" + }, + ["plenary.nvim"] = { + loaded = true, + path = "/home/ayush/.local/share/nvim/site/pack/packer/start/plenary.nvim", + url = "https://github.com/nvim-lua/plenary.nvim" + }, + ["powerline-fonts"] = { + loaded = true, + path = "/home/ayush/.local/share/nvim/site/pack/packer/start/powerline-fonts", + url = "https://github.com/powerline/powerline-fonts" + }, + ["tabline.nvim"] = { + loaded = true, + path = "/home/ayush/.local/share/nvim/site/pack/packer/start/tabline.nvim", + url = "https://github.com/kdheepak/tabline.nvim" + }, + ["telescope-fzf-native.nvim"] = { + loaded = true, + path = "/home/ayush/.local/share/nvim/site/pack/packer/start/telescope-fzf-native.nvim", + url = "https://github.com/nvim-telescope/telescope-fzf-native.nvim" + }, + ["telescope.nvim"] = { + loaded = true, + path = "/home/ayush/.local/share/nvim/site/pack/packer/start/telescope.nvim", + url = "https://github.com/nvim-telescope/telescope.nvim" + }, + ["vim-illuminate"] = { + loaded = true, + path = "/home/ayush/.local/share/nvim/site/pack/packer/start/vim-illuminate", + url = "https://github.com/RRethy/vim-illuminate" + } +} + +time([[Defining packer_plugins]], false) + +_G._packer.inside_compile = false +if _G._packer.needs_bufread == true then + vim.cmd("doautocmd BufRead") +end +_G._packer.needs_bufread = false + +if should_profile then save_profiles() end + +end) + +if not no_errors then + error_msg = error_msg:gsub('"', '\\"') + vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None') +end diff --git a/sway/config b/sway/config index 3194a89..6f0ca1e 100644 --- a/sway/config +++ b/sway/config @@ -1,6 +1,7 @@ # set edp output eDP-1 { - mode 1920x1080@144.003Hz + mode 1920x1080@60.004Hz + # mode 1920x1080@144.003Hz scale 1.25 adaptive_sync on } @@ -80,7 +81,7 @@ bindsym $mod+v split v bindsym $mod+f fullscreen toggle # change container layout (stacked, tabbed, toggle split) -bindsym $mod+s layout stacking +#bindsym $mod+s layout stacking bindsym $mod+w layout tabbed bindsym $mod+e layout toggle split @@ -205,11 +206,8 @@ gaps inner 20 # set smart gaps #smart_gaps on -# ws 4 no gaps -workspace $ws4 gaps inner 0 - # set desktop bg -exec_always --no-startup-id swaybg -i ~/.config/i3/wall.jpg -m stretch +exec_always --no-startup-id swaybg -i ~/.config/sway/wall.jpg -m stretch # start picom, config: .config/picom.conf #exec --no-startup-id dbus-launch picom --experimental-backend @@ -227,15 +225,15 @@ exec --no-startup-id nm-applet --indicator bindsym Ctrl+space exec dunstctl close bindsym Ctrl+Shift+space exec dunstctl close-all -# take screenshot using gnome-screenshot -#bindsym $mod+s exec gnome-screenshot -c +# take screenshot +#bindsym --release $mod+Control+s exec "gnome-screenshot -c" #bindsym --release $mod+Control+s exec "import -format png -window root /tmp/ss.png && xclip -i /tmp/ss.png -selection c -t image/png && mv /tmp/ss.png ~/Pictures/Screenshots/Screenshot-$(date +%s).png" -bindsym --release $mod+Control+s exec "grim /tmp/ss.png && wl-copy