Initial commit
This commit is contained in:
6
laptop/nvim/lua/config/keymaps.lua
Normal file
6
laptop/nvim/lua/config/keymaps.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
vim.g.mapleader=','
|
||||
|
||||
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')
|
||||
1
laptop/nvim/lua/config/plugins/ale.lua
Normal file
1
laptop/nvim/lua/config/plugins/ale.lua
Normal file
@@ -0,0 +1 @@
|
||||
vim.g['ale_linters']={ ['cs'] = 'OmniSharp' }
|
||||
1
laptop/nvim/lua/config/plugins/autopairs.lua
Normal file
1
laptop/nvim/lua/config/plugins/autopairs.lua
Normal file
@@ -0,0 +1 @@
|
||||
vim.g['AutoPairsFlyMode']=0
|
||||
10
laptop/nvim/lua/config/plugins/coc.lua
Normal file
10
laptop/nvim/lua/config/plugins/coc.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
local keyset = vim.keymap.set
|
||||
|
||||
function _G.check_back_space()
|
||||
local col = vim.fn.col('.') - 1
|
||||
return col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') ~= nil
|
||||
end
|
||||
|
||||
local opts = {silent = true, noremap = true, expr = true, replace_keycodes = false}
|
||||
keyset("i", "<TAB>", 'coc#pum#visible() ? coc#pum#next(1) : v:lua.check_back_space() ? "<TAB>" : coc#refresh()', opts)
|
||||
keyset("i", "<S-TAB>", [[coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"]], opts)
|
||||
35
laptop/nvim/lua/config/plugins/init.lua
Normal file
35
laptop/nvim/lua/config/plugins/init.lua
Normal file
@@ -0,0 +1,35 @@
|
||||
local plugins = {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
'kyazdani42/nvim-web-devicons',
|
||||
{'neoclide/coc.nvim',
|
||||
branch = 'release'},
|
||||
'navarasu/onedark.nvim',
|
||||
'tpope/vim-surround',
|
||||
'godlygeek/tabular',
|
||||
'OmniSharp/omnisharp-vim',
|
||||
'dense-analysis/ale',
|
||||
{
|
||||
'windwp/nvim-autopairs',
|
||||
event = 'InsertEnter',
|
||||
opts={},
|
||||
},
|
||||
'preservim/nerdtree',
|
||||
'junegunn/fzf.vim',
|
||||
'junegunn/fzf',
|
||||
'rust-lang/rust.vim'
|
||||
}
|
||||
|
||||
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)
|
||||
|
||||
require("lazy").setup(plugins, opts)
|
||||
36
laptop/nvim/lua/config/plugins/lualine.lua
Normal file
36
laptop/nvim/lua/config/plugins/lualine.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'wombat',
|
||||
component_separators = { left = '', right = ''},
|
||||
section_separators = { left = '', right = ''},
|
||||
disabled_filetypes = {},
|
||||
always_divide_middle = true,
|
||||
globalstatus = true,
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {'mode'},
|
||||
lualine_b = {'branch', 'diff', 'diagnostics'},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {'encoding', 'fileformat', 'filetype'},
|
||||
lualine_y = {'progress'},
|
||||
lualine_z = {'location'}
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {'location'},
|
||||
lualine_y = {},
|
||||
lualine_z = {}
|
||||
},
|
||||
tabline = {
|
||||
lualine_a = {'buffers'},
|
||||
lualine_b = {'branch'},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {},
|
||||
lualine_y = {},
|
||||
lualine_z = {'tabs'}
|
||||
},
|
||||
extensions = {}
|
||||
}
|
||||
6
laptop/nvim/lua/config/plugins/nerdtree.lua
Normal file
6
laptop/nvim/lua/config/plugins/nerdtree.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
vim.keymap.set('n', '<leader>nt', ':NERDTreeToggle<CR>')
|
||||
|
||||
vim.cmd[[
|
||||
" Close the tab if NERDTree is the only window remaining in it.
|
||||
autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
|
||||
]]
|
||||
37
laptop/nvim/lua/config/settings.lua
Normal file
37
laptop/nvim/lua/config/settings.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
vim.opt.cursorline=true
|
||||
vim.opt.relativenumber=true
|
||||
vim.opt.number=true
|
||||
|
||||
vim.opt.scrolloff=10
|
||||
|
||||
vim.opt.autoindent=true
|
||||
vim.opt.expandtab=true
|
||||
vim.opt.softtabstop=4
|
||||
vim.opt.shiftwidth=4
|
||||
vim.opt.shiftround=true
|
||||
|
||||
vim.opt.backspace={'indent','eol','start'}
|
||||
vim.opt.hidden=true
|
||||
vim.opt.laststatus=2
|
||||
vim.opt.display='lastline'
|
||||
|
||||
vim.opt.showmode=true
|
||||
vim.opt.showcmd=true
|
||||
|
||||
vim.opt.incsearch=true
|
||||
vim.opt.ignorecase=true
|
||||
vim.opt.smartcase=true
|
||||
|
||||
vim.opt.ttyfast=true
|
||||
vim.opt.updatetime=300
|
||||
|
||||
vim.opt.splitright=true
|
||||
|
||||
vim.opt.wrapscan=true
|
||||
vim.opt.report=0
|
||||
|
||||
vim.opt.list=true
|
||||
|
||||
|
||||
vim.g['loaded_perl_provider']=0
|
||||
vim.g['python3_host_prog']='/usr/bin/python'
|
||||
8
laptop/nvim/lua/config/vimscript/init.vim
Normal file
8
laptop/nvim/lua/config/vimscript/init.vim
Normal file
@@ -0,0 +1,8 @@
|
||||
filetype plugin indent on
|
||||
syntax on
|
||||
colorscheme onedark
|
||||
if has('multi_byte') && &encoding ==# 'utf-8'
|
||||
let &listchars = 'tab:▸ ,extends:❯,precedes:❮,nbsp:±'
|
||||
else
|
||||
let &listchars = 'tab:> ,extends:>,precedes:<,nbsp:.'
|
||||
endif
|
||||
Reference in New Issue
Block a user