diff options
author | justanothercatgirl <sotov2070@gmail.com> | 2024-05-21 18:10:21 +0300 |
---|---|---|
committer | justanothercatgirl <sotov2070@gmail.com> | 2024-05-21 18:10:21 +0300 |
commit | b2b543355c03ec24281d05380f92e2e793e511f4 (patch) | |
tree | 26bf76b6da4a16aa9b5dbb9549eadf13144d2594 | |
parent | 551cd0d2a7a599011393ba39b74e31f25425748c (diff) |
added some changes to neovim config
-rw-r--r-- | .bashrc | 1 | ||||
-rwxr-xr-x | .config/i3status/check_proxy.py | 27 | ||||
-rw-r--r-- | .config/nvim/init.lua | 1 | ||||
-rw-r--r-- | .config/nvim/lua/user/coderunner.lua | 2 | ||||
-rw-r--r-- | .config/nvim/lua/user/debugger.lua | 36 | ||||
-rw-r--r-- | .config/nvim/lua/user/lsp/python.lua | 9 | ||||
-rw-r--r-- | .config/nvim/lua/user/plugins.lua | 18 | ||||
-rw-r--r-- | .config/sakura/sakura.conf | 2 | ||||
-rw-r--r-- | .xinitrc | 1 | ||||
-rw-r--r-- | .zshrc | 102 |
10 files changed, 94 insertions, 105 deletions
@@ -14,6 +14,7 @@ alias psiphon="psiphon-console-client" alias cppreference="microsoft-edge-dev /usr/share/doc/cppreference/en/cpp.html" alias lan="/home/main/zerotierconnect.sh" alias python=/home/main/coding/py/venv/bin/python3 +alias pdf=mupdf # shell options shopt -s autocd diff --git a/.config/i3status/check_proxy.py b/.config/i3status/check_proxy.py new file mode 100755 index 0000000..a444a1d --- /dev/null +++ b/.config/i3status/check_proxy.py @@ -0,0 +1,27 @@ +#!/usr/bin/env /usr/bin/python3 + +import os +import json +import requests + +def check_proxy(): + return os.getenv("PROXY_ON_JCG") != None or os.getenv("HTTP_PROXY") != None or os.getenv("HTTPS_PROXY") != None + +def extract_address(): + return os.getenv("HTTPS_PROXY")[8:-5] + +def get_public_ip(): + return requests.get("https://api.ipify.org/").text + +if __name__ == "__main__": + if check_proxy(): + output_string = { + "full_text": f" {extract_address()}", + "color": "#00FF00", + } + else: + output_string = { + "full_text": f" N/A", + "color": "#FF0000", + } + print(json.dumps(output_string)) diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 76b4b98..4039a41 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -6,5 +6,6 @@ require "user.toggleterm" require "user.lspinit" require "user.treesitter" require "user.coderunner" +require "user.debugger" -- autocmd to load lsp seems to break it diff --git a/.config/nvim/lua/user/coderunner.lua b/.config/nvim/lua/user/coderunner.lua index 8dea6b4..77330ab 100644 --- a/.config/nvim/lua/user/coderunner.lua +++ b/.config/nvim/lua/user/coderunner.lua @@ -16,5 +16,7 @@ require('code_runner').setup({ 'cd ..' vim.cmd(string.format("TermExec cmd='%s'", script)) end, + python = 'python3 $file', + tex = 'mkdir -p build && pdflatex -output-directory=build -output-format=PDF $file' }, }) diff --git a/.config/nvim/lua/user/debugger.lua b/.config/nvim/lua/user/debugger.lua new file mode 100644 index 0000000..98a2bb2 --- /dev/null +++ b/.config/nvim/lua/user/debugger.lua @@ -0,0 +1,36 @@ +local dap = require('dap') + +-- try getting arguments +-- function() +-- local string = vim.ui.input("arguments to program:") +-- local t = {} +-- for str in string.gmatch(string, "([^ ]+)") do +-- table.insert(str) +-- end +-- return t +-- end, + + +lldb = { + name = "LLDB", + type = "lldb", + request = "launch", + program = function() + return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file") + end, + cwd = "${workspaceFolder}", + stopOnEntry = false, + args = {}, + runInTerminal = false +} + +dap.adapters.lldb = { + type = "executable", + command = "/usr/bin/lldb-vscode", + name = "lldb" +} + +dap.configurations = { + cpp = { lldb }, + rust = { lldb }, +} diff --git a/.config/nvim/lua/user/lsp/python.lua b/.config/nvim/lua/user/lsp/python.lua index 5cd4a2e..2b073be 100644 --- a/.config/nvim/lua/user/lsp/python.lua +++ b/.config/nvim/lua/user/lsp/python.lua @@ -1 +1,10 @@ lsp = require 'lspconfig' + +lsp.pylsp.setup { + cmd = {"pylsp"}, + filetypes = {"py", "python"}, + root_dir = lsp.util.root_pattern("main.py", "configure", "Makefile", ".git"), + init_options = { + + }, +} diff --git a/.config/nvim/lua/user/plugins.lua b/.config/nvim/lua/user/plugins.lua index 7b7e31d..06b52d1 100644 --- a/.config/nvim/lua/user/plugins.lua +++ b/.config/nvim/lua/user/plugins.lua @@ -4,7 +4,7 @@ plugins = { { "folke/lazy.nvim" }, -- plugin manager - { "nvim-lua/popup.nvim" }, -- some functions for other plugins + { "nvim-lua/popup.nvim" }, -- some functions for other plugin { "nvim-lua/plenary.nvim" }, -- some functions for other plugins { "folke/which-key.nvim" }, -- pretty self-descriptive name @@ -13,6 +13,12 @@ plugins = { { "folke/tokyonight.nvim" }, -- colorschemes + { + "smoka7/multicursors.nvim", + event = "VeryLazy", + dependencies = { 'smoka7/hydra.nvim' }, + cmd = { 'MCstart', 'MCvisual', 'MCclear', 'MCpattern', 'MCvisualPattern', 'MCunderCursor' }, + }, { "tpope/vim-commentary" }, -- gc & gcc for commenting { "preservim/nerdtree" }, -- file explorer { @@ -100,12 +106,18 @@ plugins = { end, }, { - 'akinsho/bufferline.nvim', -- tab & buffer line + "akinsho/bufferline.nvim", -- tab & buffer line version = "*", -- dependencies = 'nvim-tree/nvim-web-devicons' -- for more details on how to configure this plugin in details please see `:h bufferline-configuration` }, --{ "lvimuser/lsp-inlayhints.nvim" } -- saved for the better times + + -- DEBUGGER CONFIGURATION + { + "mfussenegger/nvim-dap", -- the DAP itself + event = { "InsertEnter" }, + }, } @@ -140,3 +152,5 @@ require('blame').setup{ date_format = "%H:%M:%S %Y-%m-%d", merge_consecutive = true, } + +require'multicursors'.setup {} diff --git a/.config/sakura/sakura.conf b/.config/sakura/sakura.conf index caeaa49..83962ab 100644 --- a/.config/sakura/sakura.conf +++ b/.config/sakura/sakura.conf @@ -32,7 +32,7 @@ colorset6_key=F6 last_colorset=1 bold_is_bright=false scroll_lines=4096 -font=OverpassM Nerd Font 12 +font=OverpassM Nerd Font 13 show_tab_bar=multiple scrollbar=false closebutton=false @@ -1,2 +1,3 @@ +/etc/X11/xinit/xinitrc xrdb ~/.Xresources exec i3 @@ -1,102 +0,0 @@ -# If you come from bash you might have to change your $PATH. -export PATH=$HOME/bin:/usr/local/bin:$PATH - -# Path to your oh-my-zsh installation. -export ZSH="$HOME/.oh-my-zsh" - -# Set name of the theme to load --- if set to "random", it will -# load a random theme each time oh-my-zsh is loaded, in which case, -# to know which specific one was loaded, run: echo $RANDOM_THEME -# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes -ZSH_THEME="robbyrussell" -# ZSH_THEME="random" - -# Set list of themes to pick from when loading at random -# Setting this variable when ZSH_THEME=random will cause zsh to load -# a theme from this variable instead of looking in $ZSH/themes/ -# If set to an empty array, this variable will have no effect. -# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) - -# Uncomment the following line to use case-sensitive completion. -# CASE_SENSITIVE="true" - -# Uncomment the following line to use hyphen-insensitive completion. -# Case-sensitive completion must be off. _ and - will be interchangeable. -# HYPHEN_INSENSITIVE="true" - -# Uncomment one of the following lines to change the auto-update behavior -# zstyle ':omz:update' mode disabled # disable automatic updates -# zstyle ':omz:update' mode auto # update automatically without asking -# zstyle ':omz:update' mode reminder # just remind me to update when it's time - -# Uncomment the following line to change how often to auto-update (in days). -# zstyle ':omz:update' frequency 13 - -# Uncomment the following line if pasting URLs and other text is messed up. -# DISABLE_MAGIC_FUNCTIONS="true" - -# Uncomment the following line to disable colors in ls. -# DISABLE_LS_COLORS="true" - -# Uncomment the following line to disable auto-setting terminal title. -# DISABLE_AUTO_TITLE="true" - -# Uncomment the following line to enable command auto-correction. -ENABLE_CORRECTION="true" - -# Uncomment the following line to display red dots whilst waiting for completion. -# You can also set it to another string to have that shown instead of the default red dots. -# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" -# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) -# COMPLETION_WAITING_DOTS="true" - -# Uncomment the following line if you want to disable marking untracked files -# under VCS as dirty. This makes repository status check for large repositories -# much, much faster. -# DISABLE_UNTRACKED_FILES_DIRTY="true" - -# Uncomment the following line if you want to change the command execution time -# stamp shown in the history command output. -# You can set one of the optional three formats: -# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" -# or set a custom format using the strftime function format specifications, -# see 'man strftime' for details. -# HIST_STAMPS="mm/dd/yyyy" - -# Would you like to use another custom folder than $ZSH/custom? -# ZSH_CUSTOM=/path/to/new-custom-folder - -# Which plugins would you like to load? -# Standard plugins can be found in $ZSH/plugins/ -# Custom plugins may be added to $ZSH_CUSTOM/plugins/ -# Example format: plugins=(rails git textmate ruby lighthouse) -# Add wisely, as too many plugins slow down shell startup. -plugins=(git) - -source $ZSH/oh-my-zsh.sh - -# User configuration - -# export MANPATH="/usr/local/man:$MANPATH" - -# You may need to manually set your language environment -# export LANG=en_US.UTF-8 - -# Preferred editor for local and remote sessions -# if [[ -n $SSH_CONNECTION ]]; then -# export EDITOR='vim' -# else -# export EDITOR='mvim' -# fi - -# Compilation flags -# export ARCHFLAGS="-arch x86_64" - -# Set personal aliases, overriding those provided by oh-my-zsh libs, -# plugins, and themes. Aliases can be placed here, though oh-my-zsh -# users are encouraged to define aliases within the ZSH_CUSTOM folder. -# For a full list of active aliases, run `alias`. -# -# Example aliases -# alias zshconfig="mate ~/.zshrc" -# alias ohmyzsh="mate ~/.oh-my-zsh" |