Compare commits
No commits in common. "724a67f1e9dc3d58ce53dbed4dfd843b5831ec11" and "53a2d9a4f1d92555add896eb8dd28318f5ba468a" have entirely different histories.
724a67f1e9
...
53a2d9a4f1
25
conf.d/lvim/after/ftplugin/python.lua
Normal file
25
conf.d/lvim/after/ftplugin/python.lua
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
--[[--
|
||||||
|
File : python.lua
|
||||||
|
Author : Jeff Lance <email@jefflance.me>
|
||||||
|
Date : 06.08.2023 12:46:43
|
||||||
|
Last Modified Date: 06.08.2023 12:46:43
|
||||||
|
Last Modified By : Jeff Lance <email@jefflance.me>
|
||||||
|
--]]--
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- linters
|
||||||
|
--
|
||||||
|
|
||||||
|
local linters = require("lvim.lsp.null-ls.linters")
|
||||||
|
linters.setup({
|
||||||
|
{ command = "flake8", filetypes = { "python" } },
|
||||||
|
})
|
||||||
|
|
||||||
|
-- formatters
|
||||||
|
--
|
||||||
|
|
||||||
|
local formatters = require("lvim.lsp.null-ls.formatters")
|
||||||
|
formatters.setup({
|
||||||
|
{ name = "black" },
|
||||||
|
})
|
26
conf.d/lvim/after/ftplugin/tex.lua
Normal file
26
conf.d/lvim/after/ftplugin/tex.lua
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
--[[--
|
||||||
|
File : /home/jeff/.config/lvim/after/ftplugin/tex.lua
|
||||||
|
Author : Jeff Lance <email@jefflance.me>
|
||||||
|
Date : 05.08.2023 00:54:40
|
||||||
|
Last Modified Date: 05.08.2023 00:54:40
|
||||||
|
Last Modified By : Jeff Lance <email@jefflance.me>
|
||||||
|
--]]--
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- linters
|
||||||
|
--
|
||||||
|
|
||||||
|
local linters = require("lvim.lsp.null-ls.linters")
|
||||||
|
linters.setup({
|
||||||
|
{ command = "chktex", filetypes = { "tex" } },
|
||||||
|
})
|
||||||
|
|
||||||
|
-- formatters
|
||||||
|
--
|
||||||
|
|
||||||
|
local formatters = require("lvim.lsp.null-ls.formatters")
|
||||||
|
formatters.setup({
|
||||||
|
{ command = "latexindent", filetypes = { "tex" } },
|
||||||
|
})
|
||||||
|
|
@ -1,260 +0,0 @@
|
|||||||
" Vim syntax file
|
|
||||||
" Language: Asymptote
|
|
||||||
" Maintainer: Andy Hammerlindl
|
|
||||||
" Last Change: 2022 Jan 05
|
|
||||||
|
|
||||||
" Hacked together from Bram Moolenaar's C syntax file, and Claudio Fleiner's
|
|
||||||
" Java syntax file.
|
|
||||||
|
|
||||||
" For version 5.x: Clear all syntax items
|
|
||||||
" For version 6.x: Quit when a syntax file was already loaded
|
|
||||||
if version < 600
|
|
||||||
syn clear
|
|
||||||
elseif exists("b:current_syntax")
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
|
|
||||||
" useful C/C++/Java keywords
|
|
||||||
syn keyword asyStatement break return continue unravel
|
|
||||||
syn keyword asyConditional if else
|
|
||||||
syn keyword asyRepeat while for do
|
|
||||||
syn keyword asyExternal access from import include
|
|
||||||
syn keyword asyOperator new operator
|
|
||||||
|
|
||||||
" basic asymptote keywords
|
|
||||||
syn keyword asyConstant VERSION
|
|
||||||
syn keyword asyConstant true false default infinity inf nan
|
|
||||||
syn keyword asyConstant null nullframe nullpath nullpen
|
|
||||||
syn keyword asyConstant intMin intMax realMin realMax
|
|
||||||
syn keyword asyConstant realEpsilon realDigits
|
|
||||||
syn keyword asyPathSpec and cycle controls tension atleast curl
|
|
||||||
syn keyword asyStorageClass static public restricted private explicit
|
|
||||||
syn keyword asyStructure struct typedef
|
|
||||||
syn keyword asyType void bool bool3 int real string file
|
|
||||||
syn keyword asyType pair triple transform guide path pen frame
|
|
||||||
syn keyword asyType picture
|
|
||||||
|
|
||||||
" module specific keywords
|
|
||||||
if exists("asy_syn_plain")
|
|
||||||
syn keyword asyConstant currentpicture currentpen defaultpen
|
|
||||||
syn keyword asyConstant inch inches cm mm bp pt up down right left
|
|
||||||
syn keyword asyConstant E NE N NW W SW S SE
|
|
||||||
syn keyword asyConstant ENE NNE NNW WNW WSW SSW SSE ESE
|
|
||||||
syn keyword asyConstant I pi twopi
|
|
||||||
syn keyword asyConstant CCW CW
|
|
||||||
syn keyword asyConstant undefined sqrtEpsilon Align mantissaBits
|
|
||||||
syn keyword asyConstant identity zeroTransform invert
|
|
||||||
syn keyword asyConstant stdin stdout
|
|
||||||
syn keyword asyConstant unitsquare unitcircle circleprecision
|
|
||||||
syn keyword asyConstant solid dotted Dotted dashed dashdotted
|
|
||||||
syn keyword asyConstant longdashed longdashdotted
|
|
||||||
syn keyword asyConstant squarecap roundcap extendcap
|
|
||||||
syn keyword asyConstant miterjoin roundjoin beveljoin
|
|
||||||
syn keyword asyConstant zerowinding evenodd basealign nobasealign
|
|
||||||
syn keyword asyConstant black white gray red green blue Cyan Magenta
|
|
||||||
syn keyword asyConstant Yellow Black cyan magenta yellow palered
|
|
||||||
syn keyword asyConstant palegreen paleblue palecyan palemagenta
|
|
||||||
syn keyword asyConstant paleyellow palegray lightred lightgreen
|
|
||||||
syn keyword asyConstant lightblue lightcyan lightmagenta lightyellow
|
|
||||||
syn keyword asyConstant lightgray mediumred mediumgreen mediumblue
|
|
||||||
syn keyword asyConstant mediumcyan mediummagenta mediumyellow
|
|
||||||
syn keyword asyConstant mediumgray heavyred heavygreen heavyblue
|
|
||||||
syn keyword asyConstant heavycyan heavymagenta lightolive heavygray
|
|
||||||
syn keyword asyConstant deepred deepgreen deepblue deepcyan
|
|
||||||
syn keyword asyConstant deepmagenta deepyellow deepgray darkred
|
|
||||||
syn keyword asyConstant darkgreen darkblue darkcyan darkmagenta
|
|
||||||
syn keyword asyConstant darkolive darkgray orange fuchsia chartreuse
|
|
||||||
syn keyword asyConstant springgreen purple royalblue salmon brown
|
|
||||||
syn keyword asyConstant olive darkbrown pink palegrey lightgrey
|
|
||||||
syn keyword asyConstant mediumgrey grey heavygrey deepgrey darkgrey
|
|
||||||
|
|
||||||
if exists("asy_syn_texcolors")
|
|
||||||
syn keyword asyConstant GreenYellow Yellow Goldenrod Dandelion
|
|
||||||
syn keyword asyConstant Apricot Peach Melon YellowOrange Orange
|
|
||||||
syn keyword asyConstant BurntOrange Bittersweet RedOrange Mahogany
|
|
||||||
syn keyword asyConstant Maroon BrickRed Red OrangeRed RubineRed
|
|
||||||
syn keyword asyConstant WildStrawberry Salmon CarnationPink Magenta
|
|
||||||
syn keyword asyConstant VioletRed Rhodamine Mulberry RedViolet
|
|
||||||
syn keyword asyConstant Fuchsia Lavender Thistle Orchid DarkOrchid
|
|
||||||
syn keyword asyConstant Purple Plum Violet RoyalPurple BlueViolet
|
|
||||||
syn keyword asyConstant Periwinkle CadetBlue CornflowerBlue
|
|
||||||
syn keyword asyConstant MidnightBlue NavyBlue RoyalBlue Blue
|
|
||||||
syn keyword asyConstant Cerulean Cyan ProcessBlue SkyBlue Turquoise
|
|
||||||
syn keyword asyConstant TealBlue Aquamarine BlueGreen Emerald
|
|
||||||
syn keyword asyConstant JungleGreen SeaGreen Green ForestGreen
|
|
||||||
syn keyword asyConstant PineGreen LimeGreen YellowGreen SpringGreen
|
|
||||||
syn keyword asyConstant OliveGreen RawSienna Sepia Brown Tan Gray
|
|
||||||
syn keyword asyConstant Black White
|
|
||||||
endif
|
|
||||||
|
|
||||||
if exists("asy_syn_x11colors")
|
|
||||||
syn keyword asyConstant AliceBlue AntiqueWhite Aqua Aquamarine Azure
|
|
||||||
syn keyword asyConstant Beige Bisque Black BlanchedAlmond Blue
|
|
||||||
syn keyword asyConstant BlueViolet Brown BurlyWood CadetBlue
|
|
||||||
syn keyword asyConstant Chartreuse Chocolate Coral CornflowerBlue
|
|
||||||
syn keyword asyConstant Cornsilk Crimson Cyan DarkBlue DarkCyan
|
|
||||||
syn keyword asyConstant DarkGoldenrod DarkGray DarkGreen DarkKhaki
|
|
||||||
syn keyword asyConstant DarkMagenta DarkOliveGreen DarkOrange
|
|
||||||
syn keyword asyConstant DarkOrchid DarkRed DarkSalmon DarkSeaGreen
|
|
||||||
syn keyword asyConstant DarkSlateBlue DarkSlateGray DarkTurquoise
|
|
||||||
syn keyword asyConstant DarkViolet DeepPink DeepSkyBlue DimGray
|
|
||||||
syn keyword asyConstant DodgerBlue FireBrick FloralWhite ForestGreen
|
|
||||||
syn keyword asyConstant Fuchsia Gainsboro GhostWhite Gold Goldenrod
|
|
||||||
syn keyword asyConstant Gray Green GreenYellow Honeydew HotPink
|
|
||||||
syn keyword asyConstant IndianRed Indigo Ivory Khaki Lavender
|
|
||||||
syn keyword asyConstant LavenderBlush LawnGreen LemonChiffon
|
|
||||||
syn keyword asyConstant LightBlue LightCoral LightCyan
|
|
||||||
syn keyword asyConstant LightGoldenrodYellow LightGreen LightGrey
|
|
||||||
syn keyword asyConstant LightPink LightSalmon LightSeaGreen
|
|
||||||
syn keyword asyConstant LightSkyBlue LightSlateGray LightSteelBlue
|
|
||||||
syn keyword asyConstant LightYellow Lime LimeGreen Linen Magenta
|
|
||||||
syn keyword asyConstant Maroon MediumAquamarine MediumBlue
|
|
||||||
syn keyword asyConstant MediumOrchid MediumPurple MediumSeaGreen
|
|
||||||
syn keyword asyConstant MediumSlateBlue MediumSpringGreen
|
|
||||||
syn keyword asyConstant MediumTurquoise MediumVioletRed MidnightBlue
|
|
||||||
syn keyword asyConstant MintCream MistyRose Moccasin NavajoWhite
|
|
||||||
syn keyword asyConstant Navy OldLace Olive OliveDrab Orange
|
|
||||||
syn keyword asyConstant OrangeRed Orchid PaleGoldenrod PaleGreen
|
|
||||||
syn keyword asyConstant PaleTurquoise PaleVioletRed PapayaWhip
|
|
||||||
syn keyword asyConstant PeachPuff Peru Pink Plum PowderBlue Purple
|
|
||||||
syn keyword asyConstant Red RosyBrown RoyalBlue SaddleBrown Salmon
|
|
||||||
syn keyword asyConstant SandyBrown SeaGreen Seashell Sienna Silver
|
|
||||||
syn keyword asyConstant SkyBlue SlateBlue SlateGray Snow SpringGreen
|
|
||||||
syn keyword asyConstant SteelBlue Tan Teal Thistle Tomato Turquoise
|
|
||||||
syn keyword asyConstant Violet Wheat White WhiteSmoke Yellow
|
|
||||||
syn keyword asyConstant YellowGreen
|
|
||||||
endif
|
|
||||||
|
|
||||||
if exists("asy_syn_three")
|
|
||||||
syn keyword asyType path3 guide3 transform3
|
|
||||||
syn keyword asyType projection light material patch surface tube
|
|
||||||
syn keyword asyConstant currentprojection currentlight defaultrender
|
|
||||||
syn keyword asyConstant identity4 O X Y Z
|
|
||||||
syn keyword asyConstant nolight nullpens
|
|
||||||
syn keyword asyConstant unitsphere unithemisphere unitplane octant1
|
|
||||||
syn keyword asyConstant unitcone unitsolidcone unitcube unitcylinder
|
|
||||||
syn keyword asyConstant unitdisk unittube
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
" string constants
|
|
||||||
syn region asyCString start=+'+ end=+'+ skip=+\\\\\|\\'+ contains=asyCSpecial
|
|
||||||
syn match asyCSpecial display contained +\\\(['"?\\abfnrtv]\|\o\{1,3}\)+
|
|
||||||
syn match asyCSpecial display contained +\\\(x[0-9A-F]\{1,2\}\|$\)+
|
|
||||||
" double quoted strings only special character is \"
|
|
||||||
syn region asyString start=+"+ end=+"+ skip=+\\\\\|\\"+ contains=asySpecial
|
|
||||||
syn match asySpecial display contained +\(\\\)\@1<!\(\\\\\)*\zs\\"+
|
|
||||||
|
|
||||||
|
|
||||||
" number constants
|
|
||||||
syn match asyNumbers display transparent "\<\d\|\.\d"
|
|
||||||
\ contains=asyNumber,asyNumberError
|
|
||||||
syn match asyNumber display contained "\d*\.\=\d*\(e[-+]\=\d\+\)\="
|
|
||||||
" highlight number constants with two '.' or with '.' after an 'e'
|
|
||||||
syn match asyNumberError display contained "\d*\.\(\d\|e[-+]\=\)*\.[0-9.]*"
|
|
||||||
syn match asyNumberError display contained "\d*e[-+]\=\d*\.[0-9.]*"
|
|
||||||
syn match asyNumberError display contained "\d*e[-+]\=\(e[-+]\=\)*\.[0-9.]*"
|
|
||||||
|
|
||||||
|
|
||||||
" comments and comment strings
|
|
||||||
syn keyword asyTodo contained TODO FIXME XXX
|
|
||||||
syn sync ccomment asyComment minlines=15
|
|
||||||
if exists("asy_comment_strings")
|
|
||||||
" A comment can contain asyString, asyCString, and asyNumber. But a "*/"
|
|
||||||
" inside a asy*String in a asyComment DOES end the comment! So we need to
|
|
||||||
" use a special type of asy*String: asyComment*String, which also ends on
|
|
||||||
" "*/", and sees a "*" at the start of the line as comment again.
|
|
||||||
" Unfortunately this doesn't very well work for // type of comments :-(
|
|
||||||
syn match asyCommentSkip contained "^\s*\*\($\|\s\+\)"
|
|
||||||
syn region asyCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+
|
|
||||||
\ end=+\*/+me=s-1
|
|
||||||
\ contains=asySpecial,asyCommentSkip
|
|
||||||
syn region asyCommentCString contained start=+'+ skip=+\\\\\|\\'+ end=+'+
|
|
||||||
\ end=+\*/+me=s-1
|
|
||||||
\ contains=asyCSpecial,asyCommentSkip
|
|
||||||
syn region asyCommentLString contained start=+"+ skip=+\\\\\|\\"+ end=+"+
|
|
||||||
\ end="$" contains=asySpecial
|
|
||||||
syn region asyCommentLCString contained start=+'+ skip=+\\\\\|\\'+ end=+'+
|
|
||||||
\ end="$" contains=asyCSpecial
|
|
||||||
syn region asyCommentL start="//" skip="\\$" end="$" keepend
|
|
||||||
\ contains=asyTodo,asyCommentLString,
|
|
||||||
\ asyCommentLCString,asyNumbers
|
|
||||||
syn region asyComment matchgroup=asyComment start="/\*" end="\*/"
|
|
||||||
\ contains=asyTodo,asyCommentStartError,
|
|
||||||
\ asyCommentString,asyCommentCString,asyNumbers
|
|
||||||
else
|
|
||||||
syn region asyCommentL start="//" skip="\\$" end="$" keepend
|
|
||||||
\ contains=asyTodo
|
|
||||||
syn region asyComment matchgroup=asyComment start="/\*" end="\*/"
|
|
||||||
\ contains=asyTodo,asyCommentStartError
|
|
||||||
endif
|
|
||||||
|
|
||||||
" highlight common errors when starting/ending C comments
|
|
||||||
syn match asyCommentError display "\*/"
|
|
||||||
syn match asyCommentStartError display "/\*"me=e-1 contained
|
|
||||||
|
|
||||||
|
|
||||||
" delimiter matching errors
|
|
||||||
syn region asyCurly transparent start='{' end='}'
|
|
||||||
\ contains=TOP,asyCurlyError
|
|
||||||
syn region asyBrack transparent start='\[' end='\]' matchgroup=asyError
|
|
||||||
\ end=';' contains=TOP,asyBrackError
|
|
||||||
syn region asyParen transparent start='(' end=')' matchgroup=asyError
|
|
||||||
\ end=';' contains=TOP,asyParenError
|
|
||||||
syn match asyCurlyError display '}'
|
|
||||||
syn match asyBrackError display '\]'
|
|
||||||
syn match asyParenError display ')'
|
|
||||||
" for (;;) constructs are exceptions that allow ; inside parenthesis
|
|
||||||
syn region asyParen transparent matchgroup=asyParen
|
|
||||||
\ start='\(for\s*\)\@<=(' end=')'
|
|
||||||
\ contains=TOP,asyParenError
|
|
||||||
|
|
||||||
|
|
||||||
" Define the default highlighting.
|
|
||||||
" For version 5.7 and earlier: only when not done already
|
|
||||||
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
|
||||||
if version >= 508 || !exists("did_asy_syn_inits")
|
|
||||||
if version < 508
|
|
||||||
let did_asy_syn_inits = 1
|
|
||||||
command -nargs=+ HiLink hi link <args>
|
|
||||||
else
|
|
||||||
command -nargs=+ HiLink hi def link <args>
|
|
||||||
endif
|
|
||||||
|
|
||||||
HiLink asyCommentL asyComment
|
|
||||||
HiLink asyConditional Conditional
|
|
||||||
HiLink asyRepeat Repeat
|
|
||||||
HiLink asyNumber Number
|
|
||||||
HiLink asyNumberError asyError
|
|
||||||
HiLink asyCurlyError asyError
|
|
||||||
HiLink asyBracketError asyError
|
|
||||||
HiLink asyParenError asyError
|
|
||||||
HiLink asyCommentError asyError
|
|
||||||
HiLink asyCommentStartError asyError
|
|
||||||
HiLink asyOperator Operator
|
|
||||||
HiLink asyStructure Structure
|
|
||||||
HiLink asyStorageClass StorageClass
|
|
||||||
HiLink asyExternal Include
|
|
||||||
HiLink asyDefine Macro
|
|
||||||
HiLink asyError Error
|
|
||||||
HiLink asyStatement Statement
|
|
||||||
HiLink asyType Type
|
|
||||||
HiLink asyConstant Constant
|
|
||||||
HiLink asyCommentString asyString
|
|
||||||
HiLink asyCommentCString asyString
|
|
||||||
HiLink asyCommentLString asyString
|
|
||||||
HiLink asyCommentLCString asyString
|
|
||||||
HiLink asyCommentSkip asyComment
|
|
||||||
HiLink asyString String
|
|
||||||
HiLink asyCString String
|
|
||||||
HiLink asyComment Comment
|
|
||||||
HiLink asySpecial SpecialChar
|
|
||||||
HiLink asyCSpecial SpecialChar
|
|
||||||
HiLink asyTodo Todo
|
|
||||||
HiLink asyPathSpec Statement
|
|
||||||
|
|
||||||
delcommand HiLink
|
|
||||||
endif
|
|
||||||
|
|
||||||
let b:current_syntax = "c"
|
|
@ -20,7 +20,7 @@ lvim is the global options object
|
|||||||
-- lvim config
|
-- lvim config
|
||||||
lvim.log.level = "warn"
|
lvim.log.level = "warn"
|
||||||
lvim.format_on_save.enabled = true
|
lvim.format_on_save.enabled = true
|
||||||
lvim.format_on_save.pattern = { "*.asy", "*.lua", "*.py", ".toml" }
|
lvim.format_on_save.pattern = { "*.asy", "*.lua", "*.py", "*.tex", ".toml" }
|
||||||
lvim.colorscheme = "onedark_dark"
|
lvim.colorscheme = "onedark_dark"
|
||||||
lvim.background = "dark"
|
lvim.background = "dark"
|
||||||
lvim.transparent_window = true
|
lvim.transparent_window = true
|
||||||
@ -75,8 +75,7 @@ lvim.builtin.which_key.mappings["d"] = lvim.builtin.which_key.mappings[";"]
|
|||||||
lvim.builtin.which_key.mappings["G"] = lvim.builtin.which_key.mappings["g"]
|
lvim.builtin.which_key.mappings["G"] = lvim.builtin.which_key.mappings["g"]
|
||||||
lvim.builtin.which_key.mappings["g"] = {}
|
lvim.builtin.which_key.mappings["g"] = {}
|
||||||
|
|
||||||
lvim.builtin.which_key.mappings["H"] = lvim.builtin.which_key.mappings["h"]
|
lvim.builtin.which_key.mappings["H"] = {
|
||||||
lvim.builtin.which_key.mappings["h"] = {
|
|
||||||
name = "Header",
|
name = "Header",
|
||||||
H = { "<CMD>AddHeader<CR>", "Add header to the file" },
|
H = { "<CMD>AddHeader<CR>", "Add header to the file" },
|
||||||
h = { "<CMD>AddMinHeader<CR>", "Add minimal header to the file" },
|
h = { "<CMD>AddMinHeader<CR>", "Add minimal header to the file" },
|
||||||
@ -143,7 +142,7 @@ lvim.builtin.treesitter.ensure_installed = {
|
|||||||
"yaml",
|
"yaml",
|
||||||
}
|
}
|
||||||
|
|
||||||
lvim.builtin.treesitter.ignore_install = { "comment" }
|
lvim.builtin.treesitter.ignore_install = { "haskell" }
|
||||||
lvim.builtin.treesitter.highlight.enable = true
|
lvim.builtin.treesitter.highlight.enable = true
|
||||||
lvim.builtin.treesitter.rainbow.enable = true
|
lvim.builtin.treesitter.rainbow.enable = true
|
||||||
|
|
||||||
@ -406,9 +405,15 @@ lvim.plugins = {
|
|||||||
]])
|
]])
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"kdheepak/cmp-latex-symbols"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"KeitaNakamura/tex-conceal.vim"
|
"KeitaNakamura/tex-conceal.vim"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
-- "SirVer/ultisnips"
|
||||||
|
},
|
||||||
-- Python management needed plugins
|
-- Python management needed plugins
|
||||||
{
|
{
|
||||||
"ChristianChiarulli/swenv.nvim"
|
"ChristianChiarulli/swenv.nvim"
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
" Vim filetype detection file
|
|
||||||
" Language: Asymptote
|
|
||||||
au BufNewFile,BufRead *.asy setfiletype asy
|
|
@ -1,49 +0,0 @@
|
|||||||
--[[--
|
|
||||||
File : conf.d/lvim/ftplugin/python.lua
|
|
||||||
Author : Jeff Lance <email@jefflance.me>
|
|
||||||
Date : 06.08.2023 12:46:43
|
|
||||||
Last Modified Date: 08.08.2023 19:23:05
|
|
||||||
Last Modified By : Jeff Lance <email@jefflance.me>
|
|
||||||
--]]
|
|
||||||
--
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- Setup debug adapter
|
|
||||||
--
|
|
||||||
lvim.builtin.dap.active = true
|
|
||||||
local mason_path = vim.fn.glob(vim.fn.stdpath "data" .. "/mason/")
|
|
||||||
pcall(function()
|
|
||||||
require("dap-python").setup(mason_path .. "packages/debugpy/venv/bin/python")
|
|
||||||
end)
|
|
||||||
|
|
||||||
-- Setup testing
|
|
||||||
--
|
|
||||||
require("neotest").setup({
|
|
||||||
adapters = {
|
|
||||||
require("neotest-python")({
|
|
||||||
-- Extra arguments for nvim-dap configuration
|
|
||||||
-- See https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for values
|
|
||||||
dap = {
|
|
||||||
justMyCode = false,
|
|
||||||
console = "integratedTerminal",
|
|
||||||
},
|
|
||||||
args = { "--log-level", "DEBUG", "--quiet" },
|
|
||||||
runner = "pytest",
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Linters
|
|
||||||
--
|
|
||||||
local linters = require("lvim.lsp.null-ls.linters")
|
|
||||||
linters.setup({
|
|
||||||
{ command = "flake8", filetypes = { "python" } },
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Formatters
|
|
||||||
--
|
|
||||||
local formatters = require("lvim.lsp.null-ls.formatters")
|
|
||||||
formatters.setup({
|
|
||||||
{ name = "black" },
|
|
||||||
})
|
|
@ -1,11 +1,10 @@
|
|||||||
--[[--
|
--[[--
|
||||||
File : conf.d/lvim/ftplugin/tex.lua
|
File : ftplugin/tex.lua
|
||||||
Author : Jeff Lance <email@jefflance.me>
|
Author : Jeff Lance <email@jefflance.me>
|
||||||
Date : 06.08.2023 11:07:22
|
Date : 06.08.2023 11:07:22
|
||||||
Last Modified Date: 08.08.2023 19:23:36
|
Last Modified Date: 06.08.2023 11:07:22
|
||||||
Last Modified By : Jeff Lance <email@jefflance.me>
|
Last Modified By : Jeff Lance <email@jefflance.me>
|
||||||
--]]
|
--]]--
|
||||||
--
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -16,8 +15,6 @@ if not status_ok then
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Shortcuts
|
|
||||||
--
|
|
||||||
whk.register {
|
whk.register {
|
||||||
["<leader>l"] = {
|
["<leader>l"] = {
|
||||||
name = "LaTeX",
|
name = "LaTeX",
|
||||||
@ -37,12 +34,12 @@ whk.register {
|
|||||||
},
|
},
|
||||||
c = {
|
c = {
|
||||||
name = "Compile",
|
name = "Compile",
|
||||||
c = { "<cmd>VimtexCompile<CR>", "Continuous compile project" },
|
c = { "<cmd>VimtexCompile<CR>", "Compile Project" },
|
||||||
o = {
|
o = {
|
||||||
"<cmd>VimtexCompileOutput<CR>",
|
"<cmd>VimtexCompileOutput<CR>",
|
||||||
"Compile Project and Show Output",
|
"Compile Project and Show Output",
|
||||||
},
|
},
|
||||||
s = { "<cmd>VimtexCompileSS<CR>", "Single-shot compile project" },
|
s = { "<cmd>VimtexCompileSS<CR>", "Compile project super fast" },
|
||||||
e = { "<cmd>VimtexCompileSelected<CR>", "Compile Selected" },
|
e = { "<cmd>VimtexCompileSelected<CR>", "Compile Selected" },
|
||||||
},
|
},
|
||||||
r = {
|
r = {
|
||||||
@ -62,17 +59,3 @@ whk.register {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Linters
|
|
||||||
--
|
|
||||||
local linters = require("lvim.lsp.null-ls.linters")
|
|
||||||
linters.setup({
|
|
||||||
{ command = "chktex", filetypes = { "tex" } },
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Formatters
|
|
||||||
--
|
|
||||||
local formatters = require("lvim.lsp.null-ls.formatters")
|
|
||||||
formatters.setup({
|
|
||||||
{ command = "latexindent", filetypes = { "tex" } },
|
|
||||||
})
|
|
||||||
|
@ -4,8 +4,7 @@ Author : Jeff Lance <email@jefflance.me>
|
|||||||
Date : 05.08.2023 00:54:18
|
Date : 05.08.2023 00:54:18
|
||||||
Last Modified Date: 06.08.2023 12:55:15
|
Last Modified Date: 06.08.2023 12:55:15
|
||||||
Last Modified By : Jeff Lance <email@jefflance.me>
|
Last Modified By : Jeff Lance <email@jefflance.me>
|
||||||
--]]
|
--]]--
|
||||||
--
|
|
||||||
|
|
||||||
-- local get_visual = function(args, parent)
|
-- local get_visual = function(args, parent)
|
||||||
-- if (#parent.snippet.env.LS_SELECT_RAW > 0) then
|
-- if (#parent.snippet.env.LS_SELECT_RAW > 0) then
|
||||||
@ -88,44 +87,9 @@ return {
|
|||||||
-- }
|
-- }
|
||||||
-- ),
|
-- ),
|
||||||
--
|
--
|
||||||
-- maths commands
|
|
||||||
--
|
|
||||||
s({ trig = "lim", dscr = "Limit" },
|
|
||||||
fmta(
|
|
||||||
[[
|
|
||||||
$ \lim\limits_{ <> } <> $
|
|
||||||
]],
|
|
||||||
{
|
|
||||||
i(1),
|
|
||||||
i(2),
|
|
||||||
}
|
|
||||||
)
|
|
||||||
),
|
|
||||||
s({ trig = "xto", dscr = "Limit" },
|
|
||||||
fmta(
|
|
||||||
[[
|
|
||||||
x \to <>
|
|
||||||
]],
|
|
||||||
{
|
|
||||||
i(1),
|
|
||||||
}
|
|
||||||
)
|
|
||||||
),
|
|
||||||
s({ trig = "stack", dscr = "Limit" },
|
|
||||||
fmta(
|
|
||||||
[[
|
|
||||||
\substack{ <> \\ <> }
|
|
||||||
]],
|
|
||||||
{
|
|
||||||
i(1),
|
|
||||||
i(2),
|
|
||||||
}
|
|
||||||
)
|
|
||||||
),
|
|
||||||
--
|
|
||||||
-- environments
|
-- environments
|
||||||
--
|
--
|
||||||
s({ trig = "env", dscr = "A LaTeX empty environment" },
|
s({trig="env", dscr="A LaTeX empty environment"},
|
||||||
fmt(
|
fmt(
|
||||||
[[
|
[[
|
||||||
\begin{<>}[<>]
|
\begin{<>}[<>]
|
||||||
@ -143,7 +107,7 @@ return {
|
|||||||
{ delimiters = "<>" }
|
{ delimiters = "<>" }
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
s({ trig = "def", dscr = "My LaTeX class definition environment" },
|
s({trig="def", dscr="My LaTeX class definition environment"},
|
||||||
fmt(
|
fmt(
|
||||||
[[
|
[[
|
||||||
\begin{definition}[<>]
|
\begin{definition}[<>]
|
||||||
@ -159,7 +123,7 @@ return {
|
|||||||
{ delimiters = "<>" }
|
{ delimiters = "<>" }
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
s({ trig = "ppt", dscr = "My LaTeX class property environment" },
|
s({trig="ppt", dscr="My LaTeX class property environment"},
|
||||||
fmt(
|
fmt(
|
||||||
[[
|
[[
|
||||||
\begin{propriete}[<>]
|
\begin{propriete}[<>]
|
||||||
@ -173,7 +137,7 @@ return {
|
|||||||
{ delimiters = "<>" }
|
{ delimiters = "<>" }
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
s({ trig = "cor", dscr = "My LaTeX class corollair environment" },
|
s({trig="cor", dscr="My LaTeX class corollair environment"},
|
||||||
fmt(
|
fmt(
|
||||||
[[
|
[[
|
||||||
\begin{corollaire}[<>]
|
\begin{corollaire}[<>]
|
||||||
@ -187,7 +151,7 @@ return {
|
|||||||
{ delimiters = "<>" }
|
{ delimiters = "<>" }
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
s({ trig = "thm", dscr = "My LaTeX class theorem environment" },
|
s({trig="thm", dscr="My LaTeX class theorem environment"},
|
||||||
fmt(
|
fmt(
|
||||||
[[
|
[[
|
||||||
\begin{theoreme}[<>]
|
\begin{theoreme}[<>]
|
||||||
@ -201,7 +165,7 @@ return {
|
|||||||
{ delimiters = "<>" }
|
{ delimiters = "<>" }
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
s({ trig = "dem", dscr = "My LaTeX class proof environment" },
|
s({trig="dem", dscr="My LaTeX class proof environment"},
|
||||||
fmt(
|
fmt(
|
||||||
[[
|
[[
|
||||||
\begin{preuve}[<>]
|
\begin{preuve}[<>]
|
||||||
@ -215,7 +179,7 @@ return {
|
|||||||
{ delimiters = "<>" }
|
{ delimiters = "<>" }
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
s({ trig = "csq", dscr = "My LaTeX class consequence environment" },
|
s({trig="csq", dscr="My LaTeX class consequence environment"},
|
||||||
fmt(
|
fmt(
|
||||||
[[
|
[[
|
||||||
\begin{consequence}[<>]
|
\begin{consequence}[<>]
|
||||||
@ -229,7 +193,7 @@ return {
|
|||||||
{ delimiters = "<>" }
|
{ delimiters = "<>" }
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
s({ trig = "rem", dscr = "My LaTeX class remark environment" },
|
s({trig="rem", dscr="My LaTeX class remark environment"},
|
||||||
fmt(
|
fmt(
|
||||||
[[
|
[[
|
||||||
\begin{remarque}[<>]
|
\begin{remarque}[<>]
|
||||||
@ -243,7 +207,7 @@ return {
|
|||||||
{ delimiters = "<>" }
|
{ delimiters = "<>" }
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
s({ trig = "exp", dscr = "My LaTeX class example environment" },
|
s({trig="exp", dscr="My LaTeX class example environment"},
|
||||||
fmt(
|
fmt(
|
||||||
[[
|
[[
|
||||||
\begin{exemple}[<>]
|
\begin{exemple}[<>]
|
||||||
@ -257,7 +221,7 @@ return {
|
|||||||
{ delimiters = "<>" }
|
{ delimiters = "<>" }
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
s({ trig = "met", dscr = "My LaTeX class method environment" },
|
s({trig="met", dscr="My LaTeX class method environment"},
|
||||||
fmt(
|
fmt(
|
||||||
[[
|
[[
|
||||||
\begin{methode}[<>]
|
\begin{methode}[<>]
|
||||||
@ -271,7 +235,7 @@ return {
|
|||||||
{ delimiters = "<>" }
|
{ delimiters = "<>" }
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
s({ trig = "app", dscr = "My LaTeX class application environment" },
|
s({trig="app", dscr="My LaTeX class application environment"},
|
||||||
fmt(
|
fmt(
|
||||||
[[
|
[[
|
||||||
\begin{application}[<>]
|
\begin{application}[<>]
|
||||||
@ -285,7 +249,7 @@ return {
|
|||||||
{ delimiters = "<>" }
|
{ delimiters = "<>" }
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
s({ trig = "exe", dscr = "My LaTeX class exercise environment" },
|
s({trig="exe", dscr="My LaTeX class exercise environment"},
|
||||||
fmt(
|
fmt(
|
||||||
[[
|
[[
|
||||||
\begin{exercice}[<>]
|
\begin{exercice}[<>]
|
||||||
@ -299,7 +263,7 @@ return {
|
|||||||
{ delimiters = "<>" }
|
{ delimiters = "<>" }
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
s({ trig = "rap", dscr = "My LaTeX class recall environment" },
|
s({trig="rap", dscr="My LaTeX class recall environment"},
|
||||||
fmt(
|
fmt(
|
||||||
[[
|
[[
|
||||||
\begin{rappel}[<>]
|
\begin{rappel}[<>]
|
||||||
@ -313,7 +277,7 @@ return {
|
|||||||
{ delimiters = "<>" }
|
{ delimiters = "<>" }
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
s({ trig = "aid", dscr = "My LaTeX class help environment" },
|
s({trig="aid", dscr="My LaTeX class help environment"},
|
||||||
fmt(
|
fmt(
|
||||||
[[
|
[[
|
||||||
\begin{aide}[<>]
|
\begin{aide}[<>]
|
||||||
@ -328,3 +292,4 @@ return {
|
|||||||
)
|
)
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,13 +3,11 @@
|
|||||||
###########################
|
###########################
|
||||||
|
|
||||||
# where auxiliary files are to be written (don't work with lualatex)
|
# where auxiliary files are to be written (don't work with lualatex)
|
||||||
# $aux_dir = "aux";
|
$aux_dir = "build";
|
||||||
|
|
||||||
# where output files are to be written
|
# where output files are to be written
|
||||||
$out_dir = "build";
|
$out_dir = "build";
|
||||||
|
|
||||||
$emulate_aux = 1;
|
|
||||||
|
|
||||||
# files to be deleted during a cleanup operation
|
# files to be deleted during a cleanup operation
|
||||||
$clean_ext = "nav pre snm synctex.gz bbl vrb";
|
$clean_ext = "nav pre snm synctex.gz bbl vrb";
|
||||||
$clean_full_ext = "nav pre snm synctex.gz bbl vrb";
|
$clean_full_ext = "nav pre snm synctex.gz bbl vrb";
|
||||||
@ -29,15 +27,3 @@ $pdflatex = "lualatex -shell-escape -synctex=1 -interaction=nonstopmode -halt-on
|
|||||||
$pdf_mode = 4;
|
$pdf_mode = 4;
|
||||||
$lualatex = "lualatex -shell-escape -synctex=1 -interaction=nonstopmode -halt-on-error %O %S";
|
$lualatex = "lualatex -shell-escape -synctex=1 -interaction=nonstopmode -halt-on-error %O %S";
|
||||||
|
|
||||||
# sub asy {return system("asy -o '$aux_dir'/ '$_[0]'");}
|
|
||||||
# sub asy {return system("asy -o '$out_dir'/ '$_[0]'");}
|
|
||||||
sub asy {return system("asy '$_[0]'");}
|
|
||||||
add_cus_dep("asy","eps",0,"asy");
|
|
||||||
add_cus_dep("asy","pdf",0,"asy");
|
|
||||||
add_cus_dep("asy","tex",0,"asy");
|
|
||||||
|
|
||||||
END{
|
|
||||||
Run_subst('rm ./*.pdf ./*.aux');
|
|
||||||
Run_subst('mv ./build/%A.pdf .');
|
|
||||||
Run_subst('rm -rf ./build');
|
|
||||||
}
|
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
- shell:
|
|
||||||
- '[[ -f ${HOME}/.config/lvim/config.lua ]] && mv ${HOME}/.config/lvim/config.lua ${HOME}/.config/lvim/config.lua.bak'
|
|
||||||
|
|
||||||
- link:
|
- link:
|
||||||
${HOME}/.config/lvim:
|
${HOME}/.config/lvim:
|
||||||
glob: true
|
glob: true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user