Installazione minimal e full.

This commit is contained in:
Emiliano Vavassori 2024-12-26 00:13:44 +01:00
parent 353f316c1e
commit 8a06bb83b7
11 changed files with 294 additions and 14 deletions

View File

@ -1,4 +1,4 @@
---
- hosts: all
roles:
- dotfiles
- minimal

4
full-deploy.yml Normal file
View File

@ -0,0 +1,4 @@
---
- hosts: all
roles:
- full

8
roles/full/meta/main.yml Normal file
View File

@ -0,0 +1,8 @@
---
dependencies:
- tmux-user-cfg
- { role: vim-user-cfg, vim_rc_version: "full" }
- zsh-user-cfg
- nix
- nix-user-cfg
- kitty-user-cfg

View File

@ -0,0 +1,5 @@
---
dependencies:
- tmux-user-cfg
- { role: vim-user-cfg, vim_rc_version: "minimal" }
- zsh-user-cfg

View File

@ -1,2 +1,3 @@
---
additional_user: syntaxerrormmm
dotfdir: "{{ lookup('ansible.builtin.env', 'HOME' ) }}/.dotfiles"

View File

@ -1,2 +1,4 @@
---
additional_user: syntaxerrormmm
dotfdir: "{{ lookup('ansible.builtin.env', 'HOME' ) }}/.dotfiles"
vim_rc_version: minimal

View File

@ -3,7 +3,7 @@
- name: Linking main file
ansible.builtin.file:
src: "{{ dotfdir }}/vimrc"
src: "{{ dotfdir }}/vimrc-{{ vim_rc_version }}"
dest: "{{ lookup('ansible.builtin.env', 'HOME') }}/.vimrc"
state: link
@ -12,3 +12,6 @@
src: "{{ dotfdir }}/vim"
dest: "{{ lookup('ansible.builtin.env', 'HOME') }}/.vim"
state: link
- name: Installing and configuring package manager - vim-plug
ansible.builtin.import_tasks: pkgman/main.yml

View File

@ -12,7 +12,7 @@
- vim-install
- name: Configuration
ansible.builtin.import_tasks: configuration.yml
ansible.builtin.import_tasks: config/main.yml
tags:
- vim
- vim-config

View File

@ -1,17 +1,6 @@
---
# Setting up zsh
- name: Installation
ansible.builtin.include_tasks: "install/{{ ansible_os_family | lower }}.yml"
args:
apply:
tags:
- zsh
- zsh-install
tags:
- zsh
- zsh-install
- name: Configuration
ansible.builtin.import_tasks: config/main.yml
tags:

167
vimrc-full Normal file
View File

@ -0,0 +1,167 @@
" Impostazioni di base
set nocompatible
syntax on
set background=dark
set modelines=5
set modeline
set showcmd
set laststatus=2
set splitbelow
set splitright
" Gestione plugin con vim-plug
call plug#begin()
" Base for plugin management
Plug 'junegunn/vim-plug'
" Standard vim packages
Plug 'tpope/vim-sensible'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-repeat'
" Git wrapper
Plug 'tpope/vim-fugitive'
" File explorer
Plug 'scrooloose/nerdtree'
" nerdtree git plugin
Plug 'Xuyuanp/nerdtree-git-plugin'
" fzf integration
Plug 'junegunn/fzf.vim'
" Snippets management and support for vim
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
" Conqueror of Completion
Plug 'neoclide/coc.nvim', {'branch': 'release'}
" Shell Conqueror of Completion plugin
Plug 'josa42/coc-sh', { 'do': 'yarn install --frozen-lockfile' }
" Python
Plug 'fannheyward/coc-pyright'
" Ansible
Plug 'pearofducks/ansible-vim' " syntax highlight
Plug 'yaegassy/coc-ansible', {'do': 'yarn install --frozen-lockfile'}
" Rust
Plug 'rust-lang/rust.vim'
Plug 'zooxyt/Ultisnips-rust'
Plug 'fannheyward/coc-rust-analyzer', { 'do': 'yarn install --frozen-lockfile' }
" latex stuff
Plug 'lervag/vimtex'
Plug 'ckunte/latex-snippets-vim', { 'tag': '*' }
Plug 'neoclide/coc-vimtex', { 'do': 'yarn install --frozen-lockfile' }
" HTML 5 template
Plug 'othree/html5.vim'
"
" Blade syntax highlight
Plug 'xsbeats/vim-blade'
" terraform syntax highlight
Plug 'hashivim/vim-terraform'
" Mediawiki pages support
Plug 'm-pilia/vim-mediawiki'
" Markdown with preview
Plug 'fannheyward/coc-markdownlint', { 'do': 'yarn install --frozen-lockfile' }
Plug 'weirongxu/coc-webview'
Plug 'weirongxu/coc-markdown-preview-enhanced', { 'do': 'yarn install --frozen-lockfile' }
""" Aesthetic fixes """
" Devicons
Plug 'ryanoasis/vim-devicons'
" Vim Airline
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
" Solarized theme
Plug 'altercation/vim-colors-solarized'
" Vim-plug configuration end
call plug#end()
" Riattivo i plugin per i tipi di file
filetype plugin indent on
" Override grep
set grepprg=grep\ -nH\ $*
" Configurazioni addizionali
" Nerdtree
let g:NERDTreeNodeDelimiter = "\u00a0"
map <C-n> :NERDTreeToggle<CR>
" LaTeXsuite - Cambio il tex flavor
" let g:tex_flavor='latex'
" Airline-theme - Set up airline-theme
let g:airline_powerline_fonts = 1
let g:airline_theme='dark'
" ALE configurations
"nmap <silent> <C-e> <Plug>(ale_next_wrap)
"let g:ale_sign_error = '⬥'
"let g:ale_sign_warning = '⬦'
"let g:ale_yaml_yamllint_options='-d "{extends: relaxed, rules: {line-length: disable}}"'
" Configurazioni per ansible-vim
let g:ansible_unindent_after_newline = 1
" Completion with Conqueror of Code
" use <tab> to trigger completion and navigate to the next complete item
function! CheckBackspace() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
inoremap <silent><expr> <Tab>
\ coc#pum#visible() ? coc#pum#next(1) :
\ CheckBackspace() ? "\<Tab>" :
\ coc#refresh()
" Conferma scelta con invio
inoremap <expr> <cr> coc#pum#visible() ? coc#pum#confirm() : "\<CR>\<c-r>=coc#on_enter()\<CR>"
" mostra documentazione in preview
nnoremap <silent> K :call ShowDocumentation()<CR>
function! ShowDocumentation()
if CocAction('hasProvider', 'hover')
call CocActionAsync('doHover')
else
call feedkeys('K', 'in')
endif
endfunction
let g:coc_filetype_map = {
\ 'yaml.ansible': 'ansible',
\ }
" vimtex configuration
let g:vimtex_view_method = 'zathura'
" Ultisnips configuration
let g:UltiSnipsExpandTrigger = '<Tab>'
" Configurations for GVim
if has('gui_running')
"set guifont=Ubuntu\ Mono\ derivative\ Powerline\ 14
"set guifont = Droid Sans Mono Slashed for Powerline Regular 16,Ubuntu Mono derivative Powerline 14
set guifont=Fira\ Code\ Nerd\ Font\ 12,Ubuntu\ Mono\ derivative\ Powerline\ 14
colorscheme solarized
let g:airline_theme='base16'
let lines=45
let columns=80
endif

101
vimrc-minimal Normal file
View File

@ -0,0 +1,101 @@
" Impostazioni di base
set nocompatible
syntax on
set background=dark
set modelines=5
set modeline
set showcmd
set laststatus=2
set splitbelow
set splitright
" Gestione plugin con vim-plug
call plug#begin()
" Base for plugin management
Plug 'junegunn/vim-plug'
" Standard vim packages
Plug 'tpope/vim-sensible'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-repeat'
" Git wrapper
Plug 'tpope/vim-fugitive'
" File explorer
Plug 'scrooloose/nerdtree'
" nerdtree git plugin
Plug 'Xuyuanp/nerdtree-git-plugin'
" fzf integration
Plug 'junegunn/fzf.vim'
" Snippets management and support for vim
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
" Ansible
Plug 'pearofducks/ansible-vim' " syntax highlight
" Rust
Plug 'rust-lang/rust.vim'
Plug 'zooxyt/Ultisnips-rust'
" latex stuff
Plug 'lervag/vimtex'
Plug 'ckunte/latex-snippets-vim', { 'tag': '*' }
" HTML 5 template
Plug 'othree/html5.vim'
"
" Blade syntax highlight
Plug 'xsbeats/vim-blade'
" terraform syntax highlight
Plug 'hashivim/vim-terraform'
" Mediawiki pages support
Plug 'm-pilia/vim-mediawiki'
" Solarized theme
Plug 'altercation/vim-colors-solarized'
" Vim-plug configuration end
call plug#end()
" Riattivo i plugin per i tipi di file
filetype plugin indent on
" Override grep
set grepprg=grep\ -nH\ $*
" Configurazioni addizionali
" Nerdtree
let g:NERDTreeNodeDelimiter = "\u00a0"
map <C-n> :NERDTreeToggle<CR>
" LaTeXsuite - Cambio il tex flavor
" let g:tex_flavor='latex'
" Configurazioni per ansible-vim
let g:ansible_unindent_after_newline = 1
" vimtex configuration
let g:vimtex_view_method = 'zathura'
" Ultisnips configuration
let g:UltiSnipsExpandTrigger = '<Tab>'
" Configurations for GVim
if has('gui_running')
"set guifont=Ubuntu\ Mono\ derivative\ Powerline\ 14
"set guifont = Droid Sans Mono Slashed for Powerline Regular 16,Ubuntu Mono derivative Powerline 14
set guifont=Fira\ Code\ Nerd\ Font\ 12,Ubuntu\ Mono\ derivative\ Powerline\ 14
colorscheme solarized
let lines=45
let columns=80
endif