Browse Source

initial commit

master
Von Random 4 months ago
commit
6b886616af
  1. 3
      init.lua
  2. 28
      lua/maps.lua
  3. 32
      lua/plug.lua
  4. 29
      lua/settings.lua

3
init.lua

@ -0,0 +1,3 @@
require('settings')
require('maps')
require('plug')

28
lua/maps.lua

@ -0,0 +1,28 @@
vim.g.mapleader = ' '
function unmap(key) vim.api.nvim_set_keymap('', key, '', {}) end
function map(mode, key, action) vim.api.nvim_set_keymap(mode, key, action, {noremap = true}) end
-- some unmaps
unmap(' ')
unmap('q')
map('', '<F1>', '<Esc>')
map('!', '<F1>', '<Esc>')
-- option control
map('n', '<Leader>c', ':setlocal cursorline!<CR>')
map('n', '<Leader>l', ':setlocal list!<CR>')
map('n', '<Leader>w', ':setlocal wrap!<CR>')
-- search
map('n', '<Leader>/', ':noh<CR>')
-- copy / paste
map('n', '<Leader>y', '"+y')
map('n', '<Leader>d', '"+d')
map('n', '<Leader>p', '"+p')
map('n', '<Leader>P', '"+P')
-- keymap switch
map('!', '<C-Space>', '<C-^>')
map('!', '<C-@>', '<C-^>')

32
lua/plug.lua

@ -0,0 +1,32 @@
require('paq') {
'savq/paq-nvim',
'lifepillar/vim-gruvbox8',
'mhinz/vim-signify',
'tpope/vim-commentary',
'tpope/vim-fugitive',
'tpope/vim-rsi',
'tpope/vim-vinegar',
'hoob3rt/lualine.nvim',
'w0rp/ale'
}
require('lualine').setup{
options = {
-- no unicode literals? T.T
--section_separators = {'\u{e0b8}', '\u{e0ba}'},
--component_separators = {'\u{e0b9}', '\u{e0bb}'},
section_separators = {'', ''},
component_separators = {'', ''},
icons_enabled = false
}
}
vim.g.vimwiki_list = {{path='$HOME/vimwiki/', syntax='markdown', ext='.md'}}
--if vim.env.TERM ~= 'tmux%' then
if not vim.env.TERM:match('linux') then
vim.o.termguicolors = true
vim.g.gruvbox_filetype_hi_groups = 1
vim.cmd('colorscheme gruvbox8')
end

29
lua/settings.lua

@ -0,0 +1,29 @@
vim.o.bg = 'dark'
vim.o.modeline = false
vim.o.foldmethod = 'marker'
vim.o.cursorline = true
vim.o.colorcolumn = '80'
vim.o.relativenumber = true
vim.o.breakindent = true
vim.o.list = true
vim.o.listchars = 'tab:|_,nbsp:x,trail:*'
vim.o.ignorecase = true
vim.o.smartcase = true
vim.o.scrolloff = 3
vim.o.sidescrolloff = 15
vim.o.tabstop = 3
vim.o.softtabstop = 4
vim.o.shiftwidth = 4
vim.o.expandtab = true
vim.o.keymap = 'russian-jcukenwintype'
vim.o.iminsert = 0
vim.o.imsearch = 0
vim.o.title = true
vim.o.titlestring = '[%{hostname()}] %t - vim'
vim.o.statusline = '[%F] %R%H%W%M %=[%{&fenc}/%{&ff}] %y [%4l/%L:%3v]'
Loading…
Cancel
Save