mirror of
https://github.com/d0zingcat/dotfiles.git
synced 2026-05-13 23:16:44 +00:00
@@ -0,0 +1,27 @@
|
||||
vim.api.nvim_create_augroup('Init', { clear = true })
|
||||
-- highlight yanked text briefly
|
||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
group = 'Init',
|
||||
callback = function()
|
||||
vim.highlight.on_yank({
|
||||
higroup = 'IncSearch',
|
||||
timeout = 250,
|
||||
on_visual = true,
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
-- reopen last position
|
||||
vim.api.nvim_create_autocmd('BufReadPost', {
|
||||
group = 'Init',
|
||||
callback = function()
|
||||
local previous_pos = vim.api.nvim_buf_get_mark(0, '"')[1]
|
||||
local last_line = vim.api.nvim_buf_line_count(0)
|
||||
if previous_pos >= 1 and previous_pos <= last_line and vim.bo.filetype ~= 'commit' then
|
||||
vim.cmd('normal! g`"')
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
vim.cmd([[iabbrev pdb import pdb; pdb.set_trace()<ESC>]])
|
||||
vim.cmd([[iabbrev ipdb import ipdb; ipdb.set_trace()<ESC>]])
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
local cmd = vim.cmd
|
||||
local ncmd = vim.api.nvim_command
|
||||
|
||||
ncmd('filetype plugin indent on')
|
||||
cmd([[ autocmd FileType python setlocal tabstop=4 shiftwidth=4 softtabstop=4 textwidth=120 ]])
|
||||
cmd([[ autocmd FileType go setlocal tabstop=4 shiftwidth=4 softtabstop=4 textwidth=120 noexpandtab ]])
|
||||
cmd([[ autocmd FileType json,jsonnet setlocal tabstop=2 shiftwidth=2 softtabstop=2 expandtab ]])
|
||||
cmd([[ autocmd FileType yaml setlocal tabstop=2 shiftwidth=2 softtabstop=2 textwidth=0 expandtab ]])
|
||||
cmd([[ autocmd FileType php setlocal tabstop=2 shiftwidth=2 softtabstop=2 textwidth=120 ]])
|
||||
cmd([[ autocmd FileType html,htmldjango,xhtml,haml setlocal tabstop=2 shiftwidth=2 softtabstop=2 textwidth=0 ]])
|
||||
cmd([[ autocmd FileType ruby setlocal tabstop=2 shiftwidth=2 softtabstop=2 textwidth=120 ]])
|
||||
cmd([[ autocmd FileType less,sass,scss,css setlocal tabstop=2 shiftwidth=2 softtabstop=2 textwidth=120 ]])
|
||||
cmd(
|
||||
[[ autocmd FileType javascript,javascript.jsx,javascriptreact,typescript,typescriptreact setlocal tabstop=2 shiftwidth=2 softtabstop=2 expandtab ]]
|
||||
)
|
||||
cmd([[ autocmd FileType NvimTree setlocal tabstop=2 shiftwidth=2 softtabstop=2 textwidth=0 ]])
|
||||
cmd([[ autocmd FileType make set noexpandtab shiftwidth=8 softtabstop=0]])
|
||||
|
||||
cmd([[ autocmd BufNewFile,BufRead *.proto setfiletype proto ]])
|
||||
cmd([[ autocmd FileType proto setlocal shiftwidth=2 expandtab ]])
|
||||
|
||||
@@ -4,204 +4,188 @@ require('core.lazy')
|
||||
require('core.filetype')
|
||||
require('core.keymap')
|
||||
require('core.extension')
|
||||
|
||||
local cmd = vim.cmd
|
||||
local o_s = vim.o
|
||||
local map_key = vim.api.nvim_set_keymap
|
||||
local g = vim.g
|
||||
local api = vim.api
|
||||
local fn = vim.fn
|
||||
local ncmd = vim.api.nvim_command
|
||||
local o, wo, bo = vim.o, vim.wo, vim.bo
|
||||
|
||||
local buffer = { o, bo }
|
||||
local window = { o, wo }
|
||||
|
||||
|
||||
local utils = require('utils')
|
||||
local map = utils.map
|
||||
local set = utils.set
|
||||
|
||||
--vim.lsp.set_log_level('debug')
|
||||
-- Preset
|
||||
-- Prerequisites Must have neovim installed
|
||||
|
||||
|
||||
-- -- Ensure packer installed
|
||||
-- local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
|
||||
-- if fn.empty(fn.glob(install_path)) > 0 then
|
||||
-- fn.system({ 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path })
|
||||
-- cmd('packadd packer.nvim')
|
||||
--
|
||||
-- local cmd = vim.cmd
|
||||
-- local o_s = vim.o
|
||||
-- local map_key = vim.api.nvim_set_keymap
|
||||
-- local g = vim.g
|
||||
-- local api = vim.api
|
||||
-- local fn = vim.fn
|
||||
-- local ncmd = vim.api.nvim_command
|
||||
-- local o, wo, bo = vim.o, vim.wo, vim.bo
|
||||
--
|
||||
-- local buffer = { o, bo }
|
||||
-- local window = { o, wo }
|
||||
--
|
||||
--
|
||||
-- local utils = require('utils')
|
||||
-- local map = utils.map
|
||||
-- local set = utils.set
|
||||
--
|
||||
-- --vim.lsp.set_log_level('debug')
|
||||
-- -- Preset
|
||||
-- -- Prerequisites Must have neovim installed
|
||||
--
|
||||
--
|
||||
-- -- -- Ensure packer installed
|
||||
-- -- local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
|
||||
-- -- if fn.empty(fn.glob(install_path)) > 0 then
|
||||
-- -- fn.system({ 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path })
|
||||
-- -- cmd('packadd packer.nvim')
|
||||
-- -- end
|
||||
-- --
|
||||
-- -- reopen last position
|
||||
-- -- cmd([[ autocmd BufReadPost * normal! g`" ]])
|
||||
--
|
||||
-- -- Shcemas and colors
|
||||
-- -- cmd([[ colorscheme tokyonight ]])
|
||||
-- --set('background', 'dark') -- 主题背景 dark-深色; light-浅色
|
||||
--
|
||||
-- -- CMDs
|
||||
-- -- cmd [[syntax enable]]
|
||||
-- -- cmd [[syntax on]] -- 开启文件类型侦测
|
||||
-- -- in makefiles, don't expand tabs to spaces, since actual tab characters are
|
||||
-- -- needed, and have indentation at 8 chars to be sure that all indents are tabs
|
||||
-- -- (despite the mappings later):
|
||||
--
|
||||
-- -- auto compile packer
|
||||
-- -- cmd([[
|
||||
-- -- augroup packer_user_config
|
||||
-- -- autocmd!
|
||||
-- -- autocmd BufWritePost plugins.lua source <afile> | PackerCompile
|
||||
-- -- augroup end
|
||||
-- -- ]])
|
||||
-- -- autocmd BufRead,BufNewFile *.bean,*.beancount set filetype=beancount
|
||||
--
|
||||
-- -- cmd [[command ShowBlank set listchars=eol:¬,tab:>·,trail:~,extends:>,precedes:<,space:␣]]
|
||||
--
|
||||
-- -- Settings
|
||||
-- -- max timeout for common command
|
||||
-- set('timeoutlen', 1000)
|
||||
-- -- set number, cusor or line/column
|
||||
-- set('nu', true, window)
|
||||
-- set('rnu', true, window)
|
||||
-- set('cul', true, window)
|
||||
-- set('cuc', true, window)
|
||||
--
|
||||
-- -- tab 缩进
|
||||
-- -- set("tabstop", 4) -- 设置Tab长度为4空格
|
||||
-- -- set("shiftwidth", 4) -- 设置自动缩进长度为4空格
|
||||
-- -- set("autoindent", true) -- 继承前一行的缩进方式,适用于多行注释
|
||||
-- -- set("colorcolumn", "80") -- 设置长度提示79
|
||||
-- -- set('noswapfile', true) -- 不设置swap文件
|
||||
--
|
||||
-- set('showmatch', true) -- 显示括号匹配
|
||||
-- set('mouse', 'a') -- set scroll mode
|
||||
-- set('langmenu', 'zh_CN.UTF-8')
|
||||
-- set('helplang', 'cn')
|
||||
-- set('encoding', 'utf-8')
|
||||
-- set('fencs', 'utf-8,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936')
|
||||
-- set('hidden', true)
|
||||
-- set('wildmenu', true)
|
||||
-- set('hlsearch', true)
|
||||
-- set('matchtime', 1)
|
||||
-- set('updatetime', 100)
|
||||
-- set('smarttab', true)
|
||||
-- set('expandtab', true)
|
||||
-- set('laststatus', 2)
|
||||
-- set('showcmd', true)
|
||||
-- set('ruler', true)
|
||||
-- set('history', 300)
|
||||
-- set('backup', false)
|
||||
-- set('swapfile', false)
|
||||
-- set('foldenable', false)
|
||||
-- set('autoread', true)
|
||||
-- set('autowrite', true)
|
||||
-- set('mouse', 'a')
|
||||
-- set('incsearch', true) -- 开启实时搜索
|
||||
-- set('ignorecase', true) -- 搜索时大小写不敏感
|
||||
--
|
||||
-- set('number', true, window)
|
||||
-- -- set('relativenumber', true, window)
|
||||
-- set('cursorline', true, window)
|
||||
-- set('cursorcolumn', true, window)
|
||||
-- set('signcolumn', 'auto:2')
|
||||
--
|
||||
-- -- set("textwidth", 120, buffer)
|
||||
-- set('smartindent', true, buffer)
|
||||
-- set('autoindent', true, buffer)
|
||||
-- set('cindent', true, buffer)
|
||||
-- set('shiftwidth', 4, buffer)
|
||||
-- set('softtabstop', 4, buffer)
|
||||
-- set('tabstop', 4, buffer)
|
||||
-- set('synmaxcol', 120)
|
||||
--
|
||||
-- -- set autowrite
|
||||
-- -- set("backspace", "indent,eol,start")
|
||||
--
|
||||
-- -- Key mappings
|
||||
-- -- map Leader key to <space>
|
||||
-- -- g.mapleader = [[ ]]
|
||||
--
|
||||
-- -- v 模式下复制内容到系统剪切板
|
||||
-- map('v', '<Leader>cp', '"+yy')
|
||||
-- -- n 模式下复制一行到系统剪切板
|
||||
-- map('n', '<Leader>cp', '"+yy')
|
||||
-- -- n 模式下粘贴系统剪切板的内容
|
||||
-- map('n', '<Leader>v', '"+p')
|
||||
-- -- reload vimrc
|
||||
-- -- map('n', '<leader>rv', ':source $MYVIMRC<CR>')
|
||||
--
|
||||
-- -- insert mode mapping
|
||||
-- --map('i', '<c-b>', '<c-o>b')
|
||||
-- --map('i', '<c-f>', '<c-o>l')
|
||||
-- --map('i', '<c-j>', '<c-o>j')
|
||||
-- --map('i', '<c-k>', '<c-o>k')
|
||||
--
|
||||
-- -- map('n', '<F1>', '<nop>')
|
||||
-- -- map('i', '<F1>', '<nop>')
|
||||
--
|
||||
-- --map('i', '<c-k>', '<up>')
|
||||
-- --map('i', '<c-j>', '<down>')
|
||||
-- --map('i', '<c-h>', '<left>')
|
||||
-- --map('i', '<c-l>', '<right>')
|
||||
--
|
||||
-- -- map('n', '<leader>e', '1<c-w>w')
|
||||
-- -- map('n', '<leader>p', ':wincmd p<CR>')
|
||||
--
|
||||
-- map('i', '<C-e>', 'copilot#Accept()', { expr = true })
|
||||
-- vim.g.copilot_no_tab_map = 1
|
||||
-- vim.g.copilot_no_maps = 1
|
||||
-- vim.g.copilot_assume_mapped = 1
|
||||
--
|
||||
--
|
||||
-- -- require('plugins')
|
||||
--
|
||||
-- -- Neoformat
|
||||
-- if not fn.executable('luafmt') then
|
||||
-- cmd([[ :!npm install -g lua-fmt]])
|
||||
-- end
|
||||
--
|
||||
-- reopen last position
|
||||
-- cmd([[ autocmd BufReadPost * normal! g`" ]])
|
||||
|
||||
-- Shcemas and colors
|
||||
-- cmd([[ colorscheme tokyonight ]])
|
||||
--set('background', 'dark') -- 主题背景 dark-深色; light-浅色
|
||||
|
||||
-- CMDs
|
||||
-- cmd [[syntax enable]]
|
||||
-- cmd [[syntax on]] -- 开启文件类型侦测
|
||||
cmd('filetype plugin indent on')
|
||||
cmd([[ autocmd FileType php setlocal tabstop=2 shiftwidth=2 softtabstop=2 textwidth=120 ]])
|
||||
cmd([[ autocmd FileType python setlocal tabstop=4 shiftwidth=4 softtabstop=4 ]])
|
||||
cmd([[ autocmd FileType json setlocal tabstop=2 shiftwidth=2 softtabstop=2 expandtab ]])
|
||||
cmd([[ autocmd FileType go setlocal tabstop=8 shiftwidth=8 softtabstop=8 textwidth=120 noexpandtab ]])
|
||||
-- in makefiles, don't expand tabs to spaces, since actual tab characters are
|
||||
-- needed, and have indentation at 8 chars to be sure that all indents are tabs
|
||||
-- (despite the mappings later):
|
||||
cmd([[ autocmd FileType make set noexpandtab shiftwidth=8 softtabstop=0]])
|
||||
cmd([[ autocmd FileType html,htmldjango,xhtml,haml setlocal tabstop=2 shiftwidth=2 softtabstop=2 textwidth=0 ]])
|
||||
cmd([[ autocmd FileType yaml setlocal tabstop=2 shiftwidth=2 softtabstop=2 textwidth=0 expandtab ]])
|
||||
cmd([[ autocmd FileType ruby setlocal tabstop=2 shiftwidth=2 softtabstop=2 textwidth=120 ]])
|
||||
cmd([[ autocmd FileType less,sass,scss,css setlocal tabstop=2 shiftwidth=2 softtabstop=2 textwidth=120 ]])
|
||||
cmd(
|
||||
[[ autocmd FileType javascript,javascript.jsx,javascriptreact,typescript,typescriptreact setlocal tabstop=2 shiftwidth=2 softtabstop=4 expandtab ]]
|
||||
)
|
||||
|
||||
cmd([[iabbrev pdb import pdb; pdb.set_trace()<ESC>]])
|
||||
cmd([[iabbrev ipdb import ipdb; ipdb.set_trace()<ESC>]])
|
||||
-- auto compile packer
|
||||
-- cmd([[
|
||||
-- augroup packer_user_config
|
||||
-- autocmd!
|
||||
-- autocmd BufWritePost plugins.lua source <afile> | PackerCompile
|
||||
-- augroup end
|
||||
-- ]])
|
||||
-- autocmd BufRead,BufNewFile *.bean,*.beancount set filetype=beancount
|
||||
|
||||
-- cmd [[command ShowBlank set listchars=eol:¬,tab:>·,trail:~,extends:>,precedes:<,space:␣]]
|
||||
|
||||
-- Settings
|
||||
-- max timeout for common command
|
||||
set('timeoutlen', 1000)
|
||||
-- set number, cusor or line/column
|
||||
set('nu', true, window)
|
||||
set('rnu', true, window)
|
||||
set('cul', true, window)
|
||||
set('cuc', true, window)
|
||||
|
||||
-- tab 缩进
|
||||
-- set("tabstop", 4) -- 设置Tab长度为4空格
|
||||
-- set("shiftwidth", 4) -- 设置自动缩进长度为4空格
|
||||
-- set("autoindent", true) -- 继承前一行的缩进方式,适用于多行注释
|
||||
-- set("colorcolumn", "80") -- 设置长度提示79
|
||||
-- set('noswapfile', true) -- 不设置swap文件
|
||||
|
||||
set('showmatch', true) -- 显示括号匹配
|
||||
set('mouse', 'a') -- set scroll mode
|
||||
set('langmenu', 'zh_CN.UTF-8')
|
||||
set('helplang', 'cn')
|
||||
set('encoding', 'utf-8')
|
||||
set('fencs', 'utf-8,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936')
|
||||
set('hidden', true)
|
||||
set('wildmenu', true)
|
||||
set('hlsearch', true)
|
||||
set('matchtime', 1)
|
||||
set('updatetime', 100)
|
||||
set('smarttab', true)
|
||||
set('expandtab', true)
|
||||
set('laststatus', 2)
|
||||
set('showcmd', true)
|
||||
set('ruler', true)
|
||||
set('history', 300)
|
||||
set('backup', false)
|
||||
set('swapfile', false)
|
||||
set('foldenable', false)
|
||||
set('autoread', true)
|
||||
set('autowrite', true)
|
||||
set('mouse', 'a')
|
||||
set('incsearch', true) -- 开启实时搜索
|
||||
set('ignorecase', true) -- 搜索时大小写不敏感
|
||||
|
||||
set('number', true, window)
|
||||
-- set('relativenumber', true, window)
|
||||
set('cursorline', true, window)
|
||||
set('cursorcolumn', true, window)
|
||||
set('signcolumn', 'auto:2')
|
||||
|
||||
-- set("textwidth", 120, buffer)
|
||||
set('smartindent', true, buffer)
|
||||
set('autoindent', true, buffer)
|
||||
set('cindent', true, buffer)
|
||||
set('shiftwidth', 4, buffer)
|
||||
set('softtabstop', 4, buffer)
|
||||
set('tabstop', 4, buffer)
|
||||
set('synmaxcol', 120)
|
||||
|
||||
-- set autowrite
|
||||
-- set("backspace", "indent,eol,start")
|
||||
|
||||
-- Key mappings
|
||||
-- map Leader key to <space>
|
||||
-- g.mapleader = [[ ]]
|
||||
|
||||
-- v 模式下复制内容到系统剪切板
|
||||
map('v', '<Leader>cp', '"+yy')
|
||||
-- n 模式下复制一行到系统剪切板
|
||||
map('n', '<Leader>cp', '"+yy')
|
||||
-- n 模式下粘贴系统剪切板的内容
|
||||
map('n', '<Leader>v', '"+p')
|
||||
-- reload vimrc
|
||||
map('n', '<leader>rv', ':source $MYVIMRC<CR>')
|
||||
|
||||
-- insert mode mapping
|
||||
--map('i', '<c-b>', '<c-o>b')
|
||||
--map('i', '<c-f>', '<c-o>l')
|
||||
--map('i', '<c-j>', '<c-o>j')
|
||||
--map('i', '<c-k>', '<c-o>k')
|
||||
|
||||
map('n', '<F1>', '<nop>')
|
||||
map('i', '<F1>', '<nop>')
|
||||
|
||||
--map('i', '<c-k>', '<up>')
|
||||
--map('i', '<c-j>', '<down>')
|
||||
--map('i', '<c-h>', '<left>')
|
||||
--map('i', '<c-l>', '<right>')
|
||||
|
||||
-- map('n', '<leader>e', '1<c-w>w')
|
||||
-- map('n', '<leader>p', ':wincmd p<CR>')
|
||||
|
||||
map('i', '<C-e>', 'copilot#Accept()', { expr = true })
|
||||
vim.g.copilot_no_tab_map = 1
|
||||
vim.g.copilot_no_maps = 1
|
||||
vim.g.copilot_assume_mapped = 1
|
||||
|
||||
|
||||
-- require('plugins')
|
||||
require('funcs')
|
||||
|
||||
-- Neoformat
|
||||
if not fn.executable('luafmt') then
|
||||
cmd([[ :!npm install -g lua-fmt]])
|
||||
end
|
||||
|
||||
-- barbar
|
||||
local opts = { noremap = true, silent = true }
|
||||
map('n', '=', ':BufferPick<CR>', opts)
|
||||
|
||||
-- choosewin
|
||||
map('n', '-', '<Plug>(choosewin)', { noremap = false })
|
||||
|
||||
-- sort go imports
|
||||
-- vim.api.nvim_create_autocmd('BufWritePre', {
|
||||
-- pattern = '*.go',
|
||||
-- callback = function()
|
||||
-- vim.lsp.buf.code_action({ context = { only = { 'source.organizeImports' } }, apply = true })
|
||||
-- end
|
||||
-- })
|
||||
|
||||
-- Some configurations not able to migrate
|
||||
-- api.nvim_exec(
|
||||
-- [[
|
||||
-- " set nocompatible
|
||||
-- "function! NearestMethodOrFunction() abort
|
||||
-- " return get(b:, 'vista_nearest_method_or_function', '')
|
||||
-- "endfunction
|
||||
-- "
|
||||
-- "set statusline+=%{NearestMethodOrFunction()}
|
||||
-- ]],
|
||||
-- false
|
||||
-- )
|
||||
-- -- barbar
|
||||
-- local opts = { noremap = true, silent = true }
|
||||
-- map('n', '=', ':BufferPick<CR>', opts)
|
||||
--
|
||||
-- -- choosewin
|
||||
-- map('n', '-', '<Plug>(choosewin)', { noremap = false })
|
||||
--
|
||||
-- -- sort go imports
|
||||
-- -- vim.api.nvim_create_autocmd('BufWritePre', {
|
||||
-- -- pattern = '*.go',
|
||||
-- -- callback = function()
|
||||
-- -- vim.lsp.buf.code_action({ context = { only = { 'source.organizeImports' } }, apply = true })
|
||||
-- -- end
|
||||
-- -- })
|
||||
--
|
||||
-- -- Some configurations not able to migrate
|
||||
-- -- api.nvim_exec(
|
||||
-- -- [[
|
||||
-- -- " set nocompatible
|
||||
-- -- "function! NearestMethodOrFunction() abort
|
||||
-- -- " return get(b:, 'vista_nearest_method_or_function', '')
|
||||
-- -- "endfunction
|
||||
-- -- "
|
||||
-- -- "set statusline+=%{NearestMethodOrFunction()}
|
||||
-- -- ]],
|
||||
-- -- false
|
||||
-- -- )
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
local map = vim.keymap.set
|
||||
|
||||
-- Key bindings
|
||||
map('', '<c-a>', 'ggVG$"+y')
|
||||
map('v', '<c-c>', '"+y')
|
||||
map('v', '<tab>', '>gv')
|
||||
map('v', '<s-tab>', '<gv')
|
||||
map('i', '<c-b>', '<c-o>b')
|
||||
map('i', '<c-f>', '<c-o>l')
|
||||
map('i', '<c-h>', '<c-o>h')
|
||||
map('i', '<c-l>', '<c-o>l')
|
||||
map('i', '<c-j>', '<c-o>j')
|
||||
map('i', '<c-k>', '<c-o>k')
|
||||
map('c', '<c-h>', '<Left>')
|
||||
map('c', '<c-l>', '<Right>')
|
||||
map('c', '<c-b>', '<Left>')
|
||||
map('c', '<c-f>', '<Right>')
|
||||
|
||||
@@ -15,6 +15,7 @@ vim.opt.rtp:prepend(lazypath)
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
{ import = 'plugins' },
|
||||
{ import = 'plugins.lsp' },
|
||||
},
|
||||
ui = {
|
||||
border = 'rounded',
|
||||
|
||||
@@ -2,7 +2,51 @@ if vim.fn.has('nvim') == 0 then
|
||||
return
|
||||
end
|
||||
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
vim.o.termguicolors = true
|
||||
|
||||
vim.g.mapleader = " " -- Make sure to set `mapleader` before lazy so your mappings are correct
|
||||
vim.g.maplocalleader = "\\" -- Same for `maplocalleader`
|
||||
vim.g.mapleader = ' ' -- Make sure to set `mapleader` before lazy so your mappings are correct
|
||||
vim.g.maplocalleader = '\\' -- Same for `maplocalleader`
|
||||
|
||||
vim.o.encoding = 'utf-8'
|
||||
vim.o.fileencoding = 'utf-8'
|
||||
vim.o.fencs = 'utf-8,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936'
|
||||
vim.o.hidden = true
|
||||
vim.o.wildmenu = true
|
||||
vim.o.hlsearch = true
|
||||
vim.o.incsearch = true
|
||||
vim.o.matchtime = 1
|
||||
vim.o.showmatch = true
|
||||
vim.o.updatetime = 100
|
||||
vim.o.ignorecase = true
|
||||
vim.o.smarttab = true
|
||||
vim.o.expandtab = true
|
||||
vim.o.laststatus = 2
|
||||
vim.o.showcmd = true
|
||||
vim.o.ruler = true
|
||||
vim.o.history = 300
|
||||
vim.o.backup = false
|
||||
vim.o.swapfile = false
|
||||
vim.o.foldenable = false
|
||||
vim.o.autoread = true
|
||||
vim.o.autowrite = true
|
||||
vim.o.mouse = 'a'
|
||||
|
||||
vim.o.number = true
|
||||
vim.o.cursorline = true
|
||||
vim.o.relativenumber = true
|
||||
vim.o.cursorcolumn = true
|
||||
vim.o.signcolumn = 'auto:1'
|
||||
-- vim.o.cmdheight = 0
|
||||
vim.opt.list = true
|
||||
vim.opt.listchars:append('eol:↴')
|
||||
vim.opt.fillchars:append { diff = '╱' }
|
||||
|
||||
vim.o.textwidth = 120
|
||||
vim.o.smartindent = true
|
||||
vim.o.autoindent = true
|
||||
vim.o.cindent = true
|
||||
vim.o.shiftwidth = 4
|
||||
vim.o.softtabstop = 4
|
||||
vim.o.tabstop = 4
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
local fn = vim.fn
|
||||
|
||||
function GetPath()
|
||||
fn.setreg('+', fn.getreg('%'))
|
||||
end
|
||||
@@ -30,6 +30,8 @@ return {
|
||||
char = '|',
|
||||
highlight = highlight,
|
||||
},
|
||||
whitespace = {
|
||||
},
|
||||
exclude = {
|
||||
buftypes = {
|
||||
'terminal',
|
||||
|
||||
1
nvim/lua/plugins/lsp/mason.lua
Normal file
1
nvim/lua/plugins/lsp/mason.lua
Normal file
@@ -0,0 +1 @@
|
||||
return {}
|
||||
Reference in New Issue
Block a user