fix: snippets
This commit is contained in:
parent
4cca98941e
commit
14c9fc6498
7 changed files with 50 additions and 26 deletions
|
|
@ -25,4 +25,8 @@ require("telescope").load_extension("fzy_native")
|
|||
require("impatient").enable_profile()
|
||||
require("nightfox")
|
||||
require('Comment').setup()
|
||||
require('vgit').setup()
|
||||
-- require('vgit').setup()
|
||||
|
||||
-- vim.o.updatetime = 3000
|
||||
-- vim.o.incsearch = false
|
||||
-- vim.wo.signcolumn = 'yes'
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ luasnip.config.set_config({
|
|||
},
|
||||
})
|
||||
|
||||
vim.cmd('let g:snipMate = {"snippet_version" : 1 }')
|
||||
--vim.cmd('let g:snipMate = {"snippet_version" : 1 }')
|
||||
require("luasnip/loaders/from_vscode").lazy_load()
|
||||
--require("luasnip.loaders.from_snipmate").lazy_load()
|
||||
|
||||
|
|
@ -147,17 +147,22 @@ cmp.setup({
|
|||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "buffer" },
|
||||
--{
|
||||
-- name = "buffer",
|
||||
-- option = {
|
||||
-- keyword_pattern = [[\k\+]],
|
||||
-- }
|
||||
--},
|
||||
{ name = "path" },
|
||||
{
|
||||
name = "spell",
|
||||
option = {
|
||||
keep_all_entries = false,
|
||||
enable_in_context = function()
|
||||
return true
|
||||
end,
|
||||
},
|
||||
},
|
||||
-- {
|
||||
-- name = "spell",
|
||||
-- option = {
|
||||
-- keep_all_entries = false,
|
||||
-- enable_in_context = function()
|
||||
-- return true
|
||||
-- end,
|
||||
-- },
|
||||
-- },
|
||||
},
|
||||
confirm_opts = {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ require("mason-null-ls").setup({
|
|||
ensure_installed = {
|
||||
"prettierd",
|
||||
"clang_format",
|
||||
"latexindent",
|
||||
"shellharden",
|
||||
"sql_formatter",
|
||||
"fixjson",
|
||||
|
|
@ -28,7 +27,6 @@ null_ls.setup({
|
|||
},}
|
||||
),
|
||||
require("null-ls").builtins.formatting.clang_format,
|
||||
require("null-ls").builtins.formatting.latexindent,
|
||||
require("null-ls").builtins.formatting.shellharden,
|
||||
require("null-ls").builtins.formatting.sql_formatter,
|
||||
require("null-ls").builtins.formatting.fixjson,
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ local options = {
|
|||
mouse = "a",
|
||||
fileencoding = "utf-8",
|
||||
relativenumber = true,
|
||||
cursorline = false,
|
||||
number = true,
|
||||
smartindent = true,
|
||||
smartcase = true,
|
||||
|
|
@ -17,10 +18,10 @@ local options = {
|
|||
expandtab = true, -- convert tabs to spaces
|
||||
shiftwidth = 2, -- the number of spaces inserted for each indentation
|
||||
tabstop = 2, -- insert 2 spaces for a tab
|
||||
cursorline = true,
|
||||
scrolloff = 8, -- is one of my fav
|
||||
sidescrolloff = 8,
|
||||
spell = true,
|
||||
spell = false,
|
||||
syntax = "off",
|
||||
spelllang = "en_us",
|
||||
mousemodel = "popup_setpos",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@ Plug("nvim-treesitter/nvim-treesitter",
|
|||
{ ["do"] = vim.fn[":TSUpdate"] }) -- syntax colors
|
||||
Plug("hrsh7th/nvim-cmp") -- completions
|
||||
Plug("hrsh7th/cmp-nvim-lsp") -- lsp integration with completions
|
||||
Plug("hrsh7th/cmp-buffer") -- buffer completion
|
||||
--Plug("hrsh7th/cmp-buffer") -- buffer completion
|
||||
Plug("hrsh7th/cmp-path") -- path completion
|
||||
Plug("hrsh7th/cmp-cmdline") -- command completion
|
||||
Plug("f3fora/cmp-spell") -- spelling completion
|
||||
--Plug("f3fora/cmp-spell") -- spelling completion
|
||||
Plug("saadparwaiz1/cmp_luasnip") -- snip completion
|
||||
Plug("L3MON4D3/LuaSnip") -- snippet plugin
|
||||
Plug("kyazdani42/nvim-tree.lua") -- file viewer on the right
|
||||
|
|
|
|||
|
|
@ -5,8 +5,24 @@ end
|
|||
|
||||
require("nvim-treesitter.configs").setup({
|
||||
-- A list of parser names, or "all"
|
||||
ensure_installed = { "latex", "c", "cpp", "rust", "lua", "haskell", "java", "javascript", "typescript", "python", "html", "css",
|
||||
"yaml", "bash", "json", "c_sharp"},
|
||||
ensure_installed = {
|
||||
"latex",
|
||||
"c",
|
||||
"cpp",
|
||||
"rust",
|
||||
"lua",
|
||||
"haskell",
|
||||
"java",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"python",
|
||||
"html",
|
||||
"css",
|
||||
"yaml",
|
||||
"bash",
|
||||
"json",
|
||||
"c_sharp",
|
||||
},
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ local listSnippet = s(
|
|||
\item \textcolor{{{2}}}{{{6}}}
|
||||
\item \textcolor{{{3}}}{{{7}}}
|
||||
\item \textcolor{{{4}}}{{{8}}}
|
||||
\vspace{{2mm}}
|
||||
\vspace{{-3mm}}
|
||||
\end{{itemize}}
|
||||
]],
|
||||
{
|
||||
|
|
@ -34,8 +34,8 @@ local listSnippet = s(
|
|||
rep(1),
|
||||
rep(1),
|
||||
rep(1),
|
||||
i(2, "item 2"),
|
||||
i(3, "item 1"),
|
||||
i(2, "item 1"),
|
||||
i(3, "item 2"),
|
||||
i(4, "item 3"),
|
||||
i(5, "item 4"),
|
||||
}
|
||||
|
|
@ -52,7 +52,7 @@ local enumerateSnippet = s(
|
|||
\item \textcolor{{{2}}}{{{6}}}
|
||||
\item \textcolor{{{3}}}{{{7}}}
|
||||
\item \textcolor{{{4}}}{{{8}}}
|
||||
\vspace{{2mm}}
|
||||
\vspace{{-3mm}}
|
||||
\end{{enumerate}}
|
||||
]],
|
||||
{
|
||||
|
|
@ -60,8 +60,8 @@ local enumerateSnippet = s(
|
|||
rep(1),
|
||||
rep(1),
|
||||
rep(1),
|
||||
i(2, "item 2"),
|
||||
i(3, "item 1"),
|
||||
i(2, "item 1"),
|
||||
i(3, "item 2"),
|
||||
i(4, "item 3"),
|
||||
i(5, "item 4"),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue