Remove vim configuration for now

This commit is contained in:
linarphy 2024-04-13 16:08:28 +02:00
parent b86f6ad550
commit c71bcb12ae
No known key found for this signature in database
GPG key ID: B914FF3FE69AA363
47 changed files with 0 additions and 1054 deletions

View file

@ -1,66 +0,0 @@
--[[
Initialization file
This file only loads others to improve readability of settings
File organization:
legend:
>name : folder
>name : sub-folder
name : file
(name) : comment
>lua
(contains all configuration files)
>display
(ui and graphical settings)
cmd.lua
(ui settings for the cmd)
editor.lua
(ui settings for the editor)
graphic.lua
(general graphic settings)
init.lua
(load other files)
>general
(settings not in other category)
cmd.lua
(cmd settings)
editor.lua
(editor settings)
indent.lua
(tab and indent settings)
init.lua
(load other files)
lang.lua
(lang settings)
>mapping
(key mapping settings)
init.lua
(load other files)
mapleader.lua
(define mapleader key)
movement.lua
(movement linked mapping)
maintenance.lua
(maintenance and configuration change linked mapping)
>plugins
(plugins settings)
init.lua
(load other files)
loader.lua
(install and load plugins and plugins settings)
>{name of a plugin}
({name of a plugin} settings)
init.lua
(load other files)
--]]
require('display') -- ui and graphical settings
require('general') -- settings not in other category
require('mapping') -- key mapping settings
require('plugins') -- plugins settings

View file

@ -1,13 +0,0 @@
{
"LuaSnip": { "branch": "master", "commit": "825a61bad1d60d917a7962d73cf3c683f4e0407e" },
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"dashboard-nvim": { "branch": "master", "commit": "681300934baf36f6184ca41f0b26aed22056d4ee" },
"fzf-lua": { "branch": "main", "commit": "f430c5b3b1d531cff8d011474461ea3090e932e2" },
"lazy.nvim": { "branch": "main", "commit": "bef521ac89c8d423f9d092e37b58e8af0c099309" },
"monokai.nvim": { "branch": "master", "commit": "b8bd44d5796503173627d7a1fc51f77ec3a08a63" },
"nvim-cmp": { "branch": "main", "commit": "ce16de5665c766f39c271705b17fff06f7bcb84f" },
"nvim-lspconfig": { "branch": "master", "commit": "96e5711040df23583591391ce49e556b8cd248d8" },
"nvim-treesitter": { "branch": "master", "commit": "1b050206e490a4146cdf25c7b38969c1711b5620" },
"nvim-web-devicons": { "branch": "master", "commit": "3ee60deaa539360518eaab93a6c701fe9f4d82ef" },
"vim-easy-align": { "branch": "master", "commit": "12dd6316974f71ce333e360c0260b4e1f81169c3" }
}

View file

@ -1,3 +0,0 @@
--[[
Loads ui settings for the neovim's command-line
--]]

View file

@ -1,11 +0,0 @@
--[[
Loads ui settings for the editor
--]]
vim.opt.relativenumber = true -- display relative number from the line you are
vim.opt.number = true
vim.opt.wrap = false -- do not break word from line to other
vim.opt.emoji = false -- do not display emoji with specific width
-- cursor option
vim.opt.cursorline = true -- display line you are on
vim.opt.cursorcolumn = true -- display column you are on

View file

@ -1,7 +0,0 @@
--[[
Loads general graphic settings
--]]
vim.opt.guifont = "mononoki NFM:h11" -- set font
vim.opt.background = dark -- set theme
vim.cmd( 'silent! colorscheme monokai_pro') -- set colorscheme

View file

@ -1,13 +0,0 @@
--[[
Loads ui and graphical settings
This file only loads others
To have a full display of the configuration structure, see the root init.lua
--]]
require('display.cmd') -- ui settings for the cmd
require('display.editor') -- ui settings for the editor
require('display.graphic') -- general graphic settings

View file

@ -1,26 +0,0 @@
{
"workspace.library": [
"/home/linarphy/.config/nvim",
"/etc/xdg/nvim",
"/home/linarphy/.local/share/nvim/site",
"/home/linarphy/.local/share/nvim/site/pack/packer/start/fzf",
"/home/linarphy/.local/share/nvim/site/pack/packer/start/fzf-lua",
"/home/linarphy/.local/share/nvim/site/pack/packer/start/gv.vim",
"/home/linarphy/.local/share/nvim/site/pack/packer/start/indent-blankline.nvim",
"/home/linarphy/.local/share/nvim/site/pack/packer/start/monokai.nvim",
"/home/linarphy/.local/share/nvim/site/pack/packer/start/nvim-fzf",
"/home/linarphy/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
"/home/linarphy/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
"/home/linarphy/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
"/home/linarphy/.local/share/nvim/site/pack/packer/start/packer.nvim",
"/home/linarphy/.local/share/nvim/site/pack/packer/start/vim-easy-align",
"/home/linarphy/.local/share/nvim/site/pack/packer/start/vim-fugitive",
"/home/linarphy/.local/share/nvim/site/pack/packer/start/vim-peekaboo",
"/usr/share/nvim/site",
"/usr/share/nvim/site/pack/packer/start/packer.nvim",
"/usr/share/nvim/runtime",
"/usr/lib/nvim",
"/usr/share/vim/vimfiles",
"${3rd}/luassert/library"
]
}

View file

@ -1,7 +0,0 @@
--[[
Loads cmd settings
--]]
vim.opt.confirm = true -- ask confirmation before leaving an unsaved file
vim.opt.ignorecase = true -- ignore case in search pattern
vim.opt.smartcase = true -- stop ignoring case in search pattern if upper case

View file

@ -1,16 +0,0 @@
--[[
Loads editor settings
--]]
vim.opt.textwidth = 72 -- maximum width of text (80 is a standard, but with
-- diff marker and email quoting, 72 is safer)
-- apply it to each filetype
vim.opt.formatoptions:append({ t, 1 })
vim.api.nvim_create_autocmd(
{"Filetype"},
{
pattern = {"*"},
command = ":setlocal formatoptions+=t1"
}
)

View file

@ -1,7 +0,0 @@
--[[
Loads tab and indent settings
--]]
vim.opt.tabstop = 4 -- number of space equivalent to a tab
vim.opt.shiftwidth = 4 -- number of space to use for indenting
vim.opt.smartindent = true -- can auto insert indent

View file

@ -1,15 +0,0 @@
--[[
Loads settings not in others category
This file only loads others
To have a full display of the configuration structure, see the root init.lua
--]]
require('general.cmd') -- cmd settings
require('general.editor') -- editor settings
require('general.indent') -- tab and indent settings
require('general.lang') -- lang settings

View file

@ -1,5 +0,0 @@
--[[
Loads lang settings
--]]
vim.opt.spell = true -- enable spell checking

View file

@ -1,14 +0,0 @@
--[[
Loads key mapping settings
This file only loads others
To have a full display of the configuration structure, see the root init.lua
--]]
require('mapping.mapleader') -- define mapleader key
require('mapping.movement') -- movement linked mapping
require('mapping.maintenance') -- maintenance and configuration change linked
-- mapping

View file

@ -1,8 +0,0 @@
--[[
Loads maintenance and configuration change linked mapping
--]]
local vimrc = '~/.config/nvim/init.lua' -- path to
-- init.lua /!\ to change for each OS /!\
vim.keymap.set('n', '<Leader>ie', ':tabedit ' .. vimrc .. '<CR>') -- edit it
vim.keymap.set('n', '<Leader>is', ':source ' .. vimrc .. '<CR>') -- source it

View file

@ -1,5 +0,0 @@
--[[
Defines mapleader key
--]]
vim.g.mapleader = ','

View file

@ -1,13 +0,0 @@
--[[
Loads movement linked mapping
--]]
-- moves through buffer with only one key press
vim.keymap.set('n', '<C-h>', '<C-w>h')
vim.keymap.set('n', '<C-j>', '<C-w>j')
vim.keymap.set('n', '<C-k>', '<C-w>k')
vim.keymap.set('n', '<C-l>', '<C-w>l')
-- jump to tag under the cursor with an azerty keyboard
vim.keymap.set('n', '<Leader>c', '<C-]>')
vim.keymap.set('i', '<Leader>c', '<C-]>')

View file

@ -1,10 +0,0 @@
--[[
Loads settings for dashboard-nvim plugin
This file only loads others
To have a full display of the configuration structure, see the root
init.lua
--]]
require('plugins.dashboard-nvim.menu') -- loads menu settings

View file

@ -1,52 +0,0 @@
--[[
Loads menu settings
--]]
local db = require('dashboard')
db.custom_header = {
'',
'MMMMMMMMMWkdXMMMMMMMMMMMMMWXOd:\'.. ..\':oOXWMMMMMMMMMMMMMNxkWMMMMMMMMM',
'MMMMMMMMMWo.;kNMMMMMMMMNOd:\'. .\':oONMMMMMMMMWO:.lWMMMMMMMMM',
'MMMMMMMMMWo ;kNMMMNkc\' \'ckXMMMWO:. lWMMMMMMMMM',
'MMMMMMMMMWo .;kKd\' \'oKO:. lWMMMMMMMMM',
'MMMMMMMMMWo .xO:. :Ox\' lWMMMMMMMMM',
'MMMMMMMMMWo .oKWMNk;. ;kNMMXd\' lWMMMMMMMMM',
'MMMMMMMMMWo..oKWMMMMMNk;. ;kNMMMMMMXd\'.lWMMMMMMMMM',
'MMMMMMMMMWOdKWMMMMMMMMMNk;. ;kNMMMMMMMMMWXxOWMMMMMMMMM',
'MMMMMMMMMMMMMMMMMMMMMMMMMNk;. ;kNMMMMMMMMMMMMMMMMMMMMMMM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custom_center = {
{
icon = '',
desc = ' load previous session ',
shortcut = ' , p s l',
action = 'SessionLoad'
},
{
icon = '',
desc = ' recently opened file ',
shortcut = ' , f f o',
action = 'DashboardFindHistory'
}
}

View file

@ -1,10 +0,0 @@
--[[
Loads settings for fzf-lua plugin
This file only loads others
To have a full display of the configuration structure, see the root
init.lua
--]]
require('plugins.fzf-lua.mapping') -- load key shortcut

View file

@ -1,24 +0,0 @@
--[[
Loads key shortcut for the fzf-lua plugin
--]]
vim.keymap.set(
'n' ,
'<Leader>fr' ,
'<cmd>lua require(\'fzf-lua\').oldfiles()<CR>',
{ silent = true }
) -- search in recent files
vim.keymap.set(
'n' ,
'<Leader>ff' ,
'<cmd>lua require(\'fzf-lua\').files()<CR>',
{ silent = true }
) -- search in files in path
vim.keymap.set(
'n' ,
'<Leader>fw' ,
'<cmd>lua require(\'fzf-lua\').grep()<CR>',
{ silent = true }
) -- search for a word

View file

@ -1,8 +0,0 @@
--[[
Loads ui settings of indent-blankline plugin
--]]
vim.opt.list = true -- display indent
vim.opt.listchars:append('eol:↴') -- display end of line (eof)
vim.opt.listchars:append('space:⋅') -- display space

View file

@ -1,11 +0,0 @@
--[[
Loads list of excluded context where we do not needs to use the plugin
--]]
require('indent_blankline').setup{
filetype_exclude = {
'dashboard' -- used by the dashboard-nvim plugin
},
}

View file

@ -1,16 +0,0 @@
--[[
Loads settings for indent-blankline plugin
This file only loads others
To have a full display of the configuration structure, see the root
init.lua
--]]
require('plugins.indent-blankline.display') -- ui and graphical settings
require('plugins.indent-blankline.exclusions') -- excluded context
require('plugins.indent-blankline.mapping') -- key mapping settings
require('plugins.indent-blankline.setup') -- setup settings

View file

@ -1,7 +0,0 @@
--[[
Loads key mapping settings for the plugin indent-blankline
--]]
vim.keymap.set('n', '<leader>pwt', function() -- toggle the plugin
vim.g.indent_blankline_enabled = not vim.g.indent_blankline_enabled
end)

View file

@ -1,8 +0,0 @@
--[[
Loads setup settings for indent-blankline plugin (except exclusion
settings managed in exclusions.lua)
--]]
require('indent_blankline').setup{
use_treesitter = true,
}

View file

@ -1,20 +0,0 @@
--[[
Loads plugins settings
This file only loads others
To have a full display of the configuration structure, see the root init.lua
--]]
require('plugins.loader') -- install and load plugins and plugins settings
require('plugins.vim-easy-align') -- settings for vim-easy-align plugin
require('plugins.fzf-lua') -- settings for fzf-lua plugin
require('plugins.indent-blankline') -- settings for indeent-blankline
--settings
require('plugins.nvim-treesitter') -- setting for nvim-treesitter plugin
require('plugins.nvim-lspconfig') -- setting for nvim-lspconfig plugin

View file

@ -1,12 +0,0 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git" ,
"clone" ,
"--filter=blob:none" ,
"https://github.com/folke/lazy.nvim.git",
"--branch=stable" , -- latest stable release
lazypath ,
})
end
vim.opt.rtp:prepend(lazypath)

View file

@ -1,126 +0,0 @@
--[[
Installs and loads plugins and plugins settings
--]]
-- Packer startup
return require('packer').startup(function(use)
use 'wbthomason/packer.nvim' -- packer can manage itself
use { -- install fzf as a neovim plugin
'junegunn/fzf',
run = './install --bin'
}
use 'vijaymarupudi/nvim-fzf' -- link between lua and fzf
use {
'ibhagwan/fzf-lua', -- fzf.vim replacement with lua (only for
--linux)
-- optional for icon support
requires = { 'nvim-tree/nvim-web-devicons' }
}
use 'neovim/nvim-lspconfig' -- Language Server Protocol easy configuration
use 'tpope/vim-fugitive' -- Git plugin
use {
'glepnir/dashboard-nvim', -- dashboard
event = 'VimEnter',
config = function()
require('dashboard').setup {
theme = 'doom',
config = {
header = {
'',
'MMMMMMMMMWkdXMMMMMMMMMMMMMWXOd:\'.. ..\':oOXWMMMMMMMMMMMMMNxkWMMMMMMMMM',
'MMMMMMMMMWo.;kNMMMMMMMMNOd:\'. .\':oONMMMMMMMMWO:.lWMMMMMMMMM',
'MMMMMMMMMWo ;kNMMMNkc\' \'ckXMMMWO:. lWMMMMMMMMM',
'MMMMMMMMMWo .;kKd\' \'oKO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MMMMMMMMMMMMMMMMMMMMMMNk; :KMMMM',
'MMMMMNd. ;kNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNk; .oXMMMMM',
'MMMMMMW0:. ;kNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNk; ;OWMMMMMM',
'MMMMMMMMNl\'lXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMXl\'lXMMMMMMMM',
'',
},
center = {
{
icon = '' ,
desc = 'Fichiers récents',
key = 'o',
keymap = ', f r',
action = 'lua require(\'fzf-lua\').oldfiles()',
},
{
icon = '',
desc = 'Rechercher un fichier',
key = 'r',
keymap = ', f f',
action = 'lua require(\'fzf-lua\').files()',
},
{
icon = '',
desc = 'Rechercher un mot',
key = 'm',
keymap = ', f w',
action = 'lua require(\'fzf-lua\').grep()',
},
{
icon = '',
desc = 'Ouvrir des fichiers de configuration',
key = 'c',
keymap = ', i e',
action = 'lua vim.cmd( \'e ~/.config/nvim/init.lua\')',
},
},
footer = {}
}
}
end,
requires = {
'nvim-tree/nvim-web-devicons'
}
}
use 'lukas-reineke/indent-blankline.nvim' -- add indentation guides
--to all lines
use {'nvim-treesitter/nvim-treesitter', -- parser generator tool
-- (completion and better syntax highlighting)
run = function()
local ts_update = require('nvim-treesitter.install').update(
{ with_sync = true }
)
ts_update()
end,
}
use 'junegunn/gv.vim' -- git commit browser for vim-fugitive
use 'junegunn/vim-peekaboo' -- real time view of the register
use 'junegunn/vim-easy-align' -- align multiple line on a symbol
use 'tanvirtin/monokai.nvim' -- coloscheme
use 'nvim-tree/nvim-web-devicons' -- adds icons to plugins
end)

View file

@ -1 +0,0 @@
require'lspconfig'.eslint.setup{}

View file

@ -1,10 +0,0 @@
--[[
Loads settings for nvim-lspconfig
This file only loads others
To have a full display of the configuration structure, see the root
init.lua
--]]
require('plugins.nvim-lspconfig.lua_config')

View file

@ -1,26 +0,0 @@
--[[
Load server configuration for lua lsp
--]]
require'lspconfig'.lua_ls.setup {
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = 'LuaJIT',
},
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = {'vim'},
},
workspace = {
-- Make the server aware of Neovim runtime files
library = vim.api.nvim_get_runtime_file("", true),
},
-- Do not send telemetry data containing a randomized but unique identifier
telemetry = {
enable = false,
},
},
},
}

View file

@ -1,110 +0,0 @@
--[[
Settings for main nvim-lspconfg plugin
--]]
-- Setup language servers.
local lspconfig = require('lspconfig')
local luasnip = require('luasnip')
lspconfig.pyright.setup {}
lspconfig.tsserver.setup {}
lspconfig.rust_analyzer.setup {
-- Server-specific settings. See `:help lspconfig-setup`
settings = {
['rust-analyzer'] = {},
},
}
-- Global mappings.
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
vim.keymap.set('n', '<Leader>ple', vim.diagnostic.open_float)
vim.keymap.set('n', '<Leader>pln', vim.diagnostic.goto_prev)
vim.keymap.set('n', '<Leader>pl?', vim.diagnostic.goto_next)
vim.keymap.set('n', '<Leader>plq', vim.diagnostic.setloclist)
-- Use LspAttach autocommand to only map the following keys
-- after the language server attaches to the current buffer
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
callback = function(ev)
-- Enable completion triggered by <c-x><c-o>
vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
-- Buffer local mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
local opts = { buffer = ev.buf }
vim.keymap.set('n', '<Leader>plD', vim.lsp.buf.declaration, opts)
vim.keymap.set('n', '<Leader>pld', vim.lsp.buf.definition, opts)
vim.keymap.set('n', '<Leader>plh', vim.lsp.buf.hover, opts)
vim.keymap.set('n', '<Leader>pli', vim.lsp.buf.implementation, opts)
vim.keymap.set('n', '<Leader>pls', vim.lsp.buf.signature_help, opts)
vim.keymap.set('n', '<Leader>plwa', vim.lsp.buf.add_workspace_folder, opts)
vim.keymap.set('n', '<Leader>plwr', vim.lsp.buf.remove_workspace_folder, opts)
vim.keymap.set('n', '<Leader>plwl', function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, opts)
vim.keymap.set('n', '<Leader>plt', vim.lsp.buf.type_definition, opts)
vim.keymap.set('n', '<Leader>plr', vim.lsp.buf.rename, opts)
vim.keymap.set({ 'n', 'v' }, '<Leader>plca', vim.lsp.buf.code_action, opts)
vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts)
vim.keymap.set('n', '<Leader>pll', function()
vim.lsp.buf.format { async = true }
end, opts)
end,
})
-- Add additional capabilities supported by nvim-cmp
local capabilities = require("cmp_nvim_lsp").default_capabilities()
local lspconfig = require('lspconfig')
-- Enable some language servers with the additional completion capabilities offered by nvim-cmp
local servers = { 'rust_analyzer', 'tsserver' }
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
-- on_attach = my_custom_on_attach,
capabilities = capabilities,
}
end
-- nvim-cmp setup
local cmp = require 'cmp'
cmp.setup {
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert({
['<C-u>'] = cmp.mapping.scroll_docs(-4), -- Up
['<C-d>'] = cmp.mapping.scroll_docs(4), -- Down
-- C-b (back) C-f (forward) for snippet placeholder navigation.
['<C-Space>'] = cmp.mapping.complete(),
['<CR>'] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select = true,
},
['<Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end, { 'i', 's' }),
['<S-Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { 'i', 's' }),
}),
sources = {
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
},
}

View file

@ -1,13 +0,0 @@
--[[
Loads settings for nvim-treesitter plugin
This file only loads others
To have a full display of the configuration structure, see the root
init.lua
--]]
require('plugins.nvim-treesitter.workaround') -- workaround found on
--https://github.com/nvim-treesitter/nvim-treesitter/wiki/Installation
require('plugins.nvim-treesitter.setup') -- setup settings

View file

@ -1,14 +0,0 @@
--[[
Loads setup settings for nvim-treesitter plugin
--]]
require('nvim-treesitter.configs').setup {
ensure_installed = 'all', -- installed parser
sync_install = false, -- don't install parsers synchronously
auto_install = false, -- install missing parsers when entering
--buffer
highlight = {
enable = true, -- enable highlighting
}
}

View file

@ -1,17 +0,0 @@
--[[
Loads workaround found on
https://github.com/nvim-treesitter/nvim-treesitter/wiki/Installation
--]]
-- vim.opt.foldmethod = 'expr'
-- vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'
---WORKAROUND to enable folding
--[[ vim.api.nvim_create_autocmd({'BufEnter','BufAdd','BufNew','BufNewFile','BufWinEnter'}, {
group = vim.api.nvim_create_augroup('TS_FOLD_WORKAROUND', {}),
callback = function()
vim.opt.foldmethod = 'expr'
vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'
end
})
--]]
---ENDWORKAROUND

View file

@ -1,3 +0,0 @@
return {
'hrsh7th/cmp-nvim-lsp',
}

View file

@ -1,77 +0,0 @@
return {
'glepnir/dashboard-nvim',
event = 'VimEnter' ,
config = function()
require('dashboard').setup({
theme = 'doom',
config = {
header = {
'',
'MMMMMMMMMWkdXMMMMMMMMMMMMMWXOd:\'.. ..\':oOXWMMMMMMMMMMMMMNxkWMMMMMMMMM',
'MMMMMMMMMWo.;kNMMMMMMMMNOd:\'. .\':oONMMMMMMMMWO:.lWMMMMMMMMM',
'MMMMMMMMMWo ;kNMMMNkc\' \'ckXMMMWO:. lWMMMMMMMMM',
'MMMMMMMMMWo .;kKd\' \'oKO:. lWMMMMMMMMM',
'MMMMMMMMMWo .xO:. :Ox\' lWMMMMMMMMM',
'MMMMMMMMMWo .oKWMNk;. ;kNMMXd\' lWMMMMMMMMM',
'MMMMMM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MMMMMW0:. ;kNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNk; ;OWMMMMMM',
'MMMMMMMMNl\'lXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMXl\'lXMMMMMMMM',
'',
},
center = {
{
icon = '' ,
desc = 'Fichiers récents',
key = 'o',
keymap = ', f r',
action = 'lua require(\'fzf-lua\').oldfiles()',
},
{
icon = '',
desc = 'Rechercher un fichier',
key = 'r',
keymap = ', f f',
action = 'lua require(\'fzf-lua\').files()',
},
{
icon = '',
desc = 'Rechercher un mot',
key = 'm',
keymap = ', f w',
action = 'lua require(\'fzf-lua\').grep()',
},
{
icon = '',
desc = 'Ouvrir des fichiers de configuration',
key = 'c',
keymap = ', i e',
action = 'lua vim.cmd( \'e ~/AppData/Local/nvim/init.lua\')',
},
},
footer = {
},
} ,
})
end ,
dependencies = { {
'nvim-tree/nvim-web-devicons',
} }
} -- dashboard at start

View file

@ -1,10 +0,0 @@
return {
'ibhagwan/fzf-lua',
dependencies = {
'nvim-tree/nvim-web-devicons',
} ,
config = function()
require('fzf-lua').setup({
})
end
} -- use fzf with nvim

View file

@ -1,3 +0,0 @@
return {
'L3MON4D3/LuaSnip',
}

View file

@ -1,3 +0,0 @@
return {
'tanvirtin/monokai.nvim',
} -- colorscheme

View file

@ -1,16 +0,0 @@
return {
'neovim/nvim-lspconfig',
event = {
'BufReadPre',
'BufNewFile',
},
servers = {
settings = {
Lua = {
telemetry = {
enable = false,
},
},
},
},
}

View file

@ -1,22 +0,0 @@
return {
'nvim-treesitter/nvim-treesitter',
version = false,
build = function()
require('nvim-treesitter.install').update( {
with_sync = true,
} )()
end,
opts = {
highlight = {
enable = true,
},
indent = {
enable = true,
},
ensure_installed = {
"all"
},
sync_install = false,
auto_install = false,
}
}

View file

@ -1,3 +0,0 @@
return {
'hrsh7th/nvim-cmp',
}

View file

@ -1,3 +0,0 @@
return {
'junegunn/vim-easy-align',
}

View file

@ -1,10 +0,0 @@
--[[
Loads settings for vim-easy-align plugin
This file only loads others
To have a full display of the configuration structure, see the root
init.lua
--]]
require('plugins.vim-easy-align.mapping') -- key mapping settings

View file

@ -1,6 +0,0 @@
--[[
Loads key mapping settings
--]]
vim.keymap.set('v', '<Leader>pa', '<Plug>(EasyAlign)') -- align selected
-- lines

View file

@ -1,174 +0,0 @@
-- Automatically generated packer.nvim plugin loader code
if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then
vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"')
return
end
vim.api.nvim_command('packadd packer.nvim')
local no_errors, error_msg = pcall(function()
_G._packer = _G._packer or {}
_G._packer.inside_compile = true
local time
local profile_info
local should_profile = false
if should_profile then
local hrtime = vim.loop.hrtime
profile_info = {}
time = function(chunk, start)
if start then
profile_info[chunk] = hrtime()
else
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
end
end
else
time = function(chunk, start) end
end
local function save_profiles(threshold)
local sorted_times = {}
for chunk_name, time_taken in pairs(profile_info) do
sorted_times[#sorted_times + 1] = {chunk_name, time_taken}
end
table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
local results = {}
for i, elem in ipairs(sorted_times) do
if not threshold or threshold and elem[2] > threshold then
results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
end
end
if threshold then
table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)')
end
_G._packer.profile_output = results
end
time([[Luarocks path setup]], true)
local package_path_str = "/home/linarphy/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/linarphy/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/linarphy/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/linarphy/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
local install_cpath_pattern = "/home/linarphy/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so"
if not string.find(package.path, package_path_str, 1, true) then
package.path = package.path .. ';' .. package_path_str
end
if not string.find(package.cpath, install_cpath_pattern, 1, true) then
package.cpath = package.cpath .. ';' .. install_cpath_pattern
end
time([[Luarocks path setup]], false)
time([[try_loadstring definition]], true)
local function try_loadstring(s, component, name)
local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
if not success then
vim.schedule(function()
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
end)
end
return result
end
time([[try_loadstring definition]], false)
time([[Defining packer_plugins]], true)
_G.packer_plugins = {
["dashboard-nvim"] = {
config = { "\27LJ\2\nË\20\0\0\6\0\14\0\0236\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0005\3\5\0005\4\4\0=\4\6\0034\4\5\0005\5\a\0>\5\1\0045\5\b\0>\5\2\0045\5\t\0>\5\3\0045\5\n\0>\5\4\4=\4\v\0034\4\0\0=\4\f\3=\3\r\2B\0\2\1K\0\1\0\vconfig\vfooter\vcenter\1\0\5\tdesc)Ouvrir des fichiers de configuration\ticon\t \vaction.lua vim.cmd( 'e ~/.config/nvim/init.lua')\vkeymap\n, i e\bkey\6c\1\0\5\tdesc\22Rechercher un mot\ticon\tî­¾ \vaction\"lua require('fzf-lua').grep()\vkeymap\n, f w\bkey\6m\1\0\5\tdesc\26Rechercher un fichier\ticon\tî©» \vaction#lua require('fzf-lua').files()\vkeymap\n, f f\bkey\6r\1\0\5\tdesc\22Fichiers récents\ticon\n \vaction&lua require('fzf-lua').oldfiles()\vkeymap\n, f r\bkey\6o\vheader\1\0\0\1\30\0\0\5PMMMMMMMMMWkdXMMMMMMMMMMMMMWXOd:'.. ..':oOXWMMMMMMMMMMMMMNxkWMMMMMMMMMPMMMMMMMMMWo.;kNMMMMMMMMNOd:'. .':oONMMMMMMMMWO:.lWMMMMMMMMMPMMMMMMMMMWo ;k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MMMMMMMMMMMMMMMMMMMMMMMMMMMNk; :KMMMMPMMMMMNd. ;kNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNk; .oXMMMMMPMMMMMMW0:. ;kNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNk; ;OWMMMMMMPMMMMMMMMNl'lXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMXl'lXMMMMMMMM\5\1\0\1\ntheme\tdoom\nsetup\14dashboard\frequire\0" },
loaded = false,
needs_bufread = false,
only_cond = false,
path = "/home/linarphy/.local/share/nvim/site/pack/packer/opt/dashboard-nvim",
url = "https://github.com/glepnir/dashboard-nvim"
},
fzf = {
loaded = true,
path = "/home/linarphy/.local/share/nvim/site/pack/packer/start/fzf",
url = "https://github.com/junegunn/fzf"
},
["fzf-lua"] = {
loaded = true,
path = "/home/linarphy/.local/share/nvim/site/pack/packer/start/fzf-lua",
url = "https://github.com/ibhagwan/fzf-lua"
},
["gv.vim"] = {
loaded = true,
path = "/home/linarphy/.local/share/nvim/site/pack/packer/start/gv.vim",
url = "https://github.com/junegunn/gv.vim"
},
["indent-blankline.nvim"] = {
loaded = true,
path = "/home/linarphy/.local/share/nvim/site/pack/packer/start/indent-blankline.nvim",
url = "https://github.com/lukas-reineke/indent-blankline.nvim"
},
["monokai.nvim"] = {
loaded = true,
path = "/home/linarphy/.local/share/nvim/site/pack/packer/start/monokai.nvim",
url = "https://github.com/tanvirtin/monokai.nvim"
},
["nvim-fzf"] = {
loaded = true,
path = "/home/linarphy/.local/share/nvim/site/pack/packer/start/nvim-fzf",
url = "https://github.com/vijaymarupudi/nvim-fzf"
},
["nvim-lspconfig"] = {
loaded = true,
path = "/home/linarphy/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
url = "https://github.com/neovim/nvim-lspconfig"
},
["nvim-treesitter"] = {
loaded = true,
path = "/home/linarphy/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
url = "https://github.com/nvim-treesitter/nvim-treesitter"
},
["nvim-web-devicons"] = {
loaded = true,
path = "/home/linarphy/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
url = "https://github.com/nvim-tree/nvim-web-devicons"
},
["packer.nvim"] = {
loaded = true,
path = "/home/linarphy/.local/share/nvim/site/pack/packer/start/packer.nvim",
url = "https://github.com/wbthomason/packer.nvim"
},
["vim-easy-align"] = {
loaded = true,
path = "/home/linarphy/.local/share/nvim/site/pack/packer/start/vim-easy-align",
url = "https://github.com/junegunn/vim-easy-align"
},
["vim-fugitive"] = {
loaded = true,
path = "/home/linarphy/.local/share/nvim/site/pack/packer/start/vim-fugitive",
url = "https://github.com/tpope/vim-fugitive"
},
["vim-peekaboo"] = {
loaded = true,
path = "/home/linarphy/.local/share/nvim/site/pack/packer/start/vim-peekaboo",
url = "https://github.com/junegunn/vim-peekaboo"
}
}
time([[Defining packer_plugins]], false)
vim.cmd [[augroup packer_load_aucmds]]
vim.cmd [[au!]]
-- Event lazy-loads
time([[Defining lazy-load event autocommands]], true)
vim.cmd [[au VimEnter * ++once lua require("packer.load")({'dashboard-nvim'}, { event = "VimEnter *" }, _G.packer_plugins)]]
time([[Defining lazy-load event autocommands]], false)
vim.cmd("augroup END")
_G._packer.inside_compile = false
if _G._packer.needs_bufread == true then
vim.cmd("doautocmd BufRead")
end
_G._packer.needs_bufread = false
if should_profile then save_profiles() end
end)
if not no_errors then
error_msg = error_msg:gsub('"', '\\"')
vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
end