1
0
Fork 0

Merge branch 'dev' of github.com:mrdev023/linux-conf into dev

This commit is contained in:
Florian RICHER (MrDev023) 2021-10-27 20:35:45 +02:00
commit 35d43f2951
23 changed files with 291 additions and 28 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
configs/nvim/plugin/packer_compiled.lua

View file

@ -9,8 +9,8 @@ local function init()
map('n', '<space>ps', [[<cmd>lua require('telescope.builtin').grep_string({ search = vim.fn.input("Grep For >")})<CR>]])
-------------------- NvimTreeToggle ------------------------
map('n', '<space>tt', '<cmd>NvimTreeToggle<CR>')
map('n', '<space>tr', '<cmd>NvimTreeRefresh<CR>')
map('n', '<F4>', '<cmd>NvimTreeToggle<CR>')
map('n', '<F5>', '<cmd>NvimTreeRefresh<CR>')
-------------------- LSP -----------------------------------
map('n', '<space>,', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>')
@ -23,9 +23,21 @@ local function init()
map('n', '<space>r', '<cmd>lua vim.lsp.buf.references()<CR>')
map('n', '<space>s', '<cmd>lua vim.lsp.buf.document_symbol()<CR>')
-------------------- HlsLens -------------------------------
map('n', 'n', "<Cmd>execute('normal! ' . v:count1 . 'n')<CR><Cmd>lua require('hlslens').start()<CR>")
map('n', 'N', "<Cmd>execute('normal! ' . v:count1 . 'N')<CR><Cmd>lua require('hlslens').start()<CR>")
map('n', '*', "*<Cmd>lua require('hlslens').start()<CR>")
map('n', '#', "#<Cmd>lua require('hlslens').start()<CR>")
map('n', 'g*', "g*<Cmd>lua require('hlslens').start()<CR>")
map('n', 'g#', "g#<Cmd>lua require('hlslens').start()<CR>")
-------------------- FTerm ---------------------------------
map('n', '<F3>', '<CMD>lua require("FTerm").toggle()<CR>')
map('t', '<F3>', '<C-\\><C-n><CMD>lua require("FTerm").toggle()<CR>')
-------------------- LAZYGIT -------------------------------
-- Install docs : https://github.com/jesseduffield/lazygit
map('n', '<space>lg', '<cmd>LazyGit<CR>')
map('n', '<F2>', '<cmd>LazyGit<CR>')
-------------------- COMMANDS ------------------------------
cmd 'au TextYankPost * lua vim.highlight.on_yank {on_visual = false}' -- disabled in visual mode

View file

@ -21,6 +21,7 @@ local function init()
opt.termguicolors = true -- True color support
opt.wildmode = {'list', 'longest'} -- Command-line completion mode
opt.wrap = false -- Disable line wrap
opt.mouse = 'a' -- Enable mouse for all previous modes
end
return {

View file

@ -3,34 +3,125 @@ function configure_packages()
call_with_helpers(require('plugins.compe').init)
call_with_helpers(require('plugins.nvim-treesitter').init)
call_with_helpers(require('plugins.nvim-web-devicons').init)
call_with_helpers(require('plugins.nvim-comment').init)
call_with_helpers(require('plugins.nvim-autopairs').init)
call_with_helpers(require('plugins.nvim-notify').init)
call_with_helpers(require('plugins.nvim-hlslens').init)
call_with_helpers(require('plugins.nvim-flutter-tools').init)
call_with_helpers(require('plugins.nvim-fterm').init)
call_with_helpers(require('plugins.nvim-feline').init)
call_with_helpers(require('plugins.nvim-todo-comments').init)
call_with_helpers(require('plugins.nvim-lightspeed').init)
call_with_helpers(require('plugins.nvim-numb').init)
call_with_helpers(require('plugins.nvim-neoscroll').init)
call_with_helpers(require('plugins.nvim-lspkind').init)
call_with_helpers(require('plugins.nvim-signature').init)
call_with_helpers(require('plugins.nvim-gutentags').init)
call_with_helpers(require('plugins.nvim-indent-blankline').init)
call_with_helpers(require('plugins.nvim-editorconfig').init)
call_with_helpers(require('plugins.nvim-ctrlsf').init)
end
function install_packages()
-- Packer can manage itself
-- Packer can manage itself as an optional plugin
use 'wbthomason/packer.nvim'
use 'dracula/vim'
use 'whatyouhide/vim-gotham'
-- LSP
use 'neovim/nvim-lspconfig'
use 'onsails/lspkind-nvim'
use 'kabouzeid/nvim-lspinstall'
-- Autocomplete
use 'hrsh7th/nvim-compe'
use 'shaunsingh/moonlight.nvim'
use 'SirVer/ultisnips'
use 'honza/vim-snippets'
use 'windwp/nvim-autopairs'
use 'AndrewRadev/tagalong.vim'
use 'andymass/vim-matchup'
-- Treesitter
use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' }
use 'p00f/nvim-ts-rainbow'
use 'lukas-reineke/indent-blankline.nvim'
use 'JoosepAlviste/nvim-ts-context-commentstring'
use 'romgrk/nvim-treesitter-context'
-- Syntax
use 'moll/vim-node'
use 'zinit-zsh/zplugin-vim-syntax'
use 'editorconfig/editorconfig-vim'
use 'chrisbra/csv.vim'
use 'npxbr/glow.nvim'
use 'junegunn/vim-easy-align'
-- Icons
use 'kyazdani42/nvim-web-devicons'
use 'ryanoasis/vim-devicons'
-- Status Line and Bufferline
use 'famiu/feline.nvim' -- A minimal, stylish and customizable statusline for Neovim written in Lua
use 'romgrk/barbar.nvim' -- Tabs, as understood by any other editor.
-- Telescope project search
use {
'nvim-telescope/telescope.nvim',
requires = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}}
}
use 'nvim-lua/popup.nvim'
use 'nvim-lua/plenary.nvim'
use 'nvim-telescope/telescope.nvim'
use 'nvim-telescope/telescope-fzy-native.nvim'
use 'nvim-telescope/telescope-project.nvim'
use 'fhill2/telescope-ultisnips.nvim'
use 'nvim-treesitter/nvim-treesitter'
use 'kyazdani42/nvim-web-devicons' -- removing this line doesn't change the error
-- Explorer
use 'kyazdani42/nvim-tree.lua'
-- Git
use 'kdheepak/lazygit.nvim'
use 'terrortylor/nvim-comment'
-- Flutter
use 'akinsho/flutter-tools.nvim'
-- Move & Search & replace
use 'windwp/nvim-spectre'
use 'nacro90/numb.nvim'
use 'dyng/ctrlsf.vim'
use 'kevinhwang91/nvim-hlslens' -- nvim-hlslens helps you better glance at matched information, seamlessly jump between matched instances.
use 'ggandor/lightspeed.nvim'
use 'kshenoy/vim-signature'
use 'karb94/neoscroll.nvim'
use 'dstein64/nvim-scrollview'
use 'chaoren/vim-wordmotion'
-- Tim Pope docet
use 'tpope/vim-sensible'
use 'tpope/vim-rails'
use 'tpope/vim-abolish'
use 'tpope/vim-surround'
use 'tpope/vim-bundler'
use 'tpope/vim-capslock'
use 'tpope/vim-repeat'
use 'tpope/vim-endwise' -- auto complete block with end
use 'tpope/vim-rvm'
use 'tpope/vim-dispatch'
use 'tpope/vim-dadbod'
use 'tpope/vim-jdaddy'
use 'tpope/vim-fugitive'
use 'tpope/vim-commentary'
-- Tmux
use 'christoomey/vim-tmux-navigator'
-- Colorschema
use 'dracula/vim'
use 'whatyouhide/vim-gotham'
use 'shaunsingh/moonlight.nvim'
-- Tags
use 'ludovicchabant/vim-gutentags'
-- General Plugins
use 'rcarriga/nvim-notify' -- fancy notification
use 'mfussenegger/nvim-dap' -- debugger
use 'numtostr/FTerm.nvim' -- Floating terminal
use 'folke/todo-comments.nvim'
use 'lambdalisue/suda.vim'
use 'mhinz/vim-startify' -- The fancy start screen for Vim.
end

View file

@ -0,0 +1,7 @@
local function init()
require'lspconfig'.dartls.setup{}
end
return {
init = init
}

View file

@ -4,6 +4,7 @@ local function init()
call_with_helpers(require('plugins.lspconfig.typescript').init)
call_with_helpers(require('plugins.lspconfig.ruby').init)
call_with_helpers(require('plugins.lspconfig.php').init)
call_with_helpers(require('plugins.lspconfig.dart').init)
end
return {

View file

@ -1,13 +1,5 @@
local function init()
require'lspconfig'.rls.setup {
settings = {
rust = {
unstable_features = true,
build_on_save = false,
all_features = true,
},
},
}
require'lspconfig'.rust_analyzer.setup{}
end
return {

View file

@ -0,0 +1,9 @@
local function init()
g.ctrlsf_ackprg = 'rg'
g.ctrls_auto_preview = 1
g.ctrlsf_search_mode = 'async'
end
return {
init = init
}

View file

@ -0,0 +1,7 @@
local function init()
g.EditorConfig_exclude_patterns = { 'fugitive://.*', 'scp://.*' }
end
return {
init = init
}

View file

@ -0,0 +1,7 @@
local function init()
require('feline').setup()
end
return {
init = init
}

View file

@ -0,0 +1,7 @@
local function init()
require('flutter-tools').setup()
end
return {
init = init
}

View file

@ -0,0 +1,15 @@
local function init()
require('FTerm').setup {
dimensions = {
height = 0.8,
width = 0.8,
x = 0.5,
y = 0.5
},
border = 'double'
}
end
return {
init = init
}

View file

@ -0,0 +1,17 @@
local function init()
cmd('set tags+=tags,.git/tags')
g.gutentags_enabled = 1
g.gutentags_generate_on_missing = 1
g.gutentags_generate_on_write = 1
g.gutentags_resolve_symlinks = 1
g.gutentags_ctags_tagfile = '.git/tags'
g.gutentags_project_root = { '.git' }
g.gutentags_ctags_extra_args = { '--fields=+l' }
g.gutentags_add_default_project_roots = 0
g.gutentags_ctags_executable_ruby = 'ripper-tags'
g.gutentags_ctags_extra_args = { '--ignore-unsupported-options', '--recursive' }
end
return {
init = init
}

View file

@ -0,0 +1,36 @@
local function init()
require('hlslens').setup {
calm_down = true,
override_lens = function(render, plist, nearest, idx, r_idx)
local sfw = vim.v.searchforward == 1
local indicator, text, chunks
local abs_r_idx = math.abs(r_idx)
if abs_r_idx > 1 then
indicator = string.format('%d%s', abs_r_idx, sfw ~= (r_idx > 1) and '' or '')
elseif abs_r_idx == 1 then
indicator = sfw ~= (r_idx == 1) and '' or ''
else
indicator = ''
end
local lnum, col = unpack(plist[idx])
if nearest then
local cnt = #plist
if indicator ~= '' then
text = string.format('[%s %d/%d]', indicator, idx, cnt)
else
text = string.format('[%d/%d]', idx, cnt)
end
chunks = {{' ', 'Ignore'}, {text, 'HlSearchLensNear'}}
else
text = string.format('[%s %d]', indicator, idx)
chunks = {{' ', 'Ignore'}, {text, 'HlSearchLens'}}
end
render.set_virt(0, lnum - 1, col - 1, chunks, nearest)
end
}
end
return {
init = init
}

View file

@ -0,0 +1,12 @@
local function init()
g.indent_blankline_show_current_context = true
g.indent_blankline_buftype_exclude = {'terminal'}
g.indent_blankline_filetype_exclude = {'help', 'startify', 'dashboard', 'packer', 'neogitstatus', 'NvimTree'}
g.indent_blankline_char = ''
g.indent_blankline_use_treesitter = true
g.indent_blankline_show_trailing_blankline_indent = false
end
return {
init = init
}

View file

@ -0,0 +1,7 @@
local function init()
require("lightspeed").setup {}
end
return {
init = init
}

View file

@ -0,0 +1,9 @@
local function init()
require('lspkind').init {
with_text = true,
}
end
return {
init = init
}

View file

@ -0,0 +1,7 @@
local function init()
require('neoscroll').setup()
end
return {
init = init
}

View file

@ -1,5 +1,5 @@
local function init()
require('nvim_comment').setup()
vim.notify = require("notify")
end
return {

View file

@ -0,0 +1,10 @@
local function init()
require('numb').setup {
show_numbers = true, -- Enable 'number' for the window while peeking
show_cursorline = true -- Enable 'cursorline' for the window while peeking
}
end
return {
init = init
}

View file

@ -0,0 +1,8 @@
local function init()
g.SignatureMarkTextHLDynamic = 1
g.SignatureMarkerTextHLDynamic = 1
end
return {
init = init
}

View file

@ -0,0 +1,7 @@
local function init()
require("todo-comments").setup {}
end
return {
init = init
}

View file

@ -1,6 +1,6 @@
local function init()
require'nvim-treesitter.configs'.setup {
ensure_installed = "maintained", -- list of languages
ensure_installed = "all", -- list of languages
highlight = {
enable = true,
},