added latex support and reorg ftplugins
This commit is contained in:
parent
7f1b34fd6f
commit
f2eaf7c67a
38 changed files with 600 additions and 234 deletions
|
|
@ -1,5 +0,0 @@
|
|||
vim.opt_local.expandtab = true
|
||||
vim.opt_local.tabstop = 4
|
||||
vim.opt_local.shiftwidth = 10
|
||||
vim.opt_local.softtabstop = 4
|
||||
vim.opt_local.formatoptions:remove('o')
|
||||
|
|
@ -1 +0,0 @@
|
|||
vim.opt_local.fixeol = false
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
vim.opt_local.expandtab = true
|
||||
vim.opt_local.shiftwidth = 2
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
-- Set buffer-local options for Go files
|
||||
vim.opt_local.expandtab = true
|
||||
vim.opt_local.commentstring = '// %s'
|
||||
vim.opt_local.comments = 's1:/*,mb:*,ex:*/,://'
|
||||
|
||||
-- Define a key mapping to trigger Go debugging
|
||||
vim.keymap.set('n', '<leader>td', function()
|
||||
require('dap-go').debug_test()
|
||||
end, { buffer = 0 }) -- Set buffer-local key mapping
|
||||
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
vim.opt.expandtab = true
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.expandtab = true
|
||||
|
||||
vim.opt_local.formatoptions:remove('o')
|
||||
|
||||
vim.opt_local.commentstring = '-- %s'
|
||||
vim.opt_local.colorcolumn = '120'
|
||||
|
||||
|
|
@ -1 +0,0 @@
|
|||
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
vim.opt.shiftwidth = 2
|
||||
|
||||
-- vim.keymap.set('n', '<space>cp', require('ocaml.mappings').dune_promote_file, { buffer = 0 })
|
||||
--
|
||||
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
vim.opt_local.expandtab = true
|
||||
vim.opt_local.commentstring = '# %s'
|
||||
vim.opt_local.smarttab = true
|
||||
vim.opt_local.shiftwidth = 4
|
||||
vim.opt_local.tabstop = 4
|
||||
vim.opt_local.softtabstop = 4
|
||||
vim.opt_local.fileformat = 'unix'
|
||||
vim.opt_local.textwidth = 79
|
||||
vim.opt_local.colorcolumn = '80'
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
-- Set buffer-local options for Rust files
|
||||
vim.opt_local.expandtab = true
|
||||
vim.opt_local.autoindent = true
|
||||
vim.opt_local.smartindent = true
|
||||
vim.opt_local.shiftwidth = 4
|
||||
vim.opt_local.tabstop = 4
|
||||
vim.opt_local.softtabstop = 4
|
||||
vim.opt_local.textwidth = 80
|
||||
vim.opt_local.colorcolumn = '80'
|
||||
|
||||
-- Define key mappings or other configurations specific to Rust
|
||||
-- For example:
|
||||
vim.keymap.set('n', '<leader>r', '<CMD>Cargo run<CR>', { desc = 'Run the current Rust project', noremap = true })
|
||||
vim.keymap.set('n', '<leader>c', '<CMD>Cargo check<CR>', { desc = 'Check the current Rust project', noremap = true })
|
||||
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
vim.opt_local.expandtab = true
|
||||
vim.opt_local.shiftwidth = 2
|
||||
vim.opt_local.softtabstop = 2
|
||||
vim.opt_local.tabstop = 2
|
||||
vim.opt_local.textwidth = 80
|
||||
|
||||
vim.opt_local.syntax = enable
|
||||
|
|
@ -1 +0,0 @@
|
|||
vim.opt_local.commentstring = '-- %s'
|
||||
2
after/queries/markdown/highlights.scm
Normal file
2
after/queries/markdown/highlights.scm
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
;extend
|
||||
|
||||
6
after/queries/markdown/textobjects.scm
Normal file
6
after/queries/markdown/textobjects.scm
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
;extends
|
||||
|
||||
(fenced_code_block (code_fence_content) @class.inner) @class.outer
|
||||
|
||||
(paragraph) @function.outer @function.inner
|
||||
|
||||
13
after/queries/markdown_inline/highlights.scm
Normal file
13
after/queries/markdown_inline/highlights.scm
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
;extends
|
||||
|
||||
[
|
||||
(shortcut_link)
|
||||
] @nospell
|
||||
|
||||
(strikethrough
|
||||
(emphasis_delimiter)
|
||||
(strikethrough
|
||||
(emphasis_delimiter)
|
||||
(emphasis_delimiter))
|
||||
(emphasis_delimiter))@markup.doublestrikethrough
|
||||
|
||||
12
after/queries/norg/injections.scm
Normal file
12
after/queries/norg/injections.scm
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
; Injection for code blocks
|
||||
(ranged_verbatim_tag (tag_name) @_tagname (tag_parameters .(tag_param) @injection.language) (ranged_verbatim_tag_content) @injection.content (#any-of? @_tagname "code" "embed"))
|
||||
(ranged_verbatim_tag (tag_name) @_tagname (tag_parameters)? (ranged_verbatim_tag_content) @injection.content (#eq? @_tagname "math") (#set! injection.language "latex"))
|
||||
|
||||
(
|
||||
(inline_math) @injection.content
|
||||
(#offset! @injection.content 0 1 0 -1)
|
||||
(#set! injection.language "latex")
|
||||
)
|
||||
|
||||
(ranged_verbatim_tag (tag_name) @_tagname (ranged_verbatim_tag_content) @injection.content (#eq? @_tagname "document.meta") (#set! injection.language "norg_meta"))
|
||||
|
||||
12
after/queries/python/highlights.scm
Normal file
12
after/queries/python/highlights.scm
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
;extends
|
||||
(
|
||||
(comment) @comment
|
||||
(#match? @comment "^\\#\\|")
|
||||
) @text.literal
|
||||
|
||||
|
||||
(
|
||||
(comment) @content
|
||||
(#match? @content "^\\# ?\\%\\%")
|
||||
) @class.outer @text.literal
|
||||
|
||||
7
after/queries/python/textobjects.scm
Normal file
7
after/queries/python/textobjects.scm
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
;extends
|
||||
|
||||
(
|
||||
(comment) @content1
|
||||
(#match? @content1 "^\\# ?\\%\\%")
|
||||
) @class.inner
|
||||
|
||||
6
after/queries/r/highlights.scm
Normal file
6
after/queries/r/highlights.scm
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
;extends
|
||||
(
|
||||
(comment) @comment
|
||||
(#match? @comment "^\\#\\|")
|
||||
) @text.literal
|
||||
|
||||
7
after/queries/r/textobjects.scm
Normal file
7
after/queries/r/textobjects.scm
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
;extends
|
||||
|
||||
(
|
||||
(comment) @content1
|
||||
(#match? @content1 "^\\# ?\\%\\%")
|
||||
) @class.inner
|
||||
|
||||
15
after/queries/rust/injections.scm
Normal file
15
after/queries/rust/injections.scm
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
;extends
|
||||
(macro_invocation
|
||||
(scoped_identifier
|
||||
path: (identifier) @path (#eq? @path "sqlx")
|
||||
name: (identifier) @name (#match? @name "^query.*")
|
||||
)
|
||||
|
||||
(token_tree
|
||||
(raw_string_literal) @injection.content
|
||||
(#set! injection.language "sql")
|
||||
(#set! injection.include-children)
|
||||
)
|
||||
(#offset! @injection.content 0 3 0 -2)
|
||||
)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue