From 45186b5796b0c50914b7beff09962c2af4706a30 Mon Sep 17 00:00:00 2001 From: Harish Karumuthil Date: Tue, 19 Sep 2023 00:02:37 +0530 Subject: [PATCH] Added installer script --- home/.bashrc | 9 ++++-- home/.config/alacritty/alacritty.yml | 4 +-- home/.local/Apps/daily-utils/binaries.lst | 3 -- .../Apps/neovim-distros/lunarvim/config.lua | 28 ++++++++++++++--- home/.local/Apps/neovim-distros/lunarvim/nvim | 1 + install.sh | 31 +++++++++++++++++++ 6 files changed, 65 insertions(+), 11 deletions(-) create mode 120000 home/.local/Apps/neovim-distros/lunarvim/nvim create mode 100755 install.sh diff --git a/home/.bashrc b/home/.bashrc index 681d012..b42d2a2 100644 --- a/home/.bashrc +++ b/home/.bashrc @@ -42,8 +42,13 @@ then fi -. /usr/share/fzf/shell/key-bindings.bash -. $HOME/Projects/Github/dotFiles/home/.local/Apps/daily-utils/hari-autocomplete.sh +if [[ -f /usr/share/fzf/shell/key-bindings.bash ]]; then + . /usr/share/fzf/shell/key-bindings.bash +fi + +if [[ -f $HOME/.local/Apps/daily-utils/hari-autocomplete.sh ]]; then + . $HOME/.local/Apps/daily-utils/hari-autocomplete.sh +fi #export PS1='\e[1;36;40m[\u@\h\e[1;33;40m \W]\e[0;37;40m\$ ' PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] ' diff --git a/home/.config/alacritty/alacritty.yml b/home/.config/alacritty/alacritty.yml index 1492eee..12db9bf 100644 --- a/home/.config/alacritty/alacritty.yml +++ b/home/.config/alacritty/alacritty.yml @@ -1,8 +1,8 @@ font: - size: 13.0 + size: 14.0 normal: # family: Source Code Pro Medium - family: DejaVuSansMono Nerd Font Mono + family: CodeNewRoman Nerd Font Mono key_bindings: - { key: Return, mods: Shift, chars: "\e[13;2u" } diff --git a/home/.local/Apps/daily-utils/binaries.lst b/home/.local/Apps/daily-utils/binaries.lst index 388db80..4b7b692 100644 --- a/home/.local/Apps/daily-utils/binaries.lst +++ b/home/.local/Apps/daily-utils/binaries.lst @@ -3,7 +3,4 @@ ./bin/bash-session ./bin/ibus-next-engine.py ./bin/csv-split-by-col.py -./bin/dasel_linux_amd64 -./bin/octosql -./bin/dsq ./bin/sway-wp-switch diff --git a/home/.local/Apps/neovim-distros/lunarvim/config.lua b/home/.local/Apps/neovim-distros/lunarvim/config.lua index d8c2e52..6b466e9 100644 --- a/home/.local/Apps/neovim-distros/lunarvim/config.lua +++ b/home/.local/Apps/neovim-distros/lunarvim/config.lua @@ -39,6 +39,10 @@ lvim.builtin.terminal.active = true lvim.builtin.nvimtree.setup.view.side = "left" lvim.builtin.nvimtree.setup.renderer.icons.show.git = false + +lvim.builtin.lualine.sections.lualine_b = { 'branch', '%f' } + + -- Automatically install missing parsers when entering buffer lvim.builtin.treesitter.auto_install = true @@ -49,6 +53,8 @@ lvim.builtin.treesitter.auto_install = true -- -- generic LSP settings +lvim.lsp.null_ls.setup.timeout_ms = 20000 + -- --- disable automatic installation of servers -- lvim.lsp.installer.setup.automatic_installation = false @@ -92,6 +98,12 @@ formatters.setup { -- }, -- } +-- Flutter snippets enable +local luasnip = require("luasnip") +luasnip.filetype_extend("dart", { "flutter" }) + + + -- -- Additional Plugins -- lvim.plugins = { -- { @@ -122,12 +134,14 @@ command! -nargs=+ Gr :silent execute 'grep! -nr "" | copen' command! -nargs=* Grc grep -nr " Add file header to current buffer. Depends on https://github.com/harish2704/file-header -command! Header :execute '0r!file-header %' +command! Header :execute "0r!file-header '%'" " Open Terminal in split window command! Termw :execute '!konsole -e bash-session &' command! Term :execute 'sp | term' +command! EditSnippet :execute 'lua require("luasnip.loaders").edit_snippet_files()' + " Cd to current file's directory command! Cwd :execute 'cd %:p:h' @@ -155,7 +169,7 @@ nmap g :!git gui & nmap :e! " Alt-q Delete current buffer ( Close file ) -nmap :bd +nmap :BufferKill " force Close buffer nmap :bd! @@ -197,10 +211,12 @@ vmap gv imap nmap :BufferLineCyclePrev nmap :BufferLineCycleNext +nmap :BufferLineMovePrev +nmap :BufferLineMoveNext let g:user_emmet_mode='inv' let g:user_emmet_install_global = 0 -autocmd FileType html,css,vue,jsx,php EmmetInstall +autocmd FileType html,css,vue,jsx,php,javascriptreact EmmetInstall nmap :execute 'Telescope live_grep default_text=' . expand('') ]]) -- imap (emmet-expand-abbr) @@ -213,7 +229,7 @@ vim.keymap.set('n', '', function() require('dap').step_out() end) lvim.builtin.dap.active = true lvim.builtin.which_key.mappings["l"]["f"] = { function() - require("lvim.lsp.utils").format { timeout_ms = 2000 } + require("lvim.lsp.utils").format { timeout_ms = 20000 } end, "Format", } @@ -273,6 +289,10 @@ lvim.plugins = { build = "npm install --prefix server", lazy = true, }, + { + "jamessan/vim-gnupg", + -- lazy = true, + }, { "kylechui/nvim-surround", config = function() diff --git a/home/.local/Apps/neovim-distros/lunarvim/nvim b/home/.local/Apps/neovim-distros/lunarvim/nvim new file mode 120000 index 0000000..6cfe505 --- /dev/null +++ b/home/.local/Apps/neovim-distros/lunarvim/nvim @@ -0,0 +1 @@ +LunarVim \ No newline at end of file diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..2824827 --- /dev/null +++ b/install.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +thisDir=$(dirname $(realpath $0) ) + +installUtils(){ + # Install https://github.com/harish2704/installer-scripts + wget 'https://raw.githubusercontent.com/harish2704/installer-scripts/master/installer.sh' -O - | sh +} + +installNerdFonts(){ + cd ~/Downloads + wget -c https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/CodeNewRoman.zip + unzip CodeNewRoman.zip *.otf + mkdir -p ~/.local/share/fonts/ + mv CodeNewRoman*.otf ~/.local/share/fonts/ + fc-cache +} + +setupLunarVim(){ + cd "$thisDir" + cd ./home/.local/Apps/neovim-distros/lunarvim/ + git clone https://github.com/LunarVim/LunarVim ./ + cd LunarVim + rm config.lua + ln -s ../config.lua ./ +} + +installUtils +installNerdFonts +setupLunarVim +