home/nvim: remove unused files & small style change

This commit is contained in:
chayleaf 2023-03-15 18:55:46 +07:00
parent d341d8f8f9
commit 20d335b3d8
3 changed files with 4 additions and 155 deletions

View file

@ -404,7 +404,7 @@
in compile "nvim_cmp" (bind (require "cmp") (cmp:
(setup cmp {
snippet = {
expand = args: (call (prop (require "luasnip") "lsp_expand") (prop args "body"));
expand = { body, ... }: call (prop (require "luasnip") "lsp_expand") body;
};
view = { };
window = {
@ -417,10 +417,10 @@
};
};
formatting = {
format = _: vim_item: [
format = _: vim_item: let kind = prop vim_item "kind"; in [
(set
(prop vim_item "kind")
(string.format (let kind = prop vim_item "kind"; in [
kind
(string.format ([
"%s %s"
(tableAttr (require "lspkind") kind)
kind

View file

@ -1,128 +0,0 @@
BufAdd
BufCreate
BufDelete
BufEnter
BufFilePost
BufFilePre
BufHidden
BufLeave
BufModifiedSet
BufNew
BufNewFile
BufRead
BufReadCmd
BufReadPost
BufReadPre
BufUnload
BufWinEnter
BufWinLeave
BufWipeout
BufWrite
BufWriteCmd
BufWritePost
BufWritePre
ChanInfo
ChanOpen
CmdUndefined
CmdWinEnter
CmdWinLeave
CmdlineChanged
CmdlineEnter
CmdlineLeave
ColorScheme
ColorSchemePre
CompleteChanged
CompleteDone
CompleteDonePre
CursorHold
CursorHoldI
CursorMoved
CursorMovedI
DiagnosticChanged
DiffUpdated
DirChanged
DirChangedPre
EncodingChanged
ExitPre
FileAppendCmd
FileAppendPost
FileAppendPre
FileChangedRO
FileChangedShell
FileChangedShellPost
FileEncoding
FileReadCmd
FileReadPost
FileReadPre
FileType
FileWriteCmd
FileWritePost
FileWritePre
FilterReadPost
FilterReadPre
FilterWritePost
FilterWritePre
FocusGained
FocusLost
FuncUndefined
GUIEnter
GUIFailed
InsertChange
InsertCharPre
InsertEnter
InsertLeave
InsertLeavePre
LspAttach
LspDetach
MenuPopup
ModeChanged
OptionSet
QuickFixCmdPost
QuickFixCmdPre
QuitPre
RecordingEnter
RecordingLeave
RemoteReply
SearchWrapped
SessionLoadPost
ShellCmdPost
ShellFilterPost
Signal
SourceCmd
SourcePost
SourcePre
SpellFileMissing
StdinReadPost
StdinReadPre
SwapExists
Syntax
TabClosed
TabEnter
TabLeave
TabNew
TabNewEntered
TermChanged
TermClose
TermEnter
TermLeave
TermOpen
TermResponse
TextChanged
TextChangedI
TextChangedP
TextYankPost
UIEnter
UILeave
User
VimEnter
VimLeave
VimLeavePre
VimResized
VimResume
VimSuspend
WinClosed
WinEnter
WinLeave
WinNew
WinScrolled

View file

@ -1,23 +0,0 @@
import os, json
d = os.path.dirname(os.path.realpath(__file__))
j = lambda x: os.path.join(d, x)
x = open(j("vim-lua.txt"),'rt').read().split('\n')
y = open(j("vim-opts.txt"),'rt').read().split('\n')
a = {}
def add(w, k, v):
if w.get(k[0]) is None:
w[k[0]] = {}
if len(k) == 1:
w[k[0]] = v
else:
add(w[k[0]], k[1:], v)
for w in x:
if w:
if w.startswith('function/'):
t, ar, n = w.split('/')
add(a, {'type'})
else:
t, n = w.split('/')