parent
c8992c9463
commit
48cd17a29a
|
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/zsh
|
||||||
|
|
||||||
|
source /etc/*release
|
||||||
|
|
||||||
|
typeset -A distro_mgr;
|
||||||
|
distro_mgr[debian]=apt-get
|
||||||
|
distro_mgr[ubuntu]=apt-get
|
||||||
|
distro_mgr[centos]=yum
|
||||||
|
distro_mgr[redhat]=yum
|
||||||
|
distro_mgr[arch]=pacman
|
||||||
|
distro_mgr[manjaro]=pacman
|
||||||
|
distro_mgr[void]=xbps-install
|
||||||
|
|
||||||
|
for key val in ${(@kv)distro_mgr}
|
||||||
|
do
|
||||||
|
if [[ $key = $ID ]];
|
||||||
|
then
|
||||||
|
echo Package manager: $val
|
||||||
|
fi
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
|
|
@ -71,6 +71,10 @@ call plug#begin()
|
||||||
|
|
||||||
" Visual Studio Code plugins
|
" Visual Studio Code plugins
|
||||||
|
|
||||||
|
" code formatter
|
||||||
|
" https://github.com/mhartington/formatter.nvim
|
||||||
|
Plug 'mhartington/formatter.nvim'
|
||||||
|
|
||||||
" coloured icons & explorer
|
" coloured icons & explorer
|
||||||
" https://github.com/nvim-tree/nvim-tree.lua
|
" https://github.com/nvim-tree/nvim-tree.lua
|
||||||
Plug 'nvim-tree/nvim-tree.lua'
|
Plug 'nvim-tree/nvim-tree.lua'
|
||||||
|
|
@ -165,8 +169,31 @@ call plug#begin()
|
||||||
|
|
||||||
au VimEnter * lua vim.opt.guifont='Hurmit NF:style=bold'
|
au VimEnter * lua vim.opt.guifont='Hurmit NF:style=bold'
|
||||||
|
|
||||||
|
" mhartington/formatter.nvim
|
||||||
|
" format after save
|
||||||
|
|
||||||
|
augroup FormatAutogroup
|
||||||
|
autocmd!
|
||||||
|
autocmd BufWritePost * FormatWrite
|
||||||
|
augroup END
|
||||||
|
|
||||||
" loading lua scripts
|
" loading lua scripts
|
||||||
|
|
||||||
|
" mhartington/formatter.nvim loading
|
||||||
|
|
||||||
|
au VimEnter * lua require('formatter').setup({
|
||||||
|
\ logging = false,
|
||||||
|
\ filetype = {
|
||||||
|
\ python = {
|
||||||
|
\ require('formatter.filetypes.python').black
|
||||||
|
\ },
|
||||||
|
\ ["*"] = {
|
||||||
|
\ require('formatter.filetypes.any').remove_trailing_whitespace
|
||||||
|
\ }
|
||||||
|
\ }
|
||||||
|
\ })
|
||||||
|
|
||||||
|
|
||||||
" vscode.nvim loading
|
" vscode.nvim loading
|
||||||
|
|
||||||
au VimEnter * lua vim.o.background = "dark"
|
au VimEnter * lua vim.o.background = "dark"
|
||||||
|
|
@ -309,6 +336,8 @@ call plug#begin()
|
||||||
|
|
||||||
" set tab size
|
" set tab size
|
||||||
set tabstop=4
|
set tabstop=4
|
||||||
|
set shiftwidth=4
|
||||||
|
set expandtab
|
||||||
|
|
||||||
" install plugins automatically
|
" install plugins automatically
|
||||||
autocmd VimEnter *
|
autocmd VimEnter *
|
||||||
|
|
@ -344,6 +373,9 @@ call plug#begin()
|
||||||
|
|
||||||
" files
|
" files
|
||||||
|
|
||||||
|
" H - shows or hides hidden files
|
||||||
|
" I - show ignored files by .gitignore
|
||||||
|
|
||||||
" a - (add) allows the creation of files or folders, creating a folder is done by following the name with the slash /.
|
" a - (add) allows the creation of files or folders, creating a folder is done by following the name with the slash /.
|
||||||
" E.g. /nvchad/nvimtree.md will create the related markdown file while /nvchad/nvimtree/ will create the nvimtree
|
" E.g. /nvchad/nvimtree.md will create the related markdown file while /nvchad/nvimtree/ will create the nvimtree
|
||||||
" folder. The creation will occur by default at the location where the cursor is in the file explorer at that time,
|
" folder. The creation will occur by default at the location where the cursor is in the file explorer at that time,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue