Skip to content

Commit

Permalink
KJFA
Browse files Browse the repository at this point in the history
  • Loading branch information
ediw8311xht committed Nov 25, 2024
1 parent aedb3d6 commit b18e287
Show file tree
Hide file tree
Showing 9 changed files with 95 additions and 65 deletions.
5 changes: 2 additions & 3 deletions bashrc_files/aliases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ alias mdview=' markdown_view_w3m "$( fd -tf ".*[.]md" | fzf)"'
alias htmlcheck=' xmllint --html'
alias ac=' compgen -c | grep -x'
alias cz=' ccze -m ansi'
alias e=' open_in_emacs_client'
alias e=' manage_emacs.sh -n'
alias g=' grep -Pi'
alias r=' \rg --pcre2 -i'
alias t=' trash-put'
Expand Down Expand Up @@ -170,7 +170,7 @@ alias getfont=' fc-list -v | grep -i '
alias gital=' git log --source --all -S'
alias git_mt=' git log --pretty=format:"%h %s" --graph'
alias gport=' netstat -lntu | grep -Pi'
alias grab_dir=' xcmenu --input --clipboard "$(pwd)"'
alias gd=' xclip -selection "clipboard" <<< "${PWD}"'
alias img=' nsxiv -0'
alias ldi=' fdisk -l -o +uuid'
alias list_coms=' compgen -c'
Expand Down Expand Up @@ -215,4 +215,3 @@ alias betterkey=' showkey -k'
#alias isport=' (read _z; ss -lp "sport = :${_z}") <<< '
#alias gg=' grep -P -r -i'
#alias ic=' clear; imgcat'
#alias gd=' xcmenu --input --clipboard "$(pwd)"'
1 change: 1 addition & 0 deletions bashrc_files/exports.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export MOST_EDITOR='nvim'
export PAGER='most'
export LESSOPEN='|pygmentize -g %s'
export LESS='-R'
export DMENU_SCRIPT="${HOME}/bin/my_dmenu.sh"
#------------------MULTI-LEVEL---------#
export MY_INFORMATION="${DOCUMENTS}/INFORMATION"
export SPREADSHEETS="${DOCUMENTS}/SPREADSHEETS"
Expand Down
1 change: 1 addition & 0 deletions i3wm/regular_bindings.conf
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ $SF u $_ exec /usr/bin/kitty --title='i3s_kitty_term'
$SF v $_ split h
$SF x $_ exec $clipboard_script "DATE" "TIME"

$Br_CTRL m $_ mark --add "g"
$SF_CTRL e $_ exec $zathura_script -o
$SF_CTRL h $B1 move left 20px
$SF_CTRL j $B1 move down 20px
Expand Down
1 change: 1 addition & 0 deletions lf/lfrc
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ map e np
map m push :!mkdir<space>
map o &mimeopen $fx #-----------OPEN IN NEW WINDOW------------------------------#
map r set reverse!
map t push :!touch<space>
map x cut
## remove filter with <c-r>
#------------------------------------------------------------------#
Expand Down
1 change: 0 additions & 1 deletion nvim/init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ let g:lf_map_keys = 0
let g:html_mode = 1
let g:is_bash = 1
let g:vlime_leader = "~"

"-------Latex----------"
let g:tex_flavor='latex'
let g:vimtex_view_method='zathura'
Expand Down
30 changes: 22 additions & 8 deletions nvim/language_specific/templates/template.tex
Original file line number Diff line number Diff line change
@@ -1,19 +1,33 @@

%! TeX program = xelatex

\documentclass[12pt]{scrartcl}
\documentclass[11pt]{scrartcl}
\usepackage{fontspec}
\usepackage{inconsolata}
\usepackage[a4paper, total={8in, 10in}] {geometry}
\usepackage{amsfonts}
% \usepackage{inconsolata}
% \usepackage[paperheight=8.5in,paperwidth=13.0in,margin=0.1in,headheight=0.0in,footskip=0.5in]{geometry}
\usepackage{listings}
\usepackage[paperheight=40in,paperwidth=12in,margin=0.5in,heightrounded]{geometry}
\usepackage{array}
\usepackage{makecell}
\usepackage[fleqn]{amsmath}
\usepackage{graphicx}
\usepackage{xfrac}
\usepackage[svgnames]{xcolor}
\setlength{\mathindent}{0pt}
% \pagecolor{black}
\setmainfont[Color=black]{FantasqueSansMono Nerd Font Mono}
\setsansfont[Color=black]{FantasqueSansMono Nerd Font Mono}
\setmonofont[Color=black]{FantasqueSansMono Nerd Font Mono}
\setlength{\mathindent}{22pt}
\addtokomafont{section}{\color{MediumBlue}}
\addtokomafont{subsection}{\color{Black}}
\addtokomafont{subsubsection}{\normalfont\itshape\subsubsectionfont}
\addtokomafont{subsection}{\color{black}}
\addtokomafont{subsubsection}{\color{black}}

\begin{document}

%------------------------------
% For tables
%------------------------------
\renewcommand{\arraystretch}{4}
\renewcommand{\cellalign}{l}
%------------------------------
\mathversion{bold}
\end{document}
12 changes: 10 additions & 2 deletions nvim/lua/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local va = vim.api;
local vauto = vim.api.nvim_create_autocmd
local vc = vim.cmd

function env_var_check(var)
function EnvVarCheck(var)
local e = os.getenv(var)
if e == nil or e == '' then
return false
Expand All @@ -13,7 +13,15 @@ function env_var_check(var)
end

function ClipBoardExit()
if env_var_check("$DISPLAY") and va.executable("xclip") then
if EnvVarCheck("$DISPLAY") and va.executable("xclip") then
va.system('xclip -selection clipboard -i -r <<< ', va.getreg('a'))
end
end
function Contains(t, v)
for _,i in ipairs(t) do
if v == i then
return true
end
end
return false
end
24 changes: 14 additions & 10 deletions nvim/lua/mytreesitter.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

DisabledLangs = { "txt", "help", "vimdoc", "vim", "doc", "man", "plantuml" }
local treesitter = require('nvim-treesitter.configs')

treesitter.setup {
Expand Down Expand Up @@ -26,20 +27,23 @@ treesitter.setup {
-- the name of the parser)
-- list of language that will be disabled

disable = function(_, bufnr) -- Disable in large buffers
return vim.api.nvim_buf_line_count(bufnr) > 2000
end,
-- disable = function(_, bufnr) -- Disable in large buffers
-- return vim.api.nvim_buf_line_count(bufnr) > 2000
-- end,
-- disable = { "txt", "help", "vimdoc", "vim", "doc", "man" },
-- disable = {},

-- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files
-- disable = function(lang, buf)
-- local max_filesize = 100 * 1024 -- 100 KB
-- local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
-- if ok and stats and stats.size > max_filesize then
-- return true
-- end
-- end,
disable = function(lang, buf)
if Contains(DisabledLangs, lang) then
return true
end
local max_filesize = 100 * 1024 -- 100 KB
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then
return true
end
end,

-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
Expand Down
85 changes: 44 additions & 41 deletions nvim/plugins.vim
Original file line number Diff line number Diff line change
@@ -1,46 +1,49 @@

let g:my_plugins = {
\ "luasnip": [ 'L3MON4D3', 'LuaSnip' ],
\ "cmp": [ 'hrsh7th', 'cmp-nvim-lsp' ],
\ "cmp buffer": [ 'hrsh7th', 'cmp-buffer' ],
\ "cmp cmdline": [ 'hrsh7th', 'cmp-cmdline' ],
\ "cmp env": [ 'SergioRibera', 'cmp-dotenv' ],
\ "cmp luasnip": [ 'saadparwaiz1', 'cmp_luasnip' ],
\ "cmp path": [ 'hrsh7th', 'cmp-path' ],
\ 'cmp plain english': [ 'uga-rosa', 'cmp-dictionary' ],
\ "devicons": [ 'nvim-tree', 'nvim-web-devicons' ],
\ "elixir": [ 'elixir-tools', 'elixir-tools.nvim' ],
\ "elixirfiledetect": [ 'elixir-editors', 'vim-elixir' ],
\ "floatterm": [ 'voldikss', 'vim-floaterm' ],
\ "fzf": [ 'junegunn', 'fzf.vim' ],
\ "git": [ 'lewis6991', 'gitsigns.nvim' ],
\ "lf": [ 'ptzz', 'lf.vim' ],
\ "lisp paredit": [ 'vim-scripts', 'paredit.vim' ],
\ "lisp vlime": [ 'vlime', 'vlime', {'rtp': 'vim/'} ],
\ "live preview html": [ 'turbio', 'bracey.vim', {'do': 'npm install --prefix server'} ],
\ "lspconfig": [ 'neovim', 'nvim-lspconfig' ],
\ "lsp lines": [ 'maan2003', 'lsp_lines.nvim' ],
\ "lsp saga": [ 'nvimdev', 'lspsaga.nvim' ],
\ "lsp statusline": [ 'nvim-lua', 'lsp-status.nvim' ],
\ "markdown preview": [ 'iamcco', 'markdown-preview.nvim', { 'do': 'cd app && yarn install' } ],
\ "marks": [ 'chentoast', 'marks.nvim' ],
\ "neoterm": [ 'kassio', 'neoterm' ],
\ "nui": [ 'MunifTanjim', 'nui.nvim' ],
\ "nvim cmp": [ 'hrsh7th', 'nvim-cmp' ],
\ "orgmode": [ 'nvim-orgmode', 'orgmode' ],
\ "plenary": [ 'nvim-lua', 'plenary.nvim' ],
\ "restore view": [ 'vim-scripts', 'restore_view.vim' ],
\ "show key hints": [ 'folke', 'which-key.nvim' ],
\ "tokyonight": [ 'folke', 'tokyonight.nvim' ],
\ "treesitter": [ 'nvim-treesitter', 'nvim-treesitter', {'do': ':TSUpdate'} ],
\ "treesitter-extra": [ 'nvim-treesitter', 'nvim-treesitter-textobjects' ],
\ "i3 syntax": [ 'PotatoesMaster', 'i3-vim-syntax' ],
\ "lf syntax": [ 'VebbNix', 'lf-vim' ],
\ "vimwiki": [ 'vimwiki', 'vimwiki' ],
\ 'luarocks for nvim': [ 'theHamsta', 'nvim_rocks', {'do': 'pipx install hererocks && python3 -mhererocks . -j2.1.0-beta3 -r3.0.0 && cp nvim_rocks.lua lua'}],
\ 'vim latex': [ 'lervag', 'vimtex' ],
\ 'vim latex snips for vimtex': [ 'micangl', 'cmp-vimtex' ],
\}
\ "luasnip": [ 'L3MON4D3', 'LuaSnip' ],
\ "cmp": [ 'hrsh7th', 'cmp-nvim-lsp' ],
\ "cmp buffer": [ 'hrsh7th', 'cmp-buffer' ],
\ "cmp cmdline": [ 'hrsh7th', 'cmp-cmdline' ],
\ "cmp env": [ 'SergioRibera', 'cmp-dotenv' ],
\ "cmp luasnip": [ 'saadparwaiz1', 'cmp_luasnip' ],
\ "cmp path": [ 'hrsh7th', 'cmp-path' ],
\ 'cmp plain english': [ 'uga-rosa', 'cmp-dictionary' ],
\ "devicons": [ 'nvim-tree', 'nvim-web-devicons' ],
\ "elixir": [ 'elixir-tools', 'elixir-tools.nvim' ],
\ "elixirfiledetect": [ 'elixir-editors', 'vim-elixir' ],
\ "floatterm": [ 'voldikss', 'vim-floaterm' ],
\ "fzf": [ 'junegunn', 'fzf.vim' ],
\ "git": [ 'lewis6991', 'gitsigns.nvim' ],
\ "lf": [ 'ptzz', 'lf.vim' ],
\ "lisp paredit": [ 'vim-scripts', 'paredit.vim' ],
\ "lisp vlime": [ 'vlime', 'vlime', {'rtp': 'vim/'} ],
\ "live preview html": [ 'turbio', 'bracey.vim', {'do': 'npm install --prefix server'} ],
\ "lspconfig": [ 'neovim', 'nvim-lspconfig' ],
\ "lsp lines": [ 'maan2003', 'lsp_lines.nvim' ],
\ "lsp saga": [ 'nvimdev', 'lspsaga.nvim' ],
\ "lsp statusline": [ 'nvim-lua', 'lsp-status.nvim' ],
\ "markdown preview": [ 'iamcco', 'markdown-preview.nvim', { 'do': 'cd app && yarn install' } ],
\ "marks": [ 'chentoast', 'marks.nvim' ],
\ "neoterm": [ 'kassio', 'neoterm' ],
\ "nui": [ 'MunifTanjim', 'nui.nvim' ],
\ "nvim cmp": [ 'hrsh7th', 'nvim-cmp' ],
\ "orgmode": [ 'nvim-orgmode', 'orgmode' ],
\ "plenary": [ 'nvim-lua', 'plenary.nvim' ],
\ "restore view": [ 'vim-scripts', 'restore_view.vim' ],
\ "show key hints": [ 'folke', 'which-key.nvim' ],
\ "tokyonight": [ 'folke', 'tokyonight.nvim' ],
\ "treesitter": [ 'nvim-treesitter', 'nvim-treesitter', {'do': ':TSUpdate'} ],
\ "treesitter-extra": [ 'nvim-treesitter', 'nvim-treesitter-textobjects' ],
\ "i3 syntax": [ 'PotatoesMaster', 'i3-vim-syntax' ],
\ "lf syntax": [ 'VebbNix', 'lf-vim' ],
\ "vimwiki": [ 'vimwiki', 'vimwiki' ],
\ 'luarocks for nvim': [ 'theHamsta', 'nvim_rocks', {'do': 'pipx install hererocks && python3 -mhererocks . -j2.1.0-beta3 -r3.0.0 && cp nvim_rocks.lua lua'}],
\ 'vim latex': [ 'lervag', 'vimtex' ],
\ 'vim latex snips for vimtex': [ 'micangl', 'cmp-vimtex' ],
\ 'Sidebar file explorer': [ 'preservim', 'nerdtree' ],
\ 'PlantUML Syntax': [ 'aklt', 'plantuml-syntax' ],
\ }
"https://github.com/aklt/plantuml-syntax.git
"\ 'latex lsp': [ 'latex-lsp', 'texlab' ],
"\ 'vim latex snippest': [ 'evesdropper', 'luasnip-latex-snippets.nvim' ],
"\ 'latex cmp': [ 'kdheepak', 'cmp-latex-symbols' ],
Expand Down

0 comments on commit b18e287

Please sign in to comment.