whatver
This commit is contained in:
@ -1,26 +1,29 @@
|
|||||||
vim.cmd("source " .. vim.fn.expand("$HOME") .. "/.vimrc")
|
vim.cmd("source " .. vim.env.HOME .. "/.vimrc")
|
||||||
|
|
||||||
local use_google = require("utils").use_google
|
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
vim.fn.system({
|
vim.fn.system({
|
||||||
"git",
|
"git",
|
||||||
"clone",
|
"clone",
|
||||||
"--filter=blob:none",
|
"--filter=blob:none",
|
||||||
"https://github.com/folke/lazy.nvim.git",
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
lazypath,
|
lazypath,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
vim.opt.rtp:prepend(vim.env.HOME .. "/.vim")
|
||||||
|
vim.opt.rtp:prepend(vim.env.HOME .. "/.vim/lua")
|
||||||
|
|
||||||
package.path = package.path .. ";" .. vim.env.HOME .. "/.vim/lua/?.lua"
|
package.path = package.path .. ";" .. vim.env.HOME .. "/.vim/lua/?.lua"
|
||||||
|
|
||||||
local plugins = {
|
local plugins = {
|
||||||
-- this entry tells lazy.nvim to load the list of of *.lua files from plugins/
|
-- this entry tells lazy.nvim to load the list of of *.lua files from plugins/
|
||||||
{ import = "plugins" },
|
{ import = "plugins" },
|
||||||
}
|
}
|
||||||
require("lazy").setup(plugins)
|
|
||||||
require("config.clipboard")
|
require("config.clipboard")
|
||||||
|
require("config.tmpl")
|
||||||
require("config.zip")
|
require("config.zip")
|
||||||
|
|
||||||
|
require("lazy").setup(plugins)
|
||||||
|
|
||||||
vim.opt.undodir = vim.fn.expand("$HOME") .. "/.undo/"
|
vim.opt.undodir = vim.fn.expand("$HOME") .. "/.undo/"
|
||||||
|
83
config/.config/nvim/syntax/gotmpl.vim
Normal file
83
config/.config/nvim/syntax/gotmpl.vim
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
" Copyright 2011 The Go Authors. All rights reserved.
|
||||||
|
" Use of this source code is governed by a BSD-style
|
||||||
|
" license that can be found in the LICENSE file.
|
||||||
|
"
|
||||||
|
" gotpl.vim: Vim syntax file for Go templates.
|
||||||
|
|
||||||
|
" Quit when a (custom) syntax file was already loaded
|
||||||
|
if exists("b:current_syntax")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
syn case match
|
||||||
|
|
||||||
|
" Go escapes
|
||||||
|
syn match goEscapeOctal display contained "\\[0-7]\{3}"
|
||||||
|
syn match goEscapeC display contained +\\[abfnrtv\\'"]+
|
||||||
|
syn match goEscapeX display contained "\\x\x\{2}"
|
||||||
|
syn match goEscapeU display contained "\\u\x\{4}"
|
||||||
|
syn match goEscapeBigU display contained "\\U\x\{8}"
|
||||||
|
syn match goEscapeError display contained +\\[^0-7xuUabfnrtv\\'"]+
|
||||||
|
|
||||||
|
hi def link goEscapeOctal goSpecialString
|
||||||
|
hi def link goEscapeC goSpecialString
|
||||||
|
hi def link goEscapeX goSpecialString
|
||||||
|
hi def link goEscapeU goSpecialString
|
||||||
|
hi def link goEscapeBigU goSpecialString
|
||||||
|
hi def link goSpecialString Special
|
||||||
|
hi def link goEscapeError Error
|
||||||
|
|
||||||
|
" Strings and their contents
|
||||||
|
syn cluster goStringGroup contains=goEscapeOctal,goEscapeC,goEscapeX,goEscapeU,goEscapeBigU,goEscapeError
|
||||||
|
syn region goString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@goStringGroup
|
||||||
|
syn region goRawString contained start=+`+ end=+`+
|
||||||
|
|
||||||
|
hi def link goString String
|
||||||
|
hi def link goRawString String
|
||||||
|
|
||||||
|
" Characters; their contents
|
||||||
|
syn cluster goCharacterGroup contains=goEscapeOctal,goEscapeC,goEscapeX,goEscapeU,goEscapeBigU
|
||||||
|
syn region goCharacter start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@goCharacterGroup
|
||||||
|
|
||||||
|
hi def link goCharacter Character
|
||||||
|
|
||||||
|
" Integers
|
||||||
|
syn match goDecimalInt contained "\<\d\+\([Ee]\d\+\)\?\>"
|
||||||
|
syn match goHexadecimalInt contained "\<0x\x\+\>"
|
||||||
|
syn match goOctalInt contained "\<0\o\+\>"
|
||||||
|
syn match goOctalError contained "\<0\o*[89]\d*\>"
|
||||||
|
syn cluster goInt contains=goDecimalInt,goHexadecimalInt,goOctalInt
|
||||||
|
" Floating point
|
||||||
|
syn match goFloat contained "\<\d\+\.\d*\([Ee][-+]\d\+\)\?\>"
|
||||||
|
syn match goFloat contained "\<\.\d\+\([Ee][-+]\d\+\)\?\>"
|
||||||
|
syn match goFloat contained "\<\d\+[Ee][-+]\d\+\>"
|
||||||
|
" Imaginary literals
|
||||||
|
syn match goImaginary contained "\<\d\+i\>"
|
||||||
|
syn match goImaginary contained "\<\d\+\.\d*\([Ee][-+]\d\+\)\?i\>"
|
||||||
|
syn match goImaginary contained "\<\.\d\+\([Ee][-+]\d\+\)\?i\>"
|
||||||
|
syn match goImaginary contained "\<\d\+[Ee][-+]\d\+i\>"
|
||||||
|
|
||||||
|
hi def link goInt Number
|
||||||
|
hi def link goFloat Number
|
||||||
|
hi def link goImaginary Number
|
||||||
|
|
||||||
|
" Token groups
|
||||||
|
syn cluster gotplLiteral contains=goString,goRawString,goCharacter,@goInt,goFloat,goImaginary
|
||||||
|
syn keyword gotplControl contained if else end range with template
|
||||||
|
syn keyword gotplFunctions contained and html index js len not or print printf println urlquery eq ne lt le gt ge
|
||||||
|
syn match gotplVariable contained /\$[^ ]*\>/
|
||||||
|
syn match goTplIdentifier contained /\.[^ ]*\>/
|
||||||
|
|
||||||
|
hi def link gotplControl Keyword
|
||||||
|
hi def link gotplFunctions Function
|
||||||
|
hi def link goTplVariable Special
|
||||||
|
|
||||||
|
syn region gotplAction start="{{" end="}}" contains=@gotplLiteral,gotplControl,gotplFunctions,gotplVariable,goTplIdentifier display
|
||||||
|
syn region gotplAction start="\[\[" end="\]\]" contains=@gotplLiteral,gotplControl,gotplFunctions,gotplVariable display
|
||||||
|
syn region goTplComment start="{{/\*" end="\*/}}" display
|
||||||
|
syn region goTplComment start="\[\[/\*" end="\*/\]\]" display
|
||||||
|
|
||||||
|
hi def link gotplAction PreProc
|
||||||
|
hi def link goTplComment Comment
|
||||||
|
|
||||||
|
let b:current_syntax = "gotmpl"
|
Reference in New Issue
Block a user