[nvim] sépare les options et indente correctement
This commit is contained in:
parent
9e27886698
commit
d533425bcd
2 changed files with 29 additions and 59 deletions
|
@ -15,70 +15,18 @@ require("lazy").setup({
|
||||||
checker = { enabled = true },
|
checker = { enabled = true },
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.opt.compatible = false -- disable compatibility to old-time vi
|
require("core.options")
|
||||||
vim.opt.showmatch = true -- show matching brackets.
|
|
||||||
vim.opt.ignorecase = true -- case insensitive matching
|
|
||||||
vim.opt.cursorline = true -- highlights the current line in the editor
|
|
||||||
vim.opt.hlsearch = true -- highlight search results
|
|
||||||
vim.opt.number = true -- add line numbers
|
|
||||||
vim.opt.relativenumber = true -- display relative line numbers
|
|
||||||
vim.opt.colorcolumn = '88' -- set colour columns for good coding style
|
|
||||||
vim.opt.tabstop = 4 -- number of columns occupied by a tab character
|
|
||||||
vim.opt.shiftwidth = 4 -- width for autoindents
|
|
||||||
vim.opt.softtabstop = 4 -- see multiple spaces as tabstops so <BS> does the right thing
|
|
||||||
|
|
||||||
vim.opt.listchars:append {
|
|
||||||
eol = "$",
|
|
||||||
space = "·",
|
|
||||||
tab = "▏ ",
|
|
||||||
trail = "_",
|
|
||||||
nbsp = "~",
|
|
||||||
extends = ">",
|
|
||||||
precedes = "<",
|
|
||||||
}
|
|
||||||
vim.opt.list = true
|
|
||||||
|
|
||||||
options = { noremap = true }
|
options = { noremap = true }
|
||||||
map('n', '<Leader>ff', ':Telescope find_files<Enter>', options)
|
map('n', '<Leader>ff', ':Telescope find_files<Enter>', options)
|
||||||
map('n', '<Leader>fg', ':Telescope git_files<Enter>', options)
|
map('n', '<Leader>fg', ':Telescope git_files<Enter>', options)
|
||||||
map('n', '<Leader>gc', ':Telescope git_commits<Enter>', options)
|
map('n', '<Leader>gc', ':Telescope git_commits<Enter>', options)
|
||||||
map('n', '<Leader><Space>', ':Telescope buffers<Enter>', options)
|
map('n', '<Leader><Space>', ':Telescope buffers<Enter>', options)
|
||||||
map('n', '<Leader>t', ':TagbarToggle<Enter>', options)
|
map('n', '<Leader>t', ':TagbarToggle<Enter>', options)
|
||||||
|
|
||||||
vim.cmd([[
|
--------------------------------------------------
|
||||||
"set mouse=v " middle-click paste with mouse
|
|
||||||
"set autoindent " indent a new line the same amount as the line just typed
|
|
||||||
"set wildmode=longest,list " get bash-like tab completions
|
|
||||||
"filetype plugin indent on " allows auto-indenting depending on file type
|
|
||||||
" set expandtab " convert tabs to white space
|
|
||||||
|
|
||||||
" specify directory for plugins
|
|
||||||
"call plug#begin('~/.config/nvim/plugged')
|
|
||||||
|
|
||||||
"Plug 'echasnovski/mini.icons'
|
|
||||||
"Plug 'nvim-tree/nvim-web-devicons'
|
|
||||||
"Plug 'preservim/tagbar'
|
|
||||||
|
|
||||||
"Plug 'rebelot/kanagawa.nvim'
|
|
||||||
|
|
||||||
" Conquer on Completion
|
|
||||||
" Use release branch (recommended)
|
|
||||||
"Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
|
||||||
" initialize plugin system
|
|
||||||
"call plug#end()
|
|
||||||
|
|
||||||
"colorscheme kanagawa
|
|
||||||
|
|
||||||
" In your init.lua or init.vim
|
|
||||||
set termguicolors
|
|
||||||
"lua << EOF
|
|
||||||
"require("bufferline").setup{}
|
|
||||||
"EO
|
|
||||||
]])
|
|
||||||
|
|
||||||
----------------------------------------------------------------
|
|
||||||
-- LSP
|
-- LSP
|
||||||
----------------------------------------------------
|
--------------------------------------------------
|
||||||
-- Reserve a space in the gutter
|
-- Reserve a space in the gutter
|
||||||
-- This will avoid an annoying layout shift in the screen
|
-- This will avoid an annoying layout shift in the screen
|
||||||
vim.opt.signcolumn = 'yes'
|
vim.opt.signcolumn = 'yes'
|
||||||
|
|
22
.config/nvim/lua/core/options.lua
Normal file
22
.config/nvim/lua/core/options.lua
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
vim.opt.colorcolumn = '88' -- set colour columns for good coding style
|
||||||
|
vim.opt.compatible = false -- disable compatibility to old-time vi
|
||||||
|
vim.opt.showmatch = true -- show matching brackets.
|
||||||
|
vim.opt.ignorecase = true -- case insensitive matching
|
||||||
|
vim.opt.cursorline = true -- highlights the current line in the editor
|
||||||
|
vim.opt.hlsearch = true -- highlight search results
|
||||||
|
vim.opt.number = true -- add line numbers
|
||||||
|
vim.opt.relativenumber = true -- display relative line numbers
|
||||||
|
vim.opt.tabstop = 4 -- number of columns occupied by a tab character
|
||||||
|
vim.opt.shiftwidth = 4 -- width for autoindents
|
||||||
|
vim.opt.softtabstop = 4 -- see multiple spaces as tabstops so <BS> does the right thing
|
||||||
|
|
||||||
|
vim.opt.listchars:append {
|
||||||
|
eol = "$",
|
||||||
|
space = "·",
|
||||||
|
tab = "▏ ",
|
||||||
|
trail = "_",
|
||||||
|
nbsp = "~",
|
||||||
|
extends = ">",
|
||||||
|
precedes = "<",
|
||||||
|
}
|
||||||
|
vim.opt.list = true
|
Loading…
Reference in a new issue