Signed-off-by: Lee Tang <i@d0zingcat.dev>
This commit is contained in:
Lee Tang
2023-08-10 11:31:54 +08:00
parent 7d09b138e6
commit bca2b6cfea
2 changed files with 18 additions and 18 deletions

View File

@@ -19,15 +19,15 @@ local set = utils.set
-- Preset
-- Prerequisites Must have neovim installed
if fn.has('nvim') == 0 then
return
return
end
-- 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')
fn.system({ 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path })
cmd('packadd packer.nvim')
end
-- reopen last position
@@ -55,7 +55,7 @@ cmd([[ autocmd FileType yaml setlocal tabstop=2 shiftwidth=2 softtabstop=2 textw
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 ]]
[[ 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>]])
@@ -66,8 +66,8 @@ augroup packer_user_config
autocmd!
autocmd BufWritePost plugins.lua source <afile> | PackerCompile
augroup end
autocmd BufRead,BufNewFile *.bean,*.beancount set filetype=beancount
]])
-- autocmd BufRead,BufNewFile *.bean,*.beancount set filetype=beancount
-- cmd [[command ShowBlank set listchars=eol:¬,tab:>·,trail:~,extends:>,precedes:<,space:␣]]
@@ -172,7 +172,7 @@ require('funcs')
-- Neoformat
if not fn.executable('luafmt') then
cmd([[ :!npm install -g lua-fmt]])
cmd([[ :!npm install -g lua-fmt]])
end
-- barbar
@@ -192,7 +192,7 @@ map('n', '-', '<Plug>(choosewin)', { noremap = false })
-- Some configurations not able to migrate
api.nvim_exec(
[[
[[
" set nocompatible
"function! NearestMethodOrFunction() abort
" return get(b:, 'vista_nearest_method_or_function', '')
@@ -200,5 +200,5 @@ api.nvim_exec(
"
"set statusline+=%{NearestMethodOrFunction()}
]],
false
false
)

View File

@@ -72,16 +72,16 @@ local servers = {
},
},
terraformls = {},
beancount = {
-- filetypes = { 'beancount', 'bean' },
cmd = { "beancount-language-server", "--stdio", },
init_options = {
journalFile = ""
},
filetypes = { "beancount", "bean" },
root_dir = nvim_lsp.util.root_pattern("main.bean"),
single_file_support = true,
}
-- beancount = {
-- -- filetypes = { 'beancount', 'bean' },
-- cmd = { "beancount-language-server", "--stdio", },
-- init_options = {
-- journalFile = ""
-- },
-- filetypes = { "beancount", "bean" },
-- root_dir = nvim_lsp.util.root_pattern("main.bean"),
-- single_file_support = true,
-- }
}
local settings = {