Add setup script
Signed-off-by: TiagoRG <tiago.rgarcia@ua.pt>
This commit is contained in:
parent
2cd8074d4a
commit
9d2c30f9e6
|
@ -21,5 +21,5 @@ require("nvim-tree").setup({
|
|||
},
|
||||
})
|
||||
|
||||
vim.api.nvim_set_keymap('n', '<C-t>', ':NvimTreeToggle<CR>', { noremap = true, silent = true })
|
||||
vim.keymap.set({'n', 'i'}, '<C-t>', '<cmd>NvimTreeToggle<CR>', { noremap = true, silent = true })
|
||||
vim.keymap.set("n", "<leader>e", "<cmd>NvimTreeFocus<CR>")
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
require 'nvim-treesitter.configs'.setup {
|
||||
-- A list of parser names, or "all" (the five listed parsers should always be installed)
|
||||
-- ensure_installed = { "bash", "lua", "vim", "vimdoc", "query", "regex",
|
||||
-- "c", "cpp", "c_sharp", "rust", "python",
|
||||
-- "html", "css", "php", "javascript", "typescript", "sql"
|
||||
-- },
|
||||
ensure_installed = { "bash", "lua", "vim", "vimdoc", "query", "regex",
|
||||
"c", "cpp", "c_sharp", "rust", "python",
|
||||
"html", "css", "php", "javascript", "typescript", "sql"
|
||||
},
|
||||
|
||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||
sync_install = false,
|
||||
|
@ -25,7 +25,7 @@ require 'nvim-treesitter.configs'.setup {
|
|||
rainbow = {
|
||||
enable = true,
|
||||
-- list of languages you want to disable the plugin for
|
||||
disable = { 'jsx' },
|
||||
disable = { 'jsx', 'cpp' },
|
||||
-- Which query to use for finding delimiters
|
||||
query = 'rainbow-parens',
|
||||
-- Highlight the entire buffer all at once
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require("trouble").setup {
|
||||
position = "bottom",
|
||||
auto_open = true,
|
||||
auto_close = false,
|
||||
auto_close = true,
|
||||
auto_preview = false,
|
||||
icons = true,
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
monokai-pro
|
||||
vscode
|
|
@ -2,7 +2,7 @@ local function trim(str)
|
|||
return str:gsub("^%s*(.-)%s*$", "%1")
|
||||
end
|
||||
|
||||
function ColorMyPencils()
|
||||
function LoadColors()
|
||||
local color = nil
|
||||
local file = io.open("/home/tiagorg/.config/nvim/data/colorscheme.txt", "r")
|
||||
|
||||
|
@ -24,10 +24,6 @@ function ColorMyPencils()
|
|||
end
|
||||
|
||||
vim.cmd.colorscheme(color)
|
||||
|
||||
--vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
||||
|
||||
--vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
||||
end
|
||||
|
||||
-- Define a function to be called when the colorscheme changes
|
||||
|
@ -41,7 +37,12 @@ function OnColorschemeChanged()
|
|||
file:write(newColorscheme)
|
||||
end
|
||||
|
||||
ColorMyPencils()
|
||||
LoadColors()
|
||||
-- Set up an autocmd to trigger the function when the colorscheme changes
|
||||
vim.cmd([[autocmd ColorScheme * lua OnColorschemeChanged()]])
|
||||
|
||||
vim.api.nvim_create_user_command("TransparentBackground", function(opts)
|
||||
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
||||
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
||||
end, {})
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
require("tiagorg.set")
|
||||
require("tiagorg.remap")
|
||||
require('tiagorg.colors')
|
||||
|
||||
require('Comment').setup()
|
||||
require("liveshare").setup()
|
||||
require("nvim-surround").setup()
|
||||
|
|
|
@ -83,4 +83,5 @@ return require('packer').startup(function(use)
|
|||
"nvim-telescope/telescope.nvim"
|
||||
}
|
||||
}
|
||||
use 'mfussenegger/nvim-jdtls'
|
||||
end)
|
||||
|
|
|
@ -154,11 +154,6 @@ _G.packer_plugins = {
|
|||
path = "/home/tiagorg/.local/share/nvim/site/pack/packer/start/indent-blankline.nvim",
|
||||
url = "https://github.com/lukas-reineke/indent-blankline.nvim"
|
||||
},
|
||||
["liveshare.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/tiagorg/.local/share/nvim/site/pack/packer/start/liveshare.nvim",
|
||||
url = "https://github.com/TiagoRG/liveshare.nvim"
|
||||
},
|
||||
["lsp-zero.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/tiagorg/.local/share/nvim/site/pack/packer/start/lsp-zero.nvim",
|
||||
|
@ -194,6 +189,11 @@ _G.packer_plugins = {
|
|||
path = "/home/tiagorg/.local/share/nvim/site/pack/packer/start/nvim-cmp",
|
||||
url = "https://github.com/hrsh7th/nvim-cmp"
|
||||
},
|
||||
["nvim-jdtls"] = {
|
||||
loaded = true,
|
||||
path = "/home/tiagorg/.local/share/nvim/site/pack/packer/start/nvim-jdtls",
|
||||
url = "https://github.com/mfussenegger/nvim-jdtls"
|
||||
},
|
||||
["nvim-lspconfig"] = {
|
||||
loaded = true,
|
||||
path = "/home/tiagorg/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
|
||||
|
|
|
@ -2,3 +2,5 @@
|
|||
.vim/.netrwhist
|
||||
.vim/undodir/
|
||||
.vim/pack/
|
||||
.zsh/zsh-autosuggestions
|
||||
.zsh/zsh-syntax-highlighting
|
||||
|
|
2
.vimrc
2
.vimrc
|
@ -1,3 +1,5 @@
|
|||
set clipboard+="unnamedplus"
|
||||
|
||||
set number
|
||||
set relativenumber
|
||||
set signcolumn=auto
|
||||
|
|
|
@ -293,6 +293,7 @@ alias s='sudo'
|
|||
alias grepf='grep -sirnIE'
|
||||
alias tl='telnet localhost'
|
||||
alias py='python'
|
||||
alias mkjava='javac -d bin/ src/**/*.java'
|
||||
alias core='echo "core.%e.%p" | sudo tee /proc/sys/kernel/core_pattern'
|
||||
|
||||
# uaveiro-leci repository
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Subproject commit a411ef3e0992d4839f0732ebeb9823024afaaaa8
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 143b25eb98aa3227af63bd7f04413e1b3e7888ec
|
|
@ -0,0 +1,45 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Install the required packages
|
||||
# print in green
|
||||
echo -e "\e[32m$1\e[0mInstalling the required packages"
|
||||
sudo pacman -Sy stow vim neovim zsh git clang nodejs npm --noconfirm
|
||||
|
||||
# Clone the dotfiles if it's not the current directory
|
||||
if [ "$(pwd)" != "$HOME/.dotfiles" ]; then
|
||||
echo -e "\e[32m$1\e[0mCloning the dotfiles repository"
|
||||
git clone "https://github.com/TiagoRG/.dotfiles.git" "$HOME/.dotfiles"
|
||||
cd "$HOME/.dotfiles" || exit
|
||||
fi
|
||||
|
||||
# Setup stow
|
||||
echo -e "\e[32m$1\e[0mSetting up stow"
|
||||
stow -t "$HOME" -d "$HOME/.dotfiles" dotfiles
|
||||
|
||||
# Setup Vim
|
||||
echo -e "\e[32m$1\e[0mSetting up Vim"
|
||||
echo -e "\e[32m$1\e[0mInstalling OneDark theme"
|
||||
curl -fLo "$HOME/.vim/colors/onedark.vim" --create-dirs "https://raw.githubusercontent.com/joshdick/onedark.vim/master/colors/onedark.vim"
|
||||
curl -fLo "$HOME/.vim/autoload/onedark.vim" --create-dirs "https://raw.githubusercontent.com/joshdick/onedark.vim/master/autoload/onedark.vim"
|
||||
echo -e "\e[32m$1\e[0mInstalling Copilot"
|
||||
git clone "https://github.com/github/copilot.vim.git" "$HOME/.vim/pack/github/start/copilot.vim"
|
||||
echo -e "\e[32m$1\e[0mSetting up Copilot"
|
||||
/bin/vim -c 'Copilot setup' -c 'qa!'
|
||||
|
||||
# Setup Neovim
|
||||
echo -e "\e[32m$1\e[0mSetting up Neovim"
|
||||
echo -e "\e[32m$1\e[0mInstalling Packer"
|
||||
git clone --depth 1 "https://github.com/wbthomason/packer.nvim" "$HOME/.local/share/nvim/site/pack/packer/start/packer.nvim"
|
||||
cd "$HOME/.dotfiles/.config/nvim" || exit
|
||||
echo -e "\e[32m$1\e[0mInstalling Plugins"
|
||||
/bin/nvim --headless -c 'source lua/tiagorg/packer.lua' -c 'PackerSync' -c 'qa!'
|
||||
cd "$OLDPWD" || exit
|
||||
|
||||
# Setup zsh
|
||||
echo -e "\e[32m$1\e[0mSetting up zsh"
|
||||
chsh -s /bin/zsh
|
||||
echo -e "\e[32m$1\e[0mInstalling zsh-autosuggestions"
|
||||
git clone "https://github.com/zsh-users/zsh-autosuggestions.git" "$HOME/.zsh/zsh-autosuggestions"
|
||||
echo -e "\e[32m$1\e[0mInstalling zsh-syntax-highlighting"
|
||||
git clone "https://github.com/zsh-users/zsh-syntax-highlighting.git" "$HOME/.zsh/zsh-syntax-highlighting"
|
||||
|
Loading…
Reference in New Issue