Feat: move from packer to lazy

This commit is contained in:
Bertrand Benjamin 2023-10-06 14:29:02 +02:00
parent 9c5c85fe29
commit 42b373b467
44 changed files with 495 additions and 3530 deletions

View File

@ -1,5 +1,17 @@
require('plugins')
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
vim.g.mapleader = ' ' -- Leaderkey
require("lazy").setup("plugins")
require('settings')
require('mappings')
require('lsp')

View File

@ -0,0 +1,36 @@
{
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" },
"gitsigns.nvim": { "branch": "main", "commit": "ff01d34daaed72f271a8ffa088a7e839a60c640f" },
"gruvbox": { "branch": "master", "commit": "f1ecde848f0cdba877acb0c740320568252cc482" },
"indent-blankline.nvim": { "branch": "master", "commit": "877c1db2bf957300097dd5348a665666a4d900cb" },
"lazy.nvim": { "branch": "main", "commit": "6b6f0a451200bb6abde85978c577c73ea1577758" },
"lsp-zero.nvim": { "branch": "v3.x", "commit": "22677c535fdc11a73da67a186a30e360d8857497" },
"lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "e2705063f395b44f676cd26596a11007a2cbd3bd" },
"mason.nvim": { "branch": "main", "commit": "d66c60e17dd6fd8165194b1d14d21f7eb2c1697a" },
"noice.nvim": { "branch": "main", "commit": "7cf858c30841c9c41601ce58e5bc2023228037ef" },
"nui.nvim": { "branch": "main", "commit": "c8de23342caf8d50b15d6b28368d36a56a69d76f" },
"nvim-autopairs": { "branch": "master", "commit": "de4f7138a68d5d5063170f2182fd27faf06b0b54" },
"nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" },
"nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" },
"nvim-lspconfig": { "branch": "master", "commit": "2b361e043810d5587d9af0787f8ce40da92ec5e9" },
"nvim-notify": { "branch": "master", "commit": "e4a2022f4fec2d5ebc79afa612f96d8b11c627b3" },
"nvim-treesitter": { "branch": "master", "commit": "10bfa4826f2235c600c073a82e0d78718aa7240e" },
"nvim-web-devicons": { "branch": "master", "commit": "45d0237c427baba8cd05e0ab26d30e2ee58c2c82" },
"oil.nvim": { "branch": "master", "commit": "ac2928cca85ba3596e92f9f51940d46be2d606f8" },
"plenary.nvim": { "branch": "master", "commit": "9ce85b0f7dcfe5358c0be937ad23e456907d410b" },
"telescope.nvim": { "branch": "0.1.x", "commit": "54930e1abfc94409e1bb9266e752ef8379008592" },
"vim-abolish": { "branch": "master", "commit": "dcbfe065297d31823561ba787f51056c147aa682" },
"vim-fugitive": { "branch": "master", "commit": "99db68d9b3304580bd383da7aaee05c7a954a344" },
"vim-highlightedyank": { "branch": "master", "commit": "fa3f57b097e9521ce41a66b6c7cf5d9adea70ea3" },
"vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" },
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
"vim-tmux-navigator": { "branch": "master", "commit": "7db70e08ea03b3e4d91f63713d76134512e28d7e" },
"vim-vsnip": { "branch": "master", "commit": "be277461265f1e5c7db470aa479f30956597ea9e" },
"which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" }
}

View File

@ -1,133 +0,0 @@
local has_words_before = function()
if vim.api.nvim_buf_get_option(0, "buftype") == "prompt" then
return false
end
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
local feedkey = function(key, mode)
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true), mode, true)
end
local lsp_symbols = {
Text = "  (Text) ",
Method = "  (Method)",
Function = "  (Function)",
Constructor = "  (Constructor)",
Field = " ﴲ (Field)",
Variable = "[] (Variable)",
Class = "  (Class)",
Interface = " ﰮ (Interface)",
Module = "  (Module)",
Property = " 襁 (Property)",
Unit = "  (Unit)",
Value = "  (Value)",
Enum = " 練 (Enum)",
Keyword = "  (Keyword)",
Snippet = "  (Snippet)",
Color = "  (Color)",
File = "  (File)",
Reference = "  (Reference)",
Folder = "  (Folder)",
EnumMember = "  (EnumMember)",
Constant = " ﲀ (Constant)",
Struct = " ﳤ (Struct)",
Event = "  (Event)",
Operator = "  (Operator)",
TypeParameter = "  (TypeParameter)",
}
local status, cmp = pcall(require, "cmp")
if (not status) then return end
cmp.setup {
completion = {
completeopt = 'menuone,noinsert,noselect',
},
formatting = {
format = function(entry, vim_item)
-- fancy icons and a name of kind
vim_item.kind = lsp_symbols[vim_item.kind]
-- set a name for each source
vim_item.menu = ({
vsnip = "[vSnip]",
nvim_lsp = "[LSP]",
buffer = "[Buffer]",
path = "[Path]",
spell = "[Spell]",
})[entry.source.name]
return vim_item
end,
},
snippet = {
expand = function(args)
vim.fn["vsnip#anonymous"](args.body)
end,
},
mapping = {
["<cr>"] = cmp.mapping.confirm({ select = false, behavior = cmp.ConfirmBehavior.Replace }),
-- ["<Tab>"] = cmp.mapping.confirm({select = true, behavior = cmp.ConfirmBehavior.Insert}),
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif vim.fn["vsnip#available"](1) == 1 then
feedkey("<Plug>(vsnip-expand-or-jump)", "")
elseif has_words_before() then
cmp.complete()
else
fallback() -- The fallback function sends a already mapped key. In this case, it's probably `<Tab>`.
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function()
if cmp.visible() then
cmp.select_prev_item()
elseif vim.fn["vsnip#jumpable"](-1) == 1 then
feedkey("<Plug>(vsnip-jump-prev)", "")
end
end, { "i", "s" }),
},
sources = {
{ name = 'vsnip' },
{ name = 'nvim_lsp' },
{ name = 'path' },
{
name = 'buffer',
keyword_length = 4,
keyword_pattern = [[\d\@!\k\k*]],
options = {
-- keyword_pattern = [[\k\+]]-- for non ascii caracters
keyword_pattern = [[\d\@!\k\k*]],
}
},
-- { name = 'spell', keyword_length = 4 },
},
experimental = {
-- I like the new menu better! Nice work hrsh7th
native_menu = false,
-- Let's play with this for a day or two
ghost_text = true,
},
}
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline('/', {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = 'buffer' }
}
})
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' },
{ name = 'cmdline' }
})
})
vim.cmd [[autocmd FileType TelescopePrompt lua require('cmp').setup.buffer { enabled = false }]]
vim.g.vsnip_snippet_dir = '~/.config/nvim/vsnips'

View File

@ -1,8 +0,0 @@
local status, autopairs = pcall(require, "nvim-autopairs")
if (not status) then return end
autopairs.setup{
disable_filetype = { "TelescopePrompt" , "vim" },
ignored_next_char = string.gsub([[ [%w%%%'%[%"%.] ]],"%s+", ""),
}

View File

@ -1,4 +0,0 @@
vim.opt.termguicolors = true
require'colorizer'.setup()

View File

@ -1 +0,0 @@
require('gitsigns').setup {}

View File

@ -1,11 +0,0 @@
vim.opt.list = true
vim.opt.listchars:append("eol:↴")
local indent_blankline_status_ok, indent_blankline = pcall(require, "indent_blankline")
if not indent_blankline_status_ok then
return
end
indent_blankline.setup {
show_end_of_line = true,
}

View File

@ -1,220 +0,0 @@
-- Eviline config for lualine
-- Author: shadmansaleh
-- Credit: glepnir
local lualine = require 'lualine'
-- Color table for highlights
local colors = {
bg = '#202328',
fg = '#bbc2cf',
yellow = '#ECBE7B',
cyan = '#008080',
darkblue = '#081633',
green = '#98be65',
orange = '#FF8800',
violet = '#a9a1e1',
magenta = '#c678dd',
blue = '#51afef',
red = '#ec5f67'
}
local conditions = {
buffer_not_empty = function() return vim.fn.empty(vim.fn.expand('%:t')) ~= 1 end,
hide_in_width = function() return vim.fn.winwidth(0) > 80 end,
check_git_workspace = function()
local filepath = vim.fn.expand('%:p:h')
local gitdir = vim.fn.finddir('.git', filepath .. ';')
return gitdir and #gitdir > 0 and #gitdir < #filepath
end
}
-- Config
local config = {
options = {
-- Disable sections and component separators
component_separators = "",
section_separators = "",
-- theme = 'gruvbox',
theme = {
-- We are going to use lualine_c an lualine_x as left and
-- right section. both are highlighted by c theme . so we
-- are just setting default looks o statusline
normal = {c = {fg = colors.fg, bg = colors.bg}},
inactive = {c = {fg = colors.fg, bg = colors.bg}}
}
},
sections = {
-- these are to remove the defaults
lualine_a = {},
lualine_b = {},
lualine_y = {},
lualine_z = {},
-- these will be filled later
lualine_c = {},
lualine_x = {
{
require("noice").api.statusline.mode.get,
cond = require("noice").api.statusline.mode.has,
color = { fg = "#ff9e64" },
}
}
},
inactive_sections = {
-- these are to remove the defaults
lualine_a = {},
lualine_v = {},
lualine_y = {},
lualine_z = {},
lualine_c = {},
lualine_x = {}
}
}
-- inserts a component in lualine_c at left section
local function ins_left(component)
table.insert(config.sections.lualine_c, component)
end
-- inserts a component in lualine_x ot right section
local function ins_right(component)
table.insert(config.sections.lualine_x, component)
end
local mode_color = {
n = colors.red,
i = colors.green,
v = colors.blue,
[''] = colors.blue,
v = colors.blue,
c = colors.magenta,
no = colors.red,
s = colors.orange,
s = colors.orange,
[''] = colors.orange,
ic = colors.yellow,
r = colors.violet,
rv = colors.violet,
cv = colors.red,
ce = colors.red,
r = colors.cyan,
rm = colors.cyan,
['r?'] = colors.cyan,
['!'] = colors.red,
t = colors.red
}
ins_left {
-- mode component
function()
-- auto change color according to neovims mode
vim.api.nvim_command(
'hi! lualinemode guifg=' .. mode_color[vim.fn.mode()] .. " guibg=" .. colors.bg)
return ''
end,
color = "lualinemode",
left_padding = 0
}
ins_left {
"mode",
color = {fg = colors.green, gui = 'bold'}
}
ins_left {
-- filesize component
function()
local function format_file_size(file)
local size = vim.fn.getfsize(file)
if size <= 0 then return '' end
local sufixes = {'b', 'k', 'm', 'g'}
local i = 1
while size > 1024 do
size = size / 1024
i = i + 1
end
return string.format('%.1f%s', size, sufixes[i])
end
local file = vim.fn.expand('%:p')
if string.len(file) == 0 then return '' end
return format_file_size(file)
end,
condition = conditions.buffer_not_empty
}
ins_left {
-- Lsp server name .
function()
local msg = 'No Active Lsp'
local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
local clients = vim.lsp.get_active_clients()
if next(clients) == nil then return msg end
for _, client in ipairs(clients) do
local filetypes = client.config.filetypes
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
return client.name
end
end
return msg
end,
icon = ' LSP:',
color = {fg = '#ffffff', gui = 'bold'}
}
ins_left {
'diagnostics',
sources = {'nvim_diagnostic'},
symbols = {error = '', warn = '', info = ''},
color_error = colors.red,
color_warn = colors.yellow,
color_info = colors.cyan
}
-- Insert mid section. You can make any number of sections in neovim :)
-- for lualine it's any number greater then 2
ins_left {function() return '%=' end}
ins_left {
'filename',
file_status = true,
path = 1,
condition = conditions.buffer_not_empty,
color = {fg = colors.magenta, gui = 'bold'}
}
-- Add components to right sections
ins_right {
'o:encoding', -- option component same as &encoding in viml
upper = true, -- I'm not sure why it's upper case either ;)
condition = conditions.hide_in_width,
color = {fg = colors.green, gui = 'bold'}
}
ins_right {
'fileformat',
upper = true,
icons_enabled = false, -- I think icons are cool but Eviline doesn't have them. sigh
color = {fg = colors.green, gui = 'bold'}
}
ins_right {
'branch',
icon = '',
condition = conditions.check_git_workspace,
color = {fg = colors.violet, gui = 'bold'}
}
ins_right {
'diff',
-- Is it me or the symbol for modified us really weird
symbols = {added = '', modified = '', removed = ''},
color_added = colors.green,
color_modified = colors.orange,
color_removed = colors.red,
condition = conditions.hide_in_width
}
ins_right {'location'}
ins_right {'progress', color = {fg = colors.fg, gui = 'bold'}}
-- Now don't forget to initialize lualine
lualine.setup(config)

View File

@ -1 +0,0 @@
vim.g.notes_directories = {"~/Nextcloud/Notes/vim" }

View File

@ -1,28 +0,0 @@
local null_ls_status_ok, null_ls = pcall(require, "null-ls")
if not null_ls_status_ok then
return
end
local mason_null_ls_status_ok, mason_null_ls = pcall(require, "mason-null-ls")
if not null_ls_status_ok then
return
end
require("mason-null-ls").setup({
})
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting
local formatting = null_ls.builtins.formatting
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
local diagnostics = null_ls.builtins.diagnostics
null_ls.setup {
debug = false,
sources = {
formatting.prettier.with { extra_args = { "--no-semi", "--single-quote", "--jsx-single-quote" } },
formatting.black.with { extra_args = { "--fast" } },
diagnostics.flake8,
diagnostics.ansiblelint,
diagnostics.yamllint,
},
}

View File

@ -1,14 +0,0 @@
local nvimtree_status_ok, nvimtree = pcall(require, "nvim-tree")
if not nvimtree_status_ok then
return
end
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
vim.opt.termguicolors = true
vim.keymap.set("n", "<leader>f", ":NvimTreeToggle<cr>", {silent = true, noremap = true})
nvimtree.setup({
})

View File

@ -1,9 +0,0 @@
local status, oil = pcall(require, "oil")
if (not status) then
return
end
oil.setup()
local opts = { noremap=true, silent=false }
vim.keymap.set("n", "-", oil.open, { desc = "Open parent directory" }, opts)

View File

@ -1,158 +0,0 @@
local status, telekasten = pcall(require, "telekasten")
if (not status) then return end
local home = vim.fn.expand("~/Nextcloud/Documents/zettelkasten")
telekasten.setup{
home = home,
-- if true, telekasten will be enabled when opening a note within the configured home
take_over_my_home = true,
-- auto-set telekasten filetype: if false, the telekasten filetype will not be used
-- and thus the telekasten syntax will not be loaded either
auto_set_filetype = true,
-- dir names for special notes (absolute path or subdir name)
dailies = home .. '/' .. 'daily',
weeklies = home .. '/' .. 'weekly',
templates = home .. '/' .. 'templates',
-- image (sub)dir for pasting
-- dir name (absolute path or subdir name)
-- or nil if pasted images shouldn't go into a special subdir
image_subdir = "img",
-- markdown file extension
extension = ".md",
-- following a link to a non-existing note will create it
follow_creates_nonexisting = true,
dailies_create_nonexisting = true,
weeklies_create_nonexisting = true,
-- template for new notes (new_note, follow_link)
-- set to `nil` or do not specify if you do not want a template
template_new_note = home .. '/' .. 'templates/new_note.md',
-- template for newly created daily notes (goto_today)
-- set to `nil` or do not specify if you do not want a template
template_new_daily = home .. '/' .. 'templates/daily.md',
-- template for newly created weekly notes (goto_thisweek)
-- set to `nil` or do not specify if you do not want a template
template_new_weekly= home .. '/' .. 'templates/weekly.md',
-- image link style
-- wiki: ![[image name]]
-- markdown: ![](image_subdir/xxxxx.png)
image_link_style = "markdown",
-- integrate with calendar-vim
plug_into_calendar = true,
calendar_opts = {
-- calendar week display mode: 1 .. 'WK01', 2 .. 'WK 1', 3 .. 'KW01', 4 .. 'KW 1', 5 .. '1'
weeknm = 4,
-- use monday as first day of week: 1 .. true, 0 .. false
calendar_monday = 1,
-- calendar mark: where to put mark for marked days: 'left', 'right', 'left-fit'
calendar_mark = 'left-fit',
},
-- telescope actions behavior
close_after_yanking = false,
insert_after_inserting = true,
-- tag notation: '#tag', ':tag:', 'yaml-bare'
tag_notation = "#tag",
-- command palette theme: dropdown (window) or ivy (bottom panel)
command_palette_theme = "ivy",
-- tag list theme:
-- get_cursor: small tag list at cursor; ivy and dropdown like above
show_tags_theme = "ivy",
-- when linking to a note in subdir/, create a [[subdir/title]] link
-- instead of a [[title only]] link
subdirs_in_links = true,
-- template_handling
-- What to do when creating a new note via `new_note()` or `follow_link()`
-- to a non-existing note
-- - prefer_new_note: use `new_note` template
-- - smart: if day or week is detected in title, use daily / weekly templates (default)
-- - always_ask: always ask before creating a note
template_handling = "smart",
-- path handling:
-- this applies to:
-- - new_note()
-- - new_templated_note()
-- - follow_link() to non-existing note
--
-- it does NOT apply to:
-- - goto_today()
-- - goto_thisweek()
--
-- Valid options:
-- - smart: put daily-looking notes in daily, weekly-looking ones in weekly,
-- all other ones in home, except for notes/with/subdirs/in/title.
-- (default)
--
-- - prefer_home: put all notes in home except for goto_today(), goto_thisweek()
-- except for notes with subdirs/in/title.
--
-- - same_as_current: put all new notes in the dir of the current note if
-- present or else in home
-- except for notes/with/subdirs/in/title.
new_note_location = "smart",
-- should all links be updated when a file is renamed
rename_update_links = true,
}
-- Mapping helper
local function map(mode, lhs, rhs, opts)
local options = { noremap = true }
if opts then
options = vim.tbl_extend("force", options, opts)
end
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
end
-- On hesitation, bring up the command panel
map("n","<leader>z", ":lua require('telekasten').panel()<CR>")
-- Function mappings
map("n", "<leader>zf", ":lua require('telekasten').find_notes()<CR>")
map("n", "<leader>zd", ":lua require('telekasten').find_daily_notes()<CR>")
map("n", "<leader>zg", ":lua require('telekasten').search_notes()<CR>")
map("n", "<leader>zz", ":lua require('telekasten').follow_link()<CR>")
map("n", "<leader>zT", ":lua require('telekasten').goto_today()<CR>")
map("n", "<leader>zW", ":lua require('telekasten').goto_thisweek()<CR>")
map("n", "<leader>zw", ":lua require('telekasten').find_weekly_notes()<CR>")
map("n", "<leader>zn", ":lua require('telekasten').new_note()<CR>")
map("n", "<leader>zN", ":lua require('telekasten').new_templated_note()<CR>")
map("n", "<leader>zy", ":lua require('telekasten').yank_notelink()<CR>")
map("n", "<leader>zc", ":lua require('telekasten').show_calendar()<CR>")
map("n", "<leader>zC", ":CalendarT<CR>")
map("n", "<leader>zi", ":lua require('telekasten').paste_img_and_link()<CR>")
map("n", "<leader>zt", ":lua require('telekasten').toggle_todo()<CR>")
map("n", "<leader>zb", ":lua require('telekasten').show_backlinks()<CR>")
map("n", "<leader>zF", ":lua require('telekasten').find_friends()<CR>")
map("n", "<leader>zI", ":lua require('telekasten').insert_img_link({ i=true })<CR>")
map("n", "<leader>zp", ":lua require('telekasten').preview_img()<CR>")
map("n", "<leader>zm", ":lua require('telekasten').browse_media()<CR>")
map("n", "<leader>za", ":lua require('telekasten').show_tags()<CR>")
map("n", "<leader>#", ":lua require('telekasten').show_tags()<CR>")
map("n", "<leader>zr", ":lua require('telekasten').rename_note()<CR>")
-- we could define [[ in **insert mode** to call insert link
-- inoremap [[ <cmd>:lua require('telekasten').insert_link()<CR>
-- alternatively: leader [
map("i", "[[", "<cmd>:lua require('telekasten').insert_link({ i=true })<CR>")
map("i", "<leader>zt", "<cmd>:lua require('telekasten').toggle_todo({ i=true })<CR>")
map("i", "<leader>#", "<cmd>:lua require('telekasten').show_tags({i = true})<CR>")

View File

@ -1,74 +0,0 @@
local status, telescope = pcall(require, "telescope")
if (not status) then return end
local builtin = require("telescope.builtin")
local previewers = require('telescope.previewers')
local Job = require('plenary.job')
local new_maker = function(filepath, bufnr, opts)
filepath = vim.fn.expand(filepath)
Job:new({
command = 'file',
args = { '--mime-type', '-b', filepath },
on_exit = function(j)
local mime_type = vim.split(j:result()[1], '/')[1]
if mime_type == "text" then
previewers.buffer_previewer_maker(filepath, bufnr, opts)
else
-- maybe we want to write something to the buffer here
vim.schedule(function()
vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, { 'BINARY' })
end)
end
end
}):sync()
end
local function telescope_buffer_dir()
return vim.fn.expand('%:p:h')
end
telescope.setup {
defaults = {
buffer_previewer_maker = new_maker,
file_ignore_patterns = { "**/*.pdf" },
mappings = {
n = {
['<c-d>'] = require('telescope.actions').delete_buffer
}, -- n
i = {
['<c-d>'] = require('telescope.actions').delete_buffer
},
},
},
extensions = {
fzf = {
fuzzy = true, -- false will only do exact matching
override_generic_sorter = true, -- override the generic sorter
override_file_sorter = true, -- override the file sorter
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
-- the default case_mode is "smart_case"
},
}
}
telescope.load_extension('fzf')
-- keymaps
vim.keymap.set('n', '<leader>e',
function()
builtin.find_files({
})
end)
vim.keymap.set('n', '<leader>g', function()
builtin.live_grep()
end)
vim.keymap.set('n', '<leader>b', function()
builtin.buffers()
end)
vim.keymap.set('n', '<leader>h', function()
builtin.resume()
end)
-- vim.keymap.set('n', '<leader>d', function()
-- builtin.diagnostics()
-- end)

View File

@ -1,17 +0,0 @@
local status, ts = pcall(require, "nvim-treesitter.configs")
if (not status) then return end
ts.setup {
-- One of "all", "maintained" (parsers with maintainers), or a list of languages
ensure_installed = {"python", "css", "html", "lua", "javascript", "vue", "c", "markdown", "rst", "cpp"},
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
indent = {
enable = true,
disable = { "python", },
}
}
-- vim.opt.foldmethod = "expr"
-- vim.opt.foldexpr = "nvim_treesitter#foldexpr()"

View File

@ -1,6 +0,0 @@
vim.g.maplocalleader = " "
vim.g.vimtex_view_method = 'zathura'
-- Les fichiers sty et cls sont vus comme des fichiers tex
vim.cmd("autocmd BufRead,BufNewFile *.{sty,cls} setlocal syntax=tex")

View File

@ -1,56 +0,0 @@
local zk_status_ok, zk = pcall(require, "zk")
if not zk_status_ok then
return
end
zk.setup({
picker = "telescope",
lsp = {
-- `config` is passed to `vim.lsp.start_client(config)`
config = {
cmd = { "zk", "lsp" },
name = "zk",
-- on_attach = ...
-- etc, see `:h vim.lsp.start_client()`
},
-- automatically attach buffers in a zk notebook that match the given filetypes
auto_attach = {
enabled = true,
filetypes = { "markdown" },
},
},
})
local opts = { noremap=true, silent=false }
-- Create a new note after asking for its title.
vim.api.nvim_set_keymap("n", "<leader>zl", "<Cmd>ZkNew { title = vim.fn.input('Title (litterature): '), dir = 'litterature'}<CR>", opts)
vim.api.nvim_set_keymap("n", "<leader>zs", "<Cmd>ZkNew { title = vim.fn.input('Title (slipbox): '), dir = 'slipbox'}<CR>", opts)
vim.api.nvim_set_keymap("v", "<leader>zs", ":'<,'>ZkNewFromTitleSelection { dir = 'slipbox'}<CR>", opts)
vim.api.nvim_set_keymap("n", "<leader>zi", "<Cmd>ZkNew { title = vim.fn.input('Title (inbox): '), dir = 'inbox'}<CR>", opts)
vim.api.nvim_set_keymap("v", "<leader>zi", ":'<,'>ZkNewFromTitleSelection { dir = 'inbox'}<CR>", opts)
vim.api.nvim_set_keymap("n", "<leader>zh", "<Cmd>ZkNew { title = vim.fn.input('Title (hubs): '), dir = 'hubs'}<CR>", opts)
-- Open notes.
vim.api.nvim_set_keymap("n", "<leader>zo", "<Cmd>ZkNotes { sort = { 'modified' } }<CR>", opts)
-- Open notes associated with the selected tags.
vim.api.nvim_set_keymap("n", "<leader>zt", "<Cmd>ZkTags<CR>", opts)
-- Search for the notes matching a given query.
vim.api.nvim_set_keymap("n", "<leader>zf", "<Cmd>ZkNotes { sort = { 'modified' }, match = vim.fn.input('Search: ') }<CR>", opts)
-- Search for the notes matching the current visual selection.
vim.api.nvim_set_keymap("v", "<leader>zf", ":'<,'>ZkMatch<CR>", opts)
-- Open notes linking to the current buffer.
-- vim.api.nvim_set_keymap("n", "<leader>zb", "<Cmd>ZkBacklinks<CR>", opts)
-- Alternative for backlinks using pure LSP and showing the source context.
vim.api.nvim_set_keymap('n', '<leader>zb', '<Cmd>lua vim.lsp.buf.references()<CR>', opts)
-- Open notes linked by the current buffer.
vim.api.nvim_set_keymap("n", "<leader>zL", "<Cmd>ZkLinks<CR>", opts)
-- Preview a linked note.
vim.api.nvim_set_keymap("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts)
-- Open the code actions for a visual selection.
vim.api.nvim_set_keymap("v", "<leader>za", ":'<,'>lua vim.lsp.buf.code_action()<CR>", opts)

View File

@ -1,77 +0,0 @@
require("mason").setup()
require("mason-lspconfig").setup()
local nvim_lsp = require('lspconfig')
-- Use an on_attach function to only map the following keys
-- after the language server attaches to the current buffer
local on_attach = function(client, bufnr)
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
--Enable completion triggered by <c-x><c-o>
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
-- Mappings.
local opts = { noremap=true, silent=true }
-- See `:help vim.lsp.*` for documentation on any of the below functions
-- See references
buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
-- show documentation
buf_set_keymap('n', 'K', '<Cmd>lua vim.lsp.buf.hover()<CR>', opts)
-- Rename
buf_set_keymap('n', '<leader>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
-- proposions from lsp
buf_set_keymap('n', '<leader>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
-- Details on diagnostics
buf_set_keymap('n', '<leader>d', '<cmd>lua vim.diagnostic.open_float()<CR>', opts)
-- Cycle over diagnostics
buf_set_keymap('n', '<leader>df', '<cmd>lua vim.diagnostic.goto_prev()<CR>', opts)
buf_set_keymap('n', '<leader>dp', '<cmd>lua vim.diagnostic.goto_next()<CR>', opts)
-- Get diagnostic on local list
buf_set_keymap('n', '<leader>q', '<cmd>lua vim.diagnostic.setloclist()<CR>', opts)
buf_set_keymap("n", "<leader>F", "<cmd>lua vim.lsp.buf.format()<CR>", opts)
buf_set_keymap('n', 'gD', '<Cmd>lua vim.lsp.buf.declaration()<CR>', opts)
buf_set_keymap('n', 'gd', '<Cmd>lua vim.lsp.buf.definition()<CR>', opts)
buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
buf_set_keymap('n', '<leader>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
end
-- Use a loop to conveniently call 'setup' on multiple servers and
-- map buffer local keybindings when the language server attaches
local servers = {
"texlab",
"pyright",
"vuels",
"tsserver",
"html",
"lua_ls",
"ansiblels",
"arduino_language_server",
"clangd",
}
for _, lsp in ipairs(servers) do
nvim_lsp[lsp].setup {
on_attach = on_attach,
flags = {
debounce_text_changes = 150,
},
}
end
nvim_lsp.vuels.setup{
on_attach = function(client)
client.resolved_capabilities.document_formatting = true
end;
}
nvim_lsp.ltex.setup{
cmd = { "ltex-ls" },
settings = {
ltex = {
language = "fr",
}
}
}

View File

@ -1,17 +1,10 @@
local map = vim.api.nvim_set_keymap
local default_opts = {noremap = true, silent = true}
-- move around splits using Ctrl + {h,j,k,l}
map('n', '<C-h>', '<C-w>h', default_opts)
map('n', '<C-j>', '<C-w>j', default_opts)
map('n', '<C-k>', '<C-w>k', default_opts)
map('n', '<C-l>', '<C-w>l', default_opts)
-- Align blocks of text and keep them selected
map('v', '<', '<gv', {})
map('v', '>', '>gv', {})
-- Automatically spell check last error in insert mode
map('i', '<c-f>', '<c-g>u<Esc>[s1z=`]a<c-g>u', default_opts)

View File

@ -1,233 +0,0 @@
local fn = vim.fn
-- Automatically install packer
local install_path = fn.stdpath "data" .. "/site/pack/packer/start/packer.nvim"
if fn.empty(fn.glob(install_path)) > 0 then
PACKER_BOOTSTRAP = fn.system {
"git",
"clone",
"--depth",
"1",
"https://github.com/wbthomason/packer.nvim",
install_path,
}
print "Installing packer close and reopen Neovim..."
vim.cmd [[packadd packer.nvim]]
end
-- Autocommand that reloads neovim whenever you save the plugins.lua file
vim.cmd [[
augroup packer_user_config
autocmd!
autocmd BufWritePost plugins.lua source <afile> | PackerSync
augroup end
]]
-- Use a protected call so we don't error out on first use
local status_ok, packer = pcall(require, "packer")
if not status_ok then
return
end
-- Have packer use a popup window
packer.init {
display = {
open_fn = function()
return require("packer.util").float { border = "rounded" }
end,
},
}
return packer.startup(function(use)
-- Packer can manage itself
use 'wbthomason/packer.nvim'
use 'morhetz/gruvbox'
-- Status line
use {
'hoob3rt/lualine.nvim',
config = [[require('config.lualine')]],
}
use 'tpope/vim-fugitive'
-- use 'mhinz/vim-signify'
use {
'lewis6991/gitsigns.nvim',
config = [[require('config.gitsigns')]],
}
use 'tpope/vim-surround'
use 'tpope/vim-repeat'
use 'tpope/vim-abolish'
use {
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
'neovim/nvim-lspconfig',
requires = {
"hrsh7th/cmp-nvim-lsp",
}
}
use {
'hrsh7th/nvim-cmp',
event = 'InsertEnter',
config = [[require('completion')]],
requires = {
'hrsh7th/vim-vsnip',
'hrsh7th/vim-vsnip-integ',
-- 'rafamadriz/friendly-snippets',
},
}
use { 'hrsh7th/cmp-vsnip', after = 'nvim-cmp' }
use { 'hrsh7th/cmp-buffer', after = 'nvim-cmp' }
use { 'hrsh7th/cmp-path', after = 'nvim-cmp' }
use { 'hrsh7th/cmp-nvim-lsp', after = 'nvim-cmp' }
use { 'hrsh7th/cmp-cmdline', after = 'nvim-cmp' }
-- use {'f3fora/cmp-spell', after = 'nvim-cmp'}
-- for formatters and linters
use {
"jose-elias-alvarez/null-ls.nvim",
config = [[require('config.null-ls')]],
requires = {
"jayp0521/mason-null-ls.nvim"
}
}
use 'nvim-lua/popup.nvim'
use {
'nvim-telescope/telescope.nvim',
config = [[require('config.telescope')]],
requires = { 'nvim-lua/plenary.nvim' }
}
use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }
use {
"nvim-telescope/telescope-file-browser.nvim"
}
use {
'nvim-tree/nvim-tree.lua',
requires = {
'nvim-tree/nvim-web-devicons', -- optional
},
config = [[require('config.nvimtree')]],
}
use {
'lervag/vimtex',
config = [[require('config.vimtex')]],
}
-- Highlight on Yank
use 'machakann/vim-highlightedyank'
-- Autoclose parenthesis
-- use 'jiangmiao/auto-pairs'
use {
'windwp/nvim-autopairs',
config = [[ require('config.autopairs') ]]
}
use 'kyazdani42/nvim-web-devicons'
use 'christoomey/vim-tmux-navigator'
use {
'nvim-treesitter/nvim-treesitter',
config = [[require('config.treesitter')]],
run = ':TSUpdate',
}
use {
'norcalli/nvim-colorizer.lua',
config = [[require('config.colorizer')]],
}
use {
"mickael-menu/zk-nvim",
config = [[require('config.zk')]]
}
-- use {
-- 'renerocksai/telekasten.nvim',
-- requires = {
-- 'nvim-telescope/telescope.nvim',
-- 'nvim-lua/plenary.nvim',
-- 'renerocksai/calendar-vim'
-- },
-- config = [[require('config.telekasten')]]
-- }
use {
"folke/which-key.nvim",
config = function()
vim.o.timeout = true
vim.o.timeoutlen = 300
require("which-key").setup {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
}
end
}
use({
"folke/noice.nvim",
config = function()
require("noice").setup({
-- add any options here
throttle = 1000,
lsp = {
progress = {
enabled = true,
-- Lsp Progress is formatted using the builtins for lsp_progress. See config.format.builtin
-- See the section on formatting for more details on how to customize.
--- @type NoiceFormat|string
format = "lsp_progress",
--- @type NoiceFormat|string
format_done = "lsp_progress_done",
throttle = 1000, -- frequency to update lsp progress message
view = "mini",
},
}
})
end,
requires = {
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
"MunifTanjim/nui.nvim",
-- OPTIONAL:
-- `nvim-notify` is only needed, if you want to use the notification view.
-- If not available, we use `mini` as the fallback
"rcarriga/nvim-notify",
}
})
use {
'echasnovski/mini.indentscope',
config = function ()
require('mini.indentscope').setup()
end
}
use {
"lukas-reineke/indent-blankline.nvim",
config = [[require('config.indentblankline')]]
}
use {
'stevearc/oil.nvim',
config = [[require('config.oil')]]
}
use {
'numToStr/Comment.nvim',
config = function()
require('Comment').setup()
end
}
if PACKER_BOOTSTRAP then
require("packer").sync()
end
end)

View File

@ -0,0 +1,7 @@
return {
'windwp/nvim-autopairs',
event = "InsertEnter",
opts = {
disable_filetype = { "TelescopePrompt" , "vim" },
} -- this is equalent to setup({}) function
}

View File

@ -0,0 +1,14 @@
return {
'norcalli/nvim-colorizer.lua',
config = function ()
vim.opt.termguicolors = true
require('colorizer').setup {
'css';
'javascript';
html = {
mode = 'foreground';
}
}
end
}

View File

@ -0,0 +1,9 @@
return {
"morhetz/gruvbox",
lazy = false, -- make sure we load this during startup if it is your main colorscheme
priority = 1000, -- make sure to load this before all the other start plugins
config = function()
-- load the colorscheme here
vim.cmd([[colorscheme gruvbox]])
end
}

View File

@ -0,0 +1,6 @@
return {
'numToStr/Comment.nvim',
config=function ()
require('Comment').setup()
end
}

View File

@ -0,0 +1,59 @@
return {
'hrsh7th/nvim-cmp',
dependencies = {
'neovim/nvim-lspconfig',
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-path',
'hrsh7th/cmp-cmdline',
'hrsh7th/cmp-vsnip',
'hrsh7th/vim-vsnip',
},
config = function ()
local cmp = require'cmp'
cmp.setup({
snippet = {
expand = function(args)
vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
end,
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'vsnip' }, -- For vsnip users.
}, {
{ name = 'buffer' },
})
})
-- Set configuration for specific filetype.
cmp.setup.filetype('gitcommit', {
sources = cmp.config.sources({
{ name = 'git' }, -- You can specify the `git` source if [you were installed it](https://github.com/petertriho/cmp-git).
}, {
{ name = 'buffer' },
})
})
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline({ '/', '?' }, {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = 'buffer' }
}
})
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' }
}, {
{ name = 'cmdline' }
})
})
end
}

View File

@ -0,0 +1,11 @@
return {
{
'tpope/vim-fugitive'
},
{
'lewis6991/gitsigns.nvim',
config=function ()
require('gitsigns').setup {}
end
}
}

View File

@ -0,0 +1,10 @@
return {
'lukas-reineke/indent-blankline.nvim',
main = "ibl",
config = function ()
vim.opt.list = true
vim.opt.listchars:append("eol:↴")
require("ibl").setup {
}
end
}

View File

@ -0,0 +1,25 @@
return {
'VonHeikemen/lsp-zero.nvim',
branch = 'v3.x',
dependencies = {
{'neovim/nvim-lspconfig'},
{'williamboman/mason.nvim'},
{'williamboman/mason-lspconfig.nvim'},
},
config = function ()
local lsp_zero = require('lsp-zero')
lsp_zero.on_attach(function(client, bufnr)
-- see :help lsp-zero-keybindings
-- to learn the available actions
lsp_zero.default_keymaps({buffer = bufnr})
end)
require('mason').setup({})
require('mason-lspconfig').setup({
ensure_installed = {},
handlers = {
lsp_zero.default_setup,
},
})
end
}

View File

@ -0,0 +1,222 @@
return {
"nvim-lualine/lualine.nvim",
dependencies = {
"folke/noice.nvim",
'nvim-tree/nvim-web-devicons',
},
config = function ()
local colors = {
bg = '#202328',
fg = '#bbc2cf',
yellow = '#ECBE7B',
cyan = '#008080',
darkblue = '#081633',
green = '#98be65',
orange = '#FF8800',
violet = '#a9a1e1',
magenta = '#c678dd',
blue = '#51afef',
red = '#ec5f67'
}
local conditions = {
buffer_not_empty = function() return vim.fn.empty(vim.fn.expand('%:t')) ~= 1 end,
hide_in_width = function() return vim.fn.winwidth(0) > 80 end,
check_git_workspace = function()
local filepath = vim.fn.expand('%:p:h')
local gitdir = vim.fn.finddir('.git', filepath .. ';')
return gitdir and #gitdir > 0 and #gitdir < #filepath
end
}
-- Config
local config = {
options = {
-- Disable sections and component separators
component_separators = "",
section_separators = "",
-- theme = 'gruvbox',
theme = {
-- We are going to use lualine_c an lualine_x as left and
-- right section. both are highlighted by c theme . so we
-- are just setting default looks o statusline
normal = {c = {fg = colors.fg, bg = colors.bg}},
inactive = {c = {fg = colors.fg, bg = colors.bg}}
}
},
sections = {
-- these are to remove the defaults
lualine_a = {},
lualine_b = {},
lualine_y = {},
lualine_z = {},
-- these will be filled later
lualine_c = {},
lualine_x = {
{
require("noice").api.statusline.mode.get,
cond = require("noice").api.statusline.mode.has,
color = { fg = "#ff9e64" },
}
}
},
inactive_sections = {
-- these are to remove the defaults
lualine_a = {},
lualine_v = {},
lualine_y = {},
lualine_z = {},
lualine_c = {},
lualine_x = {}
}
}
-- inserts a component in lualine_c at left section
local function ins_left(component)
table.insert(config.sections.lualine_c, component)
end
-- inserts a component in lualine_x ot right section
local function ins_right(component)
table.insert(config.sections.lualine_x, component)
end
local mode_color = {
n = colors.red,
i = colors.green,
v = colors.blue,
[''] = colors.blue,
v = colors.blue,
c = colors.magenta,
no = colors.red,
s = colors.orange,
s = colors.orange,
[''] = colors.orange,
ic = colors.yellow,
r = colors.violet,
rv = colors.violet,
cv = colors.red,
ce = colors.red,
r = colors.cyan,
rm = colors.cyan,
['r?'] = colors.cyan,
['!'] = colors.red,
t = colors.red
}
ins_left {
-- mode component
function()
-- auto change color according to neovims mode
vim.api.nvim_command(
'hi! lualinemode guifg=' .. mode_color[vim.fn.mode()] .. " guibg=" .. colors.bg)
return ''
end,
color = "lualinemode",
left_padding = 0
}
ins_left {
"mode",
color = {fg = colors.green, gui = 'bold'}
}
ins_left {
-- filesize component
function()
local function format_file_size(file)
local size = vim.fn.getfsize(file)
if size <= 0 then return '' end
local sufixes = {'b', 'k', 'm', 'g'}
local i = 1
while size > 1024 do
size = size / 1024
i = i + 1
end
return string.format('%.1f%s', size, sufixes[i])
end
local file = vim.fn.expand('%:p')
if string.len(file) == 0 then return '' end
return format_file_size(file)
end,
condition = conditions.buffer_not_empty
}
ins_left {
-- Lsp server name .
function()
local msg = 'No Active Lsp'
local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
local clients = vim.lsp.get_active_clients()
if next(clients) == nil then return msg end
for _, client in ipairs(clients) do
local filetypes = client.config.filetypes
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
return client.name
end
end
return msg
end,
icon = ' LSP:',
color = {fg = '#ffffff', gui = 'bold'}
}
ins_left {
'diagnostics',
sources = {'nvim_diagnostic'},
symbols = {error = '', warn = '', info = ''},
color_error = colors.red,
color_warn = colors.yellow,
color_info = colors.cyan
}
-- Insert mid section. You can make any number of sections in neovim :)
-- for lualine it's any number greater then 2
ins_left {function() return '%=' end}
ins_left {
'filename',
file_status = true,
path = 1,
condition = conditions.buffer_not_empty,
color = {fg = colors.magenta, gui = 'bold'}
}
-- Add components to right sections
ins_right {
'o:encoding', -- option component same as &encoding in viml
upper = true, -- I'm not sure why it's upper case either ;)
condition = conditions.hide_in_width,
color = {fg = colors.green, gui = 'bold'}
}
ins_right {
'fileformat',
upper = true,
icons_enabled = false, -- I think icons are cool but Eviline doesn't have them. sigh
color = {fg = colors.green, gui = 'bold'}
}
ins_right {
'branch',
icon = '',
condition = conditions.check_git_workspace,
color = {fg = colors.violet, gui = 'bold'}
}
ins_right {
'diff',
-- Is it me or the symbol for modified us really weird
symbols = {added = '', modified = '', removed = ''},
color_added = colors.green,
color_modified = colors.orange,
color_removed = colors.red,
condition = conditions.hide_in_width
}
ins_right {'location'}
ins_right {'progress', color = {fg = colors.fg, gui = 'bold'}}
require('lualine').setup(config)
end
}

View File

@ -0,0 +1,6 @@
return {
'tpope/vim-surround',
'tpope/vim-repeat',
'tpope/vim-abolish',
'machakann/vim-highlightedyank'
}

View File

@ -0,0 +1,10 @@
return {
'stevearc/oil.nvim',
dependencies = { "nvim-tree/nvim-web-devicons" },
keys = {
{"-", "<cmd>Oil<cr>", desc="Open parent directory"},
},
config = function()
require("oil").setup()
end
}

View File

@ -0,0 +1,27 @@
return {
'nvim-telescope/telescope.nvim', branch = '0.1.x',
dependencies = { 'nvim-lua/plenary.nvim' },
opts = {
defaults = {
file_ignore_patterns = { "**/*.pdf" },
layout_strategy = "horizontal",
layout_config = { prompt_position = "top" },
sorting_strategy = "ascending",
winblend = 0,
},
},
keys = {
{"<leader>ff", "<cmd>Telescope find_files<cr>", desc = "Find files"},
{"<leader>fe", "<cmd>Telescope git_files<cr>", desc = "Find file respecting .gitignore"},
{"<leader>fg", "<cmd>Telescope live_grep<cr>", desc = "Grep file in file"},
{"<leader>fb", "<cmd>Telescope buffers<cr>", desc = "Search through buffers"},
{"<leader>ft", "<cmd>Telescope tags<cr>", desc = "Search through tags"},
{"<leader>fm", "<cmd>Telescope marks<cr>", desc = "Search through marks"},
{"<leader>fs", "<cmd>Telescope search_history<cr>", desc = "Search through search"},
},
config = function()
require('telescope').setup(
)
end
}

View File

@ -0,0 +1,14 @@
return {
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function ()
local configs = require("nvim-treesitter.configs")
configs.setup({
ensure_installed = { "lua", "vim", "vimdoc", "javascript", "html", "python", "dockerfile", "latex", "yaml", "regex", "bash", "markdown", "markdown_inline" },
sync_install = false,
highlight = { enable = true },
indent = { enable = true },
})
end
}

View File

@ -0,0 +1,8 @@
return {
"folke/noice.nvim",
event = "VeryLazy",
dependencies = {
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
}
}

View File

@ -0,0 +1,3 @@
return {
'christoomey/vim-tmux-navigator',
}

View File

@ -0,0 +1,13 @@
return {
"folke/which-key.nvim",
event = "VeryLazy",
init = function()
vim.o.timeout = true
vim.o.timeoutlen = 300
end,
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
}
}

View File

@ -4,7 +4,6 @@ local exec = vim.api.nvim_exec -- execute Vimscript
local g = vim.g -- global variables
local opt = vim.opt -- global/buffer/windows-scoped options
g.mapleader = ' ' -- Leaderkey
g.showmode = true
g.hidden = true -- Required to keep multiple buffers open multiple buffers
opt.mouse = 'a' -- enable mouse
@ -48,8 +47,6 @@ exec([[
augroup end
]], false)
cmd('colorscheme gruvbox')
-- Python 3
g.python3_host_prog="~/.venv/nvim/bin/python"

View File

@ -1,18 +0,0 @@
{
"Date": {
"prefix": "date",
"body": [
"$CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE"
]
},
"Lorem Ipsum Sentence": {
"prefix": "loremSent",
"body": "Lorem ipsum dolor sit amet, qui minim labore adipisicing minim sint cillum sint consectetur cupidatat.",
"description": "Lorem Ipsum Sentence"
},
"Lorem Ipsum Paragraph": {
"prefix": "loremPara",
"body": "Lorem ipsum dolor sit amet, officia excepteur ex fugiat reprehenderit enim labore culpa sint ad nisi Lorem pariatur mollit ex esse exercitation amet. Nisi anim cupidatat excepteur officia. Reprehenderit nostrud nostrud ipsum Lorem est aliquip amet voluptate voluptate dolor minim nulla est proident. Nostrud officia pariatur ut officia. Sit irure elit esse ea nulla sunt ex occaecat reprehenderit commodo officia dolor Lorem duis laboris cupidatat officia voluptate. Culpa proident adipisicing id nulla nisi laboris ex in Lorem sunt duis officia eiusmod. Aliqua reprehenderit commodo ex non excepteur duis sunt velit enim. Voluptate laboris sint cupidatat ullamco ut ea consectetur et est culpa et culpa duis.",
"description": "Lorem Ipsum Paragraph"
}
}

View File

@ -1,850 +0,0 @@
{
"doctype": {
"prefix": "doctype",
"body": [
"<!DOCTYPE>",
"$1"
],
"description": "HTML - Defines the document type",
"scope": "text.html"
},
"a": {
"prefix": "a",
"body": "<a href=\"$1\">$2</a>$3",
"description": "HTML - Defines a hyperlink",
"scope": "text.html"
},
"abbr": {
"prefix": "abbr",
"body": "<abbr title=\"$1\">$2</abbr>$3",
"description": "HTML - Defines an abbreviation",
"scope": "text.html"
},
"address": {
"prefix": "address",
"body": [
"<address>",
"$1",
"</address>"
],
"description": "HTML - Defines an address element",
"scope": "text.html"
},
"area": {
"prefix": "area",
"body": "<area shape=\"$1\" coords=\"$2\" href=\"$3\" alt=\"$4\">$5",
"description": "HTML - Defines an area inside an image map",
"scope": "text.html"
},
"article": {
"prefix": "article",
"body": [
"<article>",
"\t$1",
"</article>"
],
"description": "HTML - Defines an article",
"scope": "text.html"
},
"aside": {
"prefix": "aside",
"body": [
"<aside>",
"\t$1",
"</aside>$2"
],
"description": "HTML - Defines content aside from the page content",
"scope": "text.html"
},
"audio": {
"prefix": "audio",
"body": [
"<audio controls>",
"\t$1",
"</audio>"
],
"description": "HTML - Defines sounds content",
"scope": "text.html"
},
"b": {
"prefix": "b",
"body": "<b>$1</b>$2",
"description": "HTML - Defines bold text",
"scope": "text.html"
},
"base": {
"prefix": "base",
"body": "<base href=\"$1\" target=\"$2\">$3",
"description": "HTML - Defines a base URL for all the links in a page",
"scope": "text.html"
},
"bdi": {
"prefix": "bdi",
"body": "<bdi>$1</bdi>$2",
"description": "HTML - Used to isolate text that is of unknown directionality",
"scope": "text.html"
},
"bdo": {
"prefix": "bdo",
"body": [
"<bdo dir=\"$1\">",
"$2",
"</bdo>"
],
"description": "HTML - Defines the direction of text display",
"scope": "text.html"
},
"big": {
"prefix": "big",
"body": "<big>$1</big>$2",
"description": "HTML - Used to make text bigger",
"scope": "text.html"
},
"blockquote": {
"prefix": "blockquote",
"body": [
"<blockquote cite=\"$2\">",
"\t$1",
"</blockquote>"
],
"description": "HTML - Defines a long quotation",
"scope": "text.html"
},
"body": {
"prefix": "body",
"body": [
"<body>",
"\t$1",
"</body>"
],
"description": "HTML - Defines the body element",
"scope": "text.html"
},
"br": {
"prefix": "br",
"body": "<br>",
"description": "HTML - Inserts a single line break",
"scope": "text.html"
},
"button": {
"prefix": "button",
"body": "<button type=\"$1\">$2</button>$3",
"description": "HTML - Defines a push button",
"scope": "text.html"
},
"canvas": {
"prefix": "canvas",
"body": "<canvas id=\"$1\">$2</canvas>$3",
"description": "HTML - Defines graphics",
"scope": "text.html"
},
"caption": {
"prefix": "caption",
"body": "<caption>$1</caption>$2",
"description": "HTML - Defines a table caption",
"scope": "text.html"
},
"cite": {
"prefix": "cite",
"body": "<cite>$1</cite>$2",
"description": "HTML - Defines a citation",
"scope": "text.html"
},
"code": {
"prefix": "code",
"body": "<code>$1</code>$2",
"description": "HTML - Defines computer code text",
"scope": "text.html"
},
"col": {
"prefix": "col",
"body": "<col>$2",
"description": "HTML - Defines attributes for table columns",
"scope": "text.html"
},
"colgroup": {
"prefix": "colgroup",
"body": [
"<colgroup>",
"\t$1",
"</colgroup>"
],
"description": "HTML - Defines group of table columns",
"scope": "text.html"
},
"command": {
"prefix": "command",
"body": "<command>$1</command>$2",
"description": "HTML - Defines a command button [not supported]",
"scope": "text.html"
},
"datalist": {
"prefix": "datalist",
"body": [
"<datalist>",
"\t$1",
"</datalist>"
],
"description": "HTML - Defines a dropdown list",
"scope": "text.html"
},
"dd": {
"prefix": "dd",
"body": "<dd>$1</dd>$2",
"description": "HTML - Defines a definition description",
"scope": "text.html"
},
"del": {
"prefix": "del",
"body": "<del>$1</del>$2",
"description": "HTML - Defines deleted text",
"scope": "text.html"
},
"details": {
"prefix": "details",
"body": [
"<details>",
"\t$1",
"</details>"
],
"description": "HTML - Defines details of an element",
"scope": "text.html"
},
"dialog": {
"prefix": "dialog",
"body": "<dialog>$1</dialog>$2",
"description": "HTML - Defines a dialog (conversation)",
"scope": "text.html"
},
"dfn": {
"prefix": "dfn",
"body": "<dfn>$1</dfn>$2",
"description": "HTML - Defines a definition term",
"scope": "text.html"
},
"div": {
"prefix": "div",
"body": [
"<div>",
"\t$1",
"</div>"
],
"description": "HTML - Defines a section in a document",
"scope": "text.html"
},
"dl": {
"prefix": "dl",
"body": [
"<dl>",
"\t$1",
"</dl>"
],
"description": "HTML - Defines a definition list",
"scope": "text.html"
},
"dt": {
"prefix": "dt",
"body": "<dt>$1</dt>$2",
"description": "HTML - Defines a definition term",
"scope": "text.html"
},
"em": {
"prefix": "em",
"body": "<em>$1</em>$2",
"description": "HTML - Defines emphasized text",
"scope": "text.html"
},
"embed": {
"prefix": "embed",
"body": "<embed src=\"$1\">$2",
"description": "HTML - Defines external interactive content ot plugin",
"scope": "text.html"
},
"fieldset": {
"prefix": "fieldset",
"body": [
"<fieldset>",
"\t$1",
"</fieldset>"
],
"description": "HTML - Defines a fieldset",
"scope": "text.html"
},
"figcaption": {
"prefix": "figcaption",
"body": "<figcaption>$1</figcaption>$2",
"description": "HTML - Defines a caption for a figure",
"scope": "text.html"
},
"figure": {
"prefix": "figure",
"body": [
"<figure>",
"\t$1",
"</figure>"
],
"description": "HTML - Defines a group of media content, and their caption",
"scope": "text.html"
},
"footer": {
"prefix": "footer",
"body": [
"<footer>",
"\t$1",
"</footer>"
],
"description": "HTML - Defines a footer for a section or page",
"scope": "text.html"
},
"form": {
"prefix": "form",
"body": [
"<form>",
"\t$1",
"</form>"
],
"description": "HTML - Defines a form",
"scope": "text.html"
},
"h1": {
"prefix": "h1",
"body": "<h1>$1</h1>$2",
"description": "HTML - Defines header 1",
"scope": "text.html"
},
"h2": {
"prefix": "h2",
"body": "<h2>$1</h2>$2",
"description": "HTML - Defines header 2",
"scope": "text.html"
},
"h3": {
"prefix": "h3",
"body": "<h3>$1</h3>$2",
"description": "HTML - Defines header 3",
"scope": "text.html"
},
"h4": {
"prefix": "h4",
"body": "<h4>$1</h4>$2",
"description": "HTML - Defines header 4",
"scope": "text.html"
},
"h5": {
"prefix": "h5",
"body": "<h5>$1</h5>$2",
"description": "HTML - Defines header 5",
"scope": "text.html"
},
"h6": {
"prefix": "h6",
"body": "<h6>$1</h6>$2",
"description": "HTML - Defines header 6",
"scope": "text.html"
},
"head": {
"prefix": "head",
"body": [
"<head>",
"\t$1",
"</head>"
],
"description": "HTML - Defines information about the document",
"scope": "text.html"
},
"header": {
"prefix": "header",
"body": [
"<header>",
"\t$1",
"</header>"
],
"description": "HTML - Defines a header for a section of page",
"scope": "text.html"
},
"hgroup": {
"prefix": "hgroup",
"body": [
"<hgroup>",
"\t$1",
"</hgroup>"
],
"description": "HTML - Defines information about a section in a document",
"scope": "text.html"
},
"hr": {
"prefix": "hr",
"body": "<hr>",
"description": "HTML - Defines a horizontal rule",
"scope": "text.html"
},
"html": {
"prefix": "html",
"body": [
"<html>",
"\t$1",
"</html>"
],
"description": "HTML - Defines an html document",
"scope": "text.html"
},
"html5": {
"prefix": "html5",
"body": [
"<!DOCTYPE html>",
"<html lang=\"$1en\">",
"\t<head>",
"\t\t<title>$2</title>",
"\t\t<meta charset=\"UTF-8\">",
"\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">",
"\t\t<link href=\"$3css/style.css\" rel=\"stylesheet\">",
"\t</head>",
"\t<body>",
"\t$4",
"\t</body>",
"</html>"
],
"description": "HTML - Defines a template for a html5 document",
"scope": "text.html"
},
"i": {
"prefix": "i",
"body": "<i>$1</i>$2",
"description": "HTML - Defines italic text",
"scope": "text.html"
},
"iframe": {
"prefix": "iframe",
"body": "<iframe src=\"$1\">$2</iframe>$3",
"description": "HTML - Defines an inline sub window",
"scope": "text.html"
},
"img": {
"prefix": "img",
"body": "<img src=\"$1\" alt=\"$2\">$3",
"description": "HTML - Defines an image",
"scope": "text.html"
},
"input": {
"prefix": "input",
"body": "<input type=\"$1\" name=\"$2\" value=\"$3\">$4",
"description": "HTML - Defines an input field",
"scope": "text.html"
},
"ins": {
"prefix": "ins",
"body": "<ins>$1</ins>$2",
"description": "HTML - Defines inserted text",
"scope": "text.html"
},
"keygen": {
"prefix": "keygen",
"body": "<keygen name=\"$1\">$2",
"description": "HTML - Defines a generated key in a form",
"scope": "text.html"
},
"kbd": {
"prefix": "kbd",
"body": "<kbd>$1</kbd>$2",
"description": "HTML - Defines keyboard text",
"scope": "text.html"
},
"label": {
"prefix": "label",
"body": "<label for=\"$1\">$2</label>$3",
"description": "HTML - Defines an inline window",
"scope": "text.html"
},
"legend": {
"prefix": "legend",
"body": "<legend>$1</legend>$2",
"description": "HTML - Defines a title in a fieldset",
"scope": "text.html"
},
"li": {
"prefix": "li",
"body": "<li>$1</li>$2",
"description": "HTML - Defines a list item",
"scope": "text.html"
},
"link": {
"prefix": "link",
"body": "<link rel=\"$1\" type=\"$2\" href=\"$3\">$4",
"description": "HTML - Defines a resource reference",
"scope": "text.html"
},
"main": {
"prefix": "main",
"body": [
"<main>",
"\t$1",
"</main>"
],
"description": "HTML - Defines an image map",
"scope": "text.html"
},
"map": {
"prefix": "map",
"body": [
"<map name=\"$1\">",
"\t$2",
"</map>"
],
"description": "HTML - Defines an image map",
"scope": "text.html"
},
"mark": {
"prefix": "mark",
"body": "<mark>$1</mark>$2",
"description": "HTML - Defines marked text",
"scope": "text.html"
},
"menu": {
"prefix": "menu",
"body": [
"<menu>",
"\t$1",
"</menu>"
],
"description": "HTML - Defines a menu list",
"scope": "text.html"
},
"menuitem": {
"prefix": "menuitem",
"body": "<menuitem>$1</menuitem>$2",
"description": "HTML - Defines a menu item [firefox only]",
"scope": "text.html"
},
"meta": {
"prefix": "meta",
"body": "<meta name=\"$1\" content=\"$2\">$3",
"description": "HTML - Defines meta information",
"scope": "text.html"
},
"meter": {
"prefix": "meter",
"body": "<meter value=\"$1\">$2</meter>$3",
"description": "HTML - Defines measurement within a predefined range",
"scope": "text.html"
},
"nav": {
"prefix": "nav",
"body": [
"<nav>",
"\t$1",
"</nav>"
],
"description": "HTML - Defines navigation links",
"scope": "text.html"
},
"noscript": {
"prefix": "noscript",
"body": [
"<noscript>",
"$1",
"</noscript>"
],
"description": "HTML - Defines a noscript section",
"scope": "text.html"
},
"object": {
"prefix": "object",
"body": "<object width=\"$1\" height=\"$2\" data=\"$3\">$4</object>$5",
"description": "HTML - Defines an embedded object",
"scope": "text.html"
},
"ol": {
"prefix": "ol",
"body": [
"<ol>",
"\t$1",
"</ol>"
],
"description": "HTML - Defines an ordered list",
"scope": "text.html"
},
"optgroup": {
"prefix": "optgroup",
"body": [
"<optgroup>",
"\t$1",
"</optgroup>"
],
"description": "HTML - Defines an option group",
"scope": "text.html"
},
"option": {
"prefix": "option",
"body": "<option value=\"$1\">$2</option>$3",
"description": "HTML - Defines an option in a drop-down list",
"scope": "text.html"
},
"output": {
"prefix": "output",
"body": "<output name=\"$1\" for=\"$2\">$3</output>$4",
"description": "HTML - Defines some types of output",
"scope": "text.html"
},
"p": {
"prefix": "p",
"body": "<p>$1</p>$2",
"description": "HTML - Defines a paragraph",
"scope": "text.html"
},
"param": {
"prefix": "param",
"body": "<param name=\"$1\" value=\"$2\">$3",
"description": "HTML - Defines a parameter for an object",
"scope": "text.html"
},
"pre": {
"prefix": "pre",
"body": [
"<pre>$1</pre>"
],
"description": "HTML - Defines preformatted text",
"scope": "text.html"
},
"progress": {
"prefix": "progress",
"body": "<progress value=\"$1\" max=\"$2\">$3</progress>$4",
"description": "HTML - Defines progress of a task of any kind",
"scope": "text.html"
},
"q": {
"prefix": "q",
"body": "<q>$1</q>$2",
"description": "HTML - Defines a short quotation",
"scope": "text.html"
},
"rp": {
"prefix": "rp",
"body": "<rp>$1</rp>$2",
"description": "HTML - Used in ruby annotations to define what to show browsers that do not support the ruby element",
"scope": "text.html"
},
"rt": {
"prefix": "rt",
"body": "<rt>$1</rt>$2",
"description": "HTML - Defines explanation to ruby annotations",
"scope": "text.html"
},
"ruby": {
"prefix": "ruby",
"body": [
"<ruby>",
"$1",
"</ruby>"
],
"description": "HTML - Defines ruby annotations",
"scope": "text.html"
},
"s": {
"prefix": "s",
"body": "<s>$1</s>$2",
"description": "HTML - Used to define strikethrough text",
"scope": "text.html"
},
"samp": {
"prefix": "samp",
"body": "<samp>$1</samp>$2",
"description": "HTML - Defines sample computer code",
"scope": "text.html"
},
"script": {
"prefix": "script",
"body": [
"<script>",
"\t$1",
"</script>"
],
"description": "HTML - Defines a script",
"scope": "text.html"
},
"section": {
"prefix": "section",
"body": [
"<section>",
"\t$1",
"</section>"
],
"description": "HTML - Defines a section",
"scope": "text.html"
},
"select": {
"prefix": "select",
"body": [
"<select>",
"\t$1",
"</select>"
],
"description": "HTML - Defines a selectable list",
"scope": "text.html"
},
"small": {
"prefix": "small",
"body": "<small>$1</small>$2",
"description": "HTML - Defines small text",
"scope": "text.html"
},
"source": {
"prefix": "source",
"body": "<source src=\"$1\" type=\"$2\">$3",
"description": "HTML - Defines media resource",
"scope": "text.html"
},
"span": {
"prefix": "span",
"body": "<span>$1</span>$2",
"description": "HTML - Defines a section in a document",
"scope": "text.html"
},
"strong": {
"prefix": "strong",
"body": "<strong>$1</strong>$2",
"description": "HTML - Defines strong text",
"scope": "text.html"
},
"style": {
"prefix": "style",
"body": [
"<style>",
"$1",
"</style>"
],
"description": "HTML - Defines a style definition",
"scope": "text.html"
},
"sub": {
"prefix": "sub",
"body": "<sub>$1</sub>$2",
"description": "HTML - Defines sub-scripted text",
"scope": "text.html"
},
"sup": {
"prefix": "sup",
"body": "<sup>$1</sup>$2",
"description": "HTML - Defines super-scripted text",
"scope": "text.html"
},
"summary": {
"prefix": "summary",
"body": "<summary>$1</summary>$2",
"description": "HTML - Defines a visible heading for the detail element [limited support]",
"scope": "text.html"
},
"table": {
"prefix": "table",
"body": [
"<table>",
"\t$1",
"</table>"
],
"description": "HTML - Defines a table",
"scope": "text.html"
},
"tbody": {
"prefix": "tbody",
"body": [
"<tbody>",
"\t$1",
"</tbody>"
],
"description": "HTML - Defines a table body",
"scope": "text.html"
},
"td": {
"prefix": "td",
"body": "<td>$1</td>$2",
"description": "HTML - Defines a table cell",
"scope": "text.html"
},
"textarea": {
"prefix": "textarea",
"body": "<textarea rows=\"$1\" cols=\"$2\">$3</textarea>$4",
"description": "HTML - Defines a text area",
"scope": "text.html"
},
"tfoot": {
"prefix": "tfoot",
"body": [
"<tfoot>",
"\t$1",
"</tfoot>"
],
"description": "HTML - Defines a table footer",
"scope": "text.html"
},
"thead": {
"prefix": "thead",
"body": [
"<thead>",
"$1",
"</thead>"
],
"description": "HTML - Defines a table head",
"scope": "text.html"
},
"th": {
"prefix": "th",
"body": "<th>$1</th>$2",
"description": "HTML - Defines a table header",
"scope": "text.html"
},
"time": {
"prefix": "time",
"body": "<time datetime=\"$1\">$2</time>$3",
"description": "HTML - Defines a date/time",
"scope": "text.html"
},
"title": {
"prefix": "title",
"body": "<title>$1</title>$2",
"description": "HTML - Defines the document title",
"scope": "text.html"
},
"tr": {
"prefix": "tr",
"body": "<tr>$1</tr>$2",
"description": "HTML - Defines a table row",
"scope": "text.html"
},
"track": {
"prefix": "track",
"body": "<track src=\"$1\" kind=\"$2\" srclang=\"$3\" label=\"$4\">$5",
"description": "HTML - Defines a table row",
"scope": "text.html"
},
"u": {
"prefix": "u",
"body": "<u>$1</u>$2",
"description": "HTML - Used to define underlined text",
"scope": "text.html"
},
"ul": {
"prefix": "ul",
"body": [
"<ul>",
"\t$1",
"</ul>"
],
"description": "HTML - Defines an unordered list",
"scope": "text.html"
},
"var": {
"prefix": "var",
"body": "<var>$1</var>$2",
"description": "HTML - Defines a variable",
"scope": "text.html"
},
"video": {
"prefix": "video",
"body": [
"<video width=\"$1\" height=\"$2\" controls>",
"\t$3",
"</video>"
],
"description": "HTML - Defines a video",
"scope": "text.html"
}
}

View File

@ -1,774 +0,0 @@
{
"setImmediate": {
"prefix": "sim",
"body": "setImmediate(() => {\n\t${0}\n})"
},
"await": {
"prefix": "a",
"body": "await ${0}"
},
"await Promise.all": {
"prefix": "apa",
"body": "await Promise.all(${1:value})"
},
"await Promise.all with destructuring": {
"prefix": "apad",
"body": "const [${0}] = await Promise.all(${1:value})"
},
"await Promise.all map": {
"prefix": "apm",
"body": "await Promise.all(${1:array}.map(async (${2:value}) => {\n\t${0}\n}))"
},
"await sleep": {
"prefix": "ast",
"body": "await new Promise((r) => setTimeout(r, ${0}))"
},
"Node callback": {
"prefix": "cb",
"body": "function (err, ${1:value}) {\n\tif (err) throw err\n\t${0}\n}"
},
"process.env": {
"prefix": "pe",
"body": "process.env"
},
"Promise.all": {
"prefix": "pa",
"body": "Promise.all(${1:value})"
},
"Promise.resolve": {
"prefix": "prs",
"body": "Promise.resolve(${1:value})"
},
"Promise.reject": {
"prefix": "prj",
"body": "Promise.reject(${1:value})"
},
"Promise": {
"prefix": "p",
"body": "Promise"
},
"new Promise": {
"prefix": "np",
"body": "new Promise((resolve, reject) => {\n\t${0}\n})"
},
"Promise.then": {
"prefix": "pt",
"body": "${1:promise}.then((${2:value}) => {\n\t${0}\n})"
},
"Promise.catch": {
"prefix": "pc",
"body": "${1:promise}.catch(error => {\n\t${0}\n})"
},
"describe": {
"prefix": "desc",
"body": "describe('${1:description}', () => {\n\t${0}\n})"
},
"describe top level": {
"prefix": "dt",
"body": "describe('${TM_FILENAME_BASE}', () => {\n\t${0}\n})"
},
"it asynchronous": {
"prefix": "it",
"body": "it('${1:description}', async () => {\n\t${0}\n})"
},
"it.todo": {
"prefix": "itt",
"body": "it.todo('${1:description}')"
},
"it with a callback": {
"prefix": "itd",
"body": "it('${1:description}', (done) => {\n\t${0}\n})"
},
"it synchronous": {
"prefix": "its",
"body": "it('${1:description}', () => {\n\t${0}\n})"
},
"before": {
"prefix": "bf",
"body": "before(async () => {\n\t${0}\n})"
},
"beforeAll": {
"prefix": "ba",
"body": "beforeAll(async () => {\n\t${0}\n})"
},
"beforeEach": {
"prefix": "bfe",
"body": "beforeEach(async () => {\n\t${0}\n})"
},
"after": {
"prefix": "aft",
"body": "after(() => {\n\t${0}\n})"
},
"afterEach": {
"prefix": "afe",
"body": "afterEach(() => {\n\t${0}\n})"
},
"require": {
"prefix": "rq",
"body": "require('${1:module}')"
},
"const module = require('module')": {
"prefix": "cr",
"body": "const ${1:module} = require('${1:module}')"
},
"exports.member": {
"prefix": "em",
"body": "exports.${1:member} = ${2:value}"
},
"module.exports": {
"prefix": "me",
"body": "module.exports = ${1:name}"
},
"module as class": {
"prefix": "mec",
"body": "class ${1:name} {\n\tconstructor (${2:arguments}) {\n\t\t${0}\n\t}\n}\n\nmodule.exports = ${1:name}\n"
},
"event handler": {
"prefix": "on",
"body": "${1:emitter}.on('${2:event}', (${3:arguments}) => {\n\t${0}\n})"
},
"dom event cancel default and propagation": {
"prefix": "evc",
"body": "ev.preventDefault()\nev.stopPropagation()\nreturn false"
},
"addEventListener": {
"prefix": "ae",
"body": "${1:document}.addEventListener('${2:event}', ${3:ev} => {\n\t${0}\n})"
},
"removeEventListener": {
"prefix": "rel",
"body": "${1:document}.removeEventListener('${2:event}', ${3:listener})"
},
"getElementById": {
"prefix": "gi",
"body": "${1:document}.getElementById('${2:id}')"
},
"getElementsByClassName": {
"prefix": "gc",
"body": "Array.from(${1:document}.getElementsByClassName('${2:class}'))"
},
"getElementsByTagName": {
"prefix": "gt",
"body": "Array.from(${1:document}.getElementsByTagName('${2:tag}'))"
},
"querySelector": {
"prefix": "qs",
"body": "${1:document}.querySelector('${2:selector}')"
},
"querySelectorAll": {
"prefix": "qsa",
"body": "Array.from(${1:document}.querySelectorAll('${2:selector}'))"
},
"createDocumentFragment": {
"prefix": "cdf",
"body": "${1:document}.createDocumentFragment(${2:elem})"
},
"createElement": {
"prefix": "cel",
"body": "${1:document}.createElement(${2:elem})"
},
"classList.add": {
"prefix": "hecla",
"body": "${1:el}.classList.add('${2:class}')"
},
"classList.remove": {
"prefix": "heclr",
"body": "${1:el}.classList.remove('${2:class}')"
},
"classList.toggle": {
"prefix": "hect",
"body": "${1:el}.classList.toggle('${2:class}')"
},
"getAttribute": {
"prefix": "hega",
"body": "${1:el}.getAttribute('${2:attr}')"
},
"removeAttribute": {
"prefix": "hera",
"body": "${1:el}.removeAttribute('${2:attr}')"
},
"setAttribute": {
"prefix": "hesa",
"body": "${1:el}.setAttribute('${2:attr}', ${3:value})"
},
"appendChild": {
"prefix": "heac",
"body": "${1:el}.appendChild(${2:elem})"
},
"removeChild": {
"prefix": "herc",
"body": "${1:el}.removeChild(${2:elem})"
},
"forEach loop": {
"prefix": "fe",
"body": "${1:iterable}.forEach((${2:item}) => {\n\t${0}\n})"
},
"map": {
"prefix": "map",
"body": "${1:iterable}.map((${2:item}) => {\n\t${0}\n})"
},
"reduce": {
"prefix": "reduce",
"body": "${1:iterable}.reduce((${2:previous}, ${3:current}) => {\n\t${0}\n}${4:, initial})"
},
"filter": {
"prefix": "filter",
"body": "${1:iterable}.filter((${2:item}) => {\n\t${0}\n})"
},
"find": {
"prefix": "find",
"body": "${1:iterable}.find((${2:item}) => {\n\t${0}\n})"
},
"every": {
"prefix": "every",
"body": "${1:iterable}.every((${2:item}) => {\n\t${0}\n})"
},
"some": {
"prefix": "some",
"body": "${1:iterable}.some((${2:item}) => {\n\t${0}\n})"
},
"var statement": {
"prefix": "v",
"body": "var ${1:name}"
},
"var assignment": {
"prefix": "va",
"body": "var ${1:name} = ${2:value}"
},
"let statement": {
"prefix": "l",
"body": "let ${1:name}"
},
"const statement": {
"prefix": "c",
"body": "const ${1:name}"
},
"const statement from destructuring": {
"prefix": "cd",
"body": "const { ${2:prop} } = ${1:value}"
},
"const statement from array destructuring": {
"prefix": "cad",
"body": "const [ ${2:prop} ] = ${1:value}"
},
"const assignment awaited": {
"prefix": "ca",
"body": "const ${1:name} = await ${2:value}"
},
"const destructuring assignment awaited": {
"prefix": "cda",
"body": "const { ${1:name} } = await ${2:value}"
},
"const arrow function assignment": {
"prefix": "cf",
"body": "const ${1:name} = (${2:arguments}) => {\n\treturn ${0}\n}"
},
"let assignment awaited": {
"prefix": "la",
"body": "let ${1:name} = await ${2:value}"
},
"const assignment yielded": {
"prefix": "cy",
"body": "const ${1:name} = yield ${2:value}"
},
"let assignment yielded": {
"prefix": "ly",
"body": "let ${1:name} = yield ${2:value}"
},
"const object": {
"prefix": "co",
"body": "const ${1:name} = {\n\t${0}\n}"
},
"const array": {
"prefix": "car",
"body": "const ${1:name} = [\n\t${0}\n]"
},
"generate array of integers starting with 1": {
"prefix": "gari",
"body": "Array.from({ length: ${1:length} }, (v, k) => k + 1)"
},
"generate array of integers starting with 0": {
"prefix": "gari0",
"body": "[...Array(${1:length}).keys()]"
},
"class": {
"prefix": "cs",
"body": "class ${1:name} {\n\tconstructor (${2:arguments}) {\n\t\t${0}\n\t}\n}"
},
"class extends": {
"prefix": "csx",
"body": "class ${1:name} extends ${2:base} {\n\tconstructor (${3:arguments}) {\n\t\tsuper(${3:arguments})\n\t\t${0}\n\t}\n}"
},
"module export": {
"prefix": "e",
"body": "export ${1:member}"
},
"module export const": {
"prefix": "ec",
"body": "export const ${1:member} = ${2:value}"
},
"export named function": {
"prefix": "ef",
"body": "export function ${1:member} (${2:arguments}) {\n\t${0}\n}"
},
"module default export": {
"prefix": "ed",
"body": "export default ${1:member}"
},
"module default export function": {
"prefix": "edf",
"body": "export default function ${1:name} (${2:arguments}) {\n\t${0}\n}"
},
"import module": {
"prefix": "im",
"body": "import ${2:*} from '${1:module}'"
},
"import module as": {
"prefix": "ia",
"body": "import ${2:*} as ${3:name} from '${1:module}'"
},
"import module destructured": {
"prefix": "id",
"body": "import {$2} from '${1:module}'"
},
"typeof": {
"prefix": "to",
"body": "typeof ${1:source} === '${2:undefined}'"
},
"this": {
"prefix": "t",
"body": "this."
},
"instanceof": {
"prefix": "iof",
"body": "${1:source} instanceof ${2:Object}"
},
"let and if statement": {
"prefix": "lif",
"body": "let ${0} \n if (${2:condition}) {\n\t${1}\n}"
},
"else statement": {
"prefix": "el",
"body": "else {\n\t${0}\n}"
},
"else if statement": {
"prefix": "ei",
"body": "else if (${1:condition}) {\n\t${0}\n}"
},
"while iteration decrementing": {
"prefix": "wid",
"body": "let ${1:array}Index = ${1:array}.length\nwhile (${1:array}Index--) {\n\t${0}\n}"
},
"throw new Error": {
"prefix": "tn",
"body": "throw new ${0:error}"
},
"try/catch": {
"prefix": "tc",
"body": "try {\n\t${0}\n} catch (${1:err}) {\n\t\n}"
},
"try/finally": {
"prefix": "tf",
"body": "try {\n\t${0}\n} finally {\n\t\n}"
},
"try/catch/finally": {
"prefix": "tcf",
"body": "try {\n\t${0}\n} catch (${1:err}) {\n\t\n} finally {\n\t\n}"
},
"anonymous function": {
"prefix": "fan",
"body": "function (${1:arguments}) {${0}}"
},
"named function": {
"prefix": "fn",
"body": "function ${1:name} (${2:arguments}) {\n\t${0}\n}"
},
"async function": {
"prefix": "asf",
"body": "async function (${1:arguments}) {\n\t${0}\n}"
},
"async arrow function": {
"prefix": "aa",
"body": "async (${1:arguments}) => {\n\t${0}\n}"
},
"immediately-invoked function expression": {
"prefix": "iife",
"body": ";(function (${1:arguments}) {\n\t${0}\n})(${2})"
},
"async immediately-invoked function expression": {
"prefix": "aiife",
"body": ";(async (${1:arguments}) => {\n\t${0}\n})(${2})"
},
"arrow function": {
"prefix": "af",
"body": "(${1:arguments}) => ${2:statement}"
},
"arrow function with destructuring": {
"prefix": "fd",
"body": "({${1:arguments}}) => ${2:statement}"
},
"arrow function with destructuring returning destructured": {
"prefix": "fdr",
"body": "({${1:arguments}}) => ${1:arguments}"
},
"arrow function with body": {
"prefix": "f",
"body": "(${1:arguments}) => {\n\t${0}\n}"
},
"arrow function with return": {
"prefix": "fr",
"body": "(${1:arguments}) => {\n\treturn ${0}\n}"
},
"generator function": {
"prefix": "gf",
"body": "function* (${1:arguments}) {\n\t${0}\n}"
},
"named generator": {
"prefix": "gfn",
"body": "function* ${1:name}(${2:arguments}) {\n\t${0}\n}"
},
"console.log": {
"prefix": "cl",
"body": "console.log(${0})"
},
"console.log a variable": {
"prefix": "cv",
"body": "console.log('${1}:', ${1})"
},
"console.error": {
"prefix": "ce",
"body": "console.error(${0})"
},
"console.warn": {
"prefix": "cw",
"body": "console.warn(${0})"
},
"console.dir": {
"prefix": "cod",
"body": "console.dir('${1}:', ${1})"
},
"constructor": {
"prefix": "cn",
"body": "constructor () {\n\t${0}\n}"
},
"use strict": {
"prefix": "uss",
"body": "'use strict'"
},
"JSON.stringify()": {
"prefix": "js",
"body": "JSON.stringify($0)"
},
"JSON.parse()": {
"prefix": "jp",
"body": "JSON.parse($0)"
},
"method": {
"prefix": "m",
"body": "${1:method} (${2:arguments}) {\n\t${0}\n}"
},
"getter": {
"prefix": "get",
"body": "get ${1:property} () {\n\t${0}\n}"
},
"setter": {
"prefix": "set",
"body": "set ${1:property} (${2:value}) {\n\t${0}\n}"
},
"getter + setter": {
"prefix": "gs",
"body": "get ${1:property} () {\n\t${0}\n}\nset ${1:property} (${2:value}) {\n\t\n}"
},
"prototype method": {
"prefix": "proto",
"body": "${1:Class}.prototype.${2:method} = function (${3:arguments}) {\n\t${0}\n}"
},
"Object.assign": {
"prefix": "oa",
"body": "Object.assign(${1:dest}, ${2:source})"
},
"Object.create": {
"prefix": "oc",
"body": "Object.create(${1:obj})"
},
"Object.getOwnPropertyDescriptor": {
"prefix": "og",
"body": "Object.getOwnPropertyDescriptor(${1:obj}, '${2:prop}')"
},
"ternary": {
"prefix": "te",
"body": "${1:cond} ? ${2:true} : ${3:false}"
},
"ternary assignment": {
"prefix": "ta",
"body": "const ${0} = ${1:cond} ? ${2:true} : ${3:false}"
},
"Object.defineProperty": {
"prefix": "od",
"body": "Object.defineProperty(${1:dest}, '${2:prop}', {\n\t${0}\n})"
},
"Object.keys": {
"prefix": "ok",
"body": "Object.keys(${1:obj})"
},
"Object.values": {
"prefix": "ov",
"body": "Object.values(${1:obj})"
},
"Object.entries": {
"prefix": "oe",
"body": "Object.entries(${1:obj})"
},
"return": {
"prefix": "r",
"body": "return ${0}"
},
"return arrow function": {
"prefix": "rf",
"body": "return (${1:arguments}) => ${2:statement}"
},
"yield": {
"prefix": "y",
"body": "yield ${0}"
},
"return this": {
"prefix": "rt",
"body": "return ${0:this}"
},
"return null": {
"prefix": "rn",
"body": "return null"
},
"return new object": {
"prefix": "ro",
"body": "return {\n\t${0}\n}"
},
"return new array": {
"prefix": "ra",
"body": "return [\n\t${0}\n]"
},
"return promise": {
"prefix": "rp",
"body": "return new Promise((resolve, reject) => {\n\t${0}\n})"
},
"wrap selection in arrow function": {
"prefix": "wrap selection in arrow function",
"body": "() => {\n\t{$TM_SELECTED_TEXT}\n}",
"description": "wraps text in arrow function"
},
"wrap selection in async arrow function": {
"prefix": "wrap selection in async arrow function",
"body": "async () => {\n\t{$TM_SELECTED_TEXT}\n}",
"description": "wraps text in arrow function"
},
"define module": {
"prefix": "define",
"body": [
"define([",
"\t'require',",
"\t'${1:dependency}'",
"], function(require, ${2:factory}) {",
"\t'use strict';",
"\t$0",
"});"
],
"description": "define module"
},
"For Loop": {
"prefix": "for",
"body": [
"for (let ${1:index} = 0; ${1:index} < ${2:array}.length; ${1:index}++) {",
"\tconst ${3:element} = ${2:array}[${1:index}];",
"\t$0",
"}"
],
"description": "For Loop"
},
"For-Each Loop": {
"prefix": "foreach",
"body": ["${1:array}.forEach(${2:element} => {", "\t$0", "});"],
"description": "For-Each Loop"
},
"For-In Loop": {
"prefix": "forin",
"body": [
"for (const ${1:key} in ${2:object}) {",
"\tif (${2:object}.hasOwnProperty(${1:key})) {",
"\t\tconst ${3:element} = ${2:object}[${1:key}];",
"\t\t$0",
"\t}",
"}"
],
"description": "For-In Loop"
},
"For-Of Loop": {
"prefix": "forof",
"body": ["for (const ${1:iterator} of ${2:object}) {", "\t$0", "}"],
"description": "For-Of Loop"
},
"Function Statement": {
"prefix": "function",
"body": ["function ${1:name}(${2:params}) {", "\t$0", "}"],
"description": "Function Statement"
},
"If Statement": {
"prefix": "if",
"body": ["if (${1:condition}) {", "\t$0", "}"],
"description": "If Statement"
},
"If-Else Statement": {
"prefix": "ifelse",
"body": ["if (${1:condition}) {", "\t$0", "} else {", "\t", "}"],
"description": "If-Else Statement"
},
"New Statement": {
"prefix": "new",
"body": ["const ${1:name} = new ${2:type}(${3:arguments});$0"],
"description": "New Statement"
},
"Switch Statement": {
"prefix": "switch",
"body": [
"switch (${1:key}) {",
"\tcase ${2:value}:",
"\t\t$0",
"\t\tbreak;",
"",
"\tdefault:",
"\t\tbreak;",
"}"
],
"description": "Switch Statement"
},
"While Statement": {
"prefix": "while",
"body": ["while (${1:condition}) {", "\t$0", "}"],
"description": "While Statement"
},
"Do-While Statement": {
"prefix": "dowhile",
"body": ["do {", "\t$0", "} while (${1:condition});"],
"description": "Do-While Statement"
},
"Try-Catch Statement": {
"prefix": "trycatch",
"body": ["try {", "\t$0", "} catch (${1:error}) {", "\t", "}"],
"description": "Try-Catch Statement"
},
"Set Timeout Function": {
"prefix": "settimeout",
"body": ["setTimeout(() => {", "\t$0", "}, ${1:timeout});"],
"description": "Set Timeout Function"
},
"Set Interval Function": {
"prefix": "setinterval",
"body": ["setInterval(() => {", "\t$0", "}, ${1:interval});"],
"description": "Set Interval Function"
},
"Import external module.": {
"prefix": "import statement",
"body": ["import { $0 } from \"${1:module}\";"],
"description": "Import external module."
},
"Region Start": {
"prefix": "#region",
"body": ["//#region $0"],
"description": "Folding Region Start"
},
"Region End": {
"prefix": "#endregion",
"body": ["//#endregion"],
"description": "Folding Region End"
},
"Log warning to console": {
"prefix": "warn",
"body": ["console.warn($1);", "$0"],
"description": "Log warning to the console"
},
"Log error to console": {
"prefix": "error",
"body": ["console.error($1);", "$0"],
"description": "Log error to the console"
},
"JSDoc Comment": {
"prefix": "/*",
"body": [
"/**",
" * ${1:Comment}$0",
"*/"
],
"description": "A JSDoc comment"
},
"author email": {
"prefix": "@au",
"body": [
"@author ${1:author_name} [${2:author_email}]"
],
"description": "@author email (First Last)"
},
"Lisense desc": {
"prefix": "@li",
"body": [
"@license ${1:MIT}$0"
],
"description": "@lisence Description"
},
"Semantic version": {
"prefix": "@ver",
"body": [
"@version ${1:0.1.0}$0"
],
"description": "@version Semantic version"
},
"File overview": {
"prefix": "@fileo",
"body": [
"/**\n",
" * @fileoverview ${1:Description_of_the_file}$0",
"*/"
],
"description": "@fileoverview Description"
},
"Contructor": {
"prefix": "@constr",
"body": [
"@contructor"
],
"description": "@constructor"
},
"varname": {
"prefix": "@p",
"body": [
"@param ${1:Type} ${2:varname} ${3:Description}"
],
"description": "@param {Type} varname Description"
},
"return type desc": {
"prefix": "@ret",
"body": [
"@return ${1:Type} ${2:Description}"
],
"description": "@return {Type} Description"
},
"private": {
"prefix": "@pri",
"body": [
"@private"
],
"description": "@private"
},
"override": {
"prefix": "@over",
"body": [
"@override"
],
"description": "@override"
},
"protected": {
"prefix": "@pro",
"body": [
"@protected"
],
"description": "@protected"
}
}

View File

@ -1,288 +0,0 @@
{
"header 1": {
"prefix": "h1",
"body": ["# ${0}"],
"description": "Add header level 1"
},
"header 2": {
"prefix": "h2",
"body": ["## ${0}"],
"description": "Add header level 2"
},
"header 3": {
"prefix": "h3",
"body": ["### ${0}"],
"description": "Add header level 3"
},
"header 4": {
"prefix": "h4",
"body": ["#### ${0}"],
"description": "Add header level 4"
},
"header 5": {
"prefix": "h5",
"body": ["##### ${0}"],
"description": "Add header level 5"
},
"header 6": {
"prefix": "h6",
"body": ["###### ${0}"],
"description": "Add header level 6"
},
"Links": {
"prefix": ["l", "link"],
"body": ["[${1}](${2})${0}"],
"description": "Add links"
},
"URLS": {
"prefix": ["u", "url"],
"body": ["<${1}> ${0}"],
"description": "Add urls"
},
"Images": {
"prefix": "img",
"body": ["![${1}](${2}) ${0}"],
"description": "Add images"
},
"Insert strikethrough": {
"prefix": "strikethrough",
"body": "~~${1}~~ ${0}",
"description": "Insert strikethrough"
},
"Insert bold text": {
"prefix": ["bold", "b"],
"body": "**${1}** $0",
"description": "Insert bold text"
},
"Insert italic text": {
"prefix": ["i", "italic"],
"body": "*${1}* $0",
"description": "Insert italic text"
},
"Insert bold and italic text": {
"prefix": ["bold and italic", "bi"],
"body": "***${1}*** $0",
"description": "Insert bold and italic text"
},
"Insert quoted text": {
"prefix": "quote",
"body": "> ${1}",
"description": "Insert quoted text"
},
"Insert code": {
"prefix": "code",
"body": "`${1}` $0",
"description": "Insert code"
},
"Insert code block": {
"prefix": "codeblock",
"body": ["```${1:language}", "$0", "```"],
"description": "Insert fenced code block"
},
"Insert unordered list": {
"prefix": "unordered list",
"body": ["- ${1:first}", "- ${2:second}", "- ${3:third}", "$0"],
"description": "Insert unordered list"
},
"Insert ordered list": {
"prefix": "ordered list",
"body": ["1. ${1:first}", "2. ${2:second}", "3. ${3:third}", "$0"],
"description": "Insert ordered list"
},
"Insert horizontal rule": {
"prefix": "horizontal rule",
"body": "----------\n",
"description": "Insert horizontal rule"
},
"Insert task list": {
"prefix": "task",
"body": ["- [${1| ,x|}] ${2:text}", "${0}"],
"description": "Insert task list"
},
"Insert task list 2": {
"prefix": "task2",
"body": ["- [${1| ,x|}] ${2:text}", "- [${3| ,x|}] ${4:text}", "${0}"],
"description": "Insert task list with 2 tasks"
},
"Insert task list 3": {
"prefix": "task3",
"body": [
"- [${1| ,x|}] ${2:text}",
"- [${3| ,x|}] ${4:text}",
"- [${5| ,x|}] ${6:text}",
"${0}"
],
"description": "Insert task list with 3 tasks"
},
"Insert task list 4": {
"prefix": "task4",
"body": [
"- [${1| ,x|}] ${2:text}",
"- [${3| ,x|}] ${4:text}",
"- [${5| ,x|}] ${6:text}",
"- [${7| ,x|}] ${8:text}",
"${0}"
],
"description": "Insert task list with 4 tasks"
},
"Insert task list 5": {
"prefix": "task5",
"body": [
"- [${1| ,x|}] ${2:text}",
"- [${3| ,x|}] ${4:text}",
"- [${5| ,x|}] ${6:text}",
"- [${7| ,x|}] ${8:text}",
"- [${9| ,x|}] ${10:text}",
"${0}"
],
"description": "Insert task list with 5 tasks"
},
"Insert table": {
"prefix": "table",
"body": [
"| ${1:Column1} | ${2:Column2} | ${3:Column3} |",
"|-------------- | -------------- | -------------- |",
"| ${4:Item1} | ${5:Item1} | ${6:Item1} |",
"${0}"
],
"description": "Insert table with 2 rows and 3 columns. First row is heading."
},
"Insert 2x1 table": {
"prefix": "2x1table",
"body": [
"| ${1:Column1} |",
"|-------------- |",
"| ${2:Item1} |",
"${0}"
],
"description": "Insert table with 2 rows and 1 column. First row is heading."
},
"Insert 3x1 table": {
"prefix": "3x1table",
"body": [
"| ${1:Column1} |",
"|-------------- |",
"| ${2:Item1} |",
"| ${3:Item2} |",
"${0}"
],
"description": "Insert table with 3 rows and 1 column. First row is heading."
},
"Insert 4x1 table": {
"prefix": "4x1table",
"body": [
"| ${1:Column1} |",
"|-------------- |",
"| ${2:Item1} |",
"| ${3:Item2} |",
"| ${4:Item3} |",
"${0}"
],
"description": "Insert table with 4 rows and 1 column. First row is heading."
},
"Insert 5x1 table": {
"prefix": "5x1table",
"body": [
"| ${1:Column1} |",
"|-------------- |",
"| ${2:Item1} |",
"| ${3:Item2} |",
"| ${4:Item3} |",
"| ${5:Item4} |",
"${0}"
],
"description": "Insert table with 5 rows and 1 column. First row is heading."
},
"Insert 2x2 table": {
"prefix": "2x2table",
"body": [
"| ${1:Column1} | ${2:Column2} |",
"|--------------- | --------------- |",
"| ${3:Item1.1} | ${4:Item2.1} |",
"${0}"
],
"description": "Insert table with 2 rows and 2 columns. First row is heading."
},
"Insert 3x2 table": {
"prefix": "3x2table",
"body": [
"| ${1:Column1} | ${2:Column2} |",
"|--------------- | --------------- |",
"| ${3:Item1.1} | ${4:Item2.1} |",
"| ${5:Item1.2} | ${6:Item2.2} |",
"${0}"
],
"description": "Insert table with 3 rows and 2 columns. First row is heading."
},
"Insert 4x2 table": {
"prefix": "4x2table",
"body": [
"| ${1:Column1} | ${2:Column2} |",
"|--------------- | --------------- |",
"| ${3:Item1.1} | ${4:Item2.1} |",
"| ${5:Item1.2} | ${6:Item2.2} |",
"| ${7:Item1.3} | ${8:Item2.3} |",
"${0}"
],
"description": "Insert table with 4 rows and 2 columns. First row is heading."
},
"Insert 5x2 table": {
"prefix": "5x2table",
"body": [
"| ${1:Column1} | ${2:Column2} |",
"|--------------- | --------------- |",
"| ${3:Item1.1} | ${4:Item2.1} |",
"| ${4:Item1.2} | ${5:Item2.2} |",
"| ${6:Item1.3} | ${7:Item2.3} |",
"| ${8:Item1.4} | ${9:Item2.4} |",
"${0}"
],
"description": "Insert table with 5 rows and 2 columns. First row is heading."
},
"Insert 2x3 table": {
"prefix": "2x3table",
"body": [
"| ${1:Column1} | ${2:Column2} | ${3:Column3} |",
"|---------------- | --------------- | --------------- |",
"| ${4:Item1.1} | ${5:Item2.1} | ${6:Item3.1} |",
"${0}"
],
"description": "Insert table with 2 rows and 3 columns. First row is heading."
},
"Insert 3x3 table": {
"prefix": "3x3table",
"body": [
"| ${1:Column1} | ${2:Column2} | ${3:Column3} |",
"|---------------- | --------------- | --------------- |",
"| ${4:Item1.1} | ${5:Item2.1} | ${6:Item3.1} |",
"| ${7:Item1.2} | ${8:Item2.2} | ${9:Item3.2} |",
"${0}"
],
"description": "Insert table with 3 rows and 3 columns. First row is heading."
},
"Insert 4x3 table": {
"prefix": "4x3table",
"body": [
"| ${1:Column1} | ${2:Column2} | ${3:Column3} |",
"|---------------- | --------------- | --------------- |",
"| ${4:Item1.1} | ${5:Item2.1} | ${6:Item3.1} |",
"| ${7:Item1.2} | ${8:Item2.2} | ${9:Item3.2} |",
"| ${10:Item1.3} | ${11:Item2.3} | ${12:Item3.3} |",
"${0}"
],
"description": "Insert table with 4 rows and 3 columns. First row is heading."
},
"Insert 5x3 table": {
"prefix": "5x3table",
"body": [
"| ${1:Column1} | ${2:Column2} | ${3:Column3} |",
"|---------------- | --------------- | --------------- |",
"| ${4:Item1.1} | ${5:Item2.1} | ${6:Item3.1} |",
"| ${7:Item1.2} | ${8:Item2.2} | ${9:Item3.2} |",
"| ${10:Item1.3} | ${11:Item2.3} | ${12:Item3.3} |",
"| ${13:Item1.4} | ${14:Item2.4} | ${15:Item3.4} |",
"${0}"
],
"description": "Insert table with 5 rows and 3 columns. First row is heading."
}
}

View File

@ -1,20 +0,0 @@
{
"image": {
"prefix": "image",
"body": [
".. image:: $1",
"\t:height: 200px",
"\t:alt: $2",
"$0"
],
"description": "Insert image"
},
"etape": {
"prefix": ["etape", "étape"],
"body": [
"Étape ${1:1}: $2",
"$0"
],
"description": "Insert image"
}
}

View File

@ -1,380 +0,0 @@
{
"header 1": {
"prefix": "h1",
"body": ["# ${0}"],
"description": "Add header level 1"
},
"header 2": {
"prefix": "h2",
"body": ["## ${0}"],
"description": "Add header level 2"
},
"header 3": {
"prefix": "h3",
"body": ["### ${0}"],
"description": "Add header level 3"
},
"header 4": {
"prefix": "h4",
"body": ["#### ${0}"],
"description": "Add header level 4"
},
"header 5": {
"prefix": "h5",
"body": ["##### ${0}"],
"description": "Add header level 5"
},
"header 6": {
"prefix": "h6",
"body": ["###### ${0}"],
"description": "Add header level 6"
},
"Links": {
"prefix": ["l", "link"],
"body": ["[${1}](${2}) ${0}"],
"description": "Add links"
},
"URLS": {
"prefix": ["u", "url"],
"body": ["<${1}> ${0}"],
"description": "Add urls"
},
"Images": {
"prefix": "img",
"body": ["![${1}](${2}) ${0}"],
"description": "Add images"
},
"Insert strikethrough": {
"prefix": "strikethrough",
"body": "~~${1}~~ ${0}",
"description": "Insert strikethrough"
},
"Insert bold text": {
"prefix": ["bold", "b"],
"body": "**${1}** $0",
"description": "Insert bold text"
},
"Insert italic text": {
"prefix": ["i", "italic"],
"body": "*${1}* $0",
"description": "Insert italic text"
},
"Insert bold and italic text": {
"prefix": ["bold and italic", "bi"],
"body": "***${1}*** $0",
"description": "Insert bold and italic text"
},
"Insert quoted text": {
"prefix": "quote",
"body": "> ${1}",
"description": "Insert quoted text"
},
"Insert code": {
"prefix": "code",
"body": "`${1}` $0",
"description": "Insert code"
},
"Insert code block": {
"prefix": "codeblock",
"body": ["```${1:language}", "$0", "```"],
"description": "Insert fenced code block"
},
"Insert unordered list": {
"prefix": "unordered list",
"body": ["- ${1:first}", "- ${2:second}", "- ${3:third}", "$0"],
"description": "Insert unordered list"
},
"Insert ordered list": {
"prefix": "ordered list",
"body": ["1. ${1:first}", "2. ${2:second}", "3. ${3:third}", "$0"],
"description": "Insert ordered list"
},
"Insert horizontal rule": {
"prefix": "horizontal rule",
"body": "----------\n",
"description": "Insert horizontal rule"
},
"Insert task list": {
"prefix": "task",
"body": ["- [${1| ,x|}] ${2:text}", "${0}"],
"description": "Insert task list"
},
"Insert task list 2": {
"prefix": "task2",
"body": ["- [${1| ,x|}] ${2:text}", "- [${3| ,x|}] ${4:text}", "${0}"],
"description": "Insert task list with 2 tasks"
},
"Insert task list 3": {
"prefix": "task3",
"body": [
"- [${1| ,x|}] ${2:text}",
"- [${3| ,x|}] ${4:text}",
"- [${5| ,x|}] ${6:text}",
"${0}"
],
"description": "Insert task list with 3 tasks"
},
"Insert task list 4": {
"prefix": "task4",
"body": [
"- [${1| ,x|}] ${2:text}",
"- [${3| ,x|}] ${4:text}",
"- [${5| ,x|}] ${6:text}",
"- [${7| ,x|}] ${8:text}",
"${0}"
],
"description": "Insert task list with 4 tasks"
},
"Insert task list 5": {
"prefix": "task5",
"body": [
"- [${1| ,x|}] ${2:text}",
"- [${3| ,x|}] ${4:text}",
"- [${5| ,x|}] ${6:text}",
"- [${7| ,x|}] ${8:text}",
"- [${9| ,x|}] ${10:text}",
"${0}"
],
"description": "Insert task list with 5 tasks"
},
"Insert table": {
"prefix": "table",
"body": [
"| ${1:Column1} | ${2:Column2} | ${3:Column3} |",
"|-------------- | -------------- | -------------- |",
"| ${4:Item1} | ${5:Item1} | ${6:Item1} |",
"${0}"
],
"description": "Insert table with 2 rows and 3 columns. First row is heading."
},
"Insert 2x1 table": {
"prefix": "2x1table",
"body": [
"| ${1:Column1} |",
"|-------------- |",
"| ${2:Item1} |",
"${0}"
],
"description": "Insert table with 2 rows and 1 column. First row is heading."
},
"Insert 3x1 table": {
"prefix": "3x1table",
"body": [
"| ${1:Column1} |",
"|-------------- |",
"| ${2:Item1} |",
"| ${3:Item2} |",
"${0}"
],
"description": "Insert table with 3 rows and 1 column. First row is heading."
},
"Insert 4x1 table": {
"prefix": "4x1table",
"body": [
"| ${1:Column1} |",
"|-------------- |",
"| ${2:Item1} |",
"| ${3:Item2} |",
"| ${4:Item3} |",
"${0}"
],
"description": "Insert table with 4 rows and 1 column. First row is heading."
},
"Insert 5x1 table": {
"prefix": "5x1table",
"body": [
"| ${1:Column1} |",
"|-------------- |",
"| ${2:Item1} |",
"| ${3:Item2} |",
"| ${4:Item3} |",
"| ${5:Item4} |",
"${0}"
],
"description": "Insert table with 5 rows and 1 column. First row is heading."
},
"Insert 2x2 table": {
"prefix": "2x2table",
"body": [
"| ${1:Column1} | ${2:Column2} |",
"|--------------- | --------------- |",
"| ${3:Item1.1} | ${4:Item2.1} |",
"${0}"
],
"description": "Insert table with 2 rows and 2 columns. First row is heading."
},
"Insert 3x2 table": {
"prefix": "3x2table",
"body": [
"| ${1:Column1} | ${2:Column2} |",
"|--------------- | --------------- |",
"| ${3:Item1.1} | ${4:Item2.1} |",
"| ${5:Item1.2} | ${6:Item2.2} |",
"${0}"
],
"description": "Insert table with 3 rows and 2 columns. First row is heading."
},
"Insert 4x2 table": {
"prefix": "4x2table",
"body": [
"| ${1:Column1} | ${2:Column2} |",
"|--------------- | --------------- |",
"| ${3:Item1.1} | ${4:Item2.1} |",
"| ${5:Item1.2} | ${6:Item2.2} |",
"| ${7:Item1.3} | ${8:Item2.3} |",
"${0}"
],
"description": "Insert table with 4 rows and 2 columns. First row is heading."
},
"Insert 5x2 table": {
"prefix": "5x2table",
"body": [
"| ${1:Column1} | ${2:Column2} |",
"|--------------- | --------------- |",
"| ${3:Item1.1} | ${4:Item2.1} |",
"| ${4:Item1.2} | ${5:Item2.2} |",
"| ${6:Item1.3} | ${7:Item2.3} |",
"| ${8:Item1.4} | ${9:Item2.4} |",
"${0}"
],
"description": "Insert table with 5 rows and 2 columns. First row is heading."
},
"Insert 2x3 table": {
"prefix": "2x3table",
"body": [
"| ${1:Column1} | ${2:Column2} | ${3:Column3} |",
"|---------------- | --------------- | --------------- |",
"| ${4:Item1.1} | ${5:Item2.1} | ${6:Item3.1} |",
"${0}"
],
"description": "Insert table with 2 rows and 3 columns. First row is heading."
},
"Insert 3x3 table": {
"prefix": "3x3table",
"body": [
"| ${1:Column1} | ${2:Column2} | ${3:Column3} |",
"|---------------- | --------------- | --------------- |",
"| ${4:Item1.1} | ${5:Item2.1} | ${6:Item3.1} |",
"| ${7:Item1.2} | ${8:Item2.2} | ${9:Item3.2} |",
"${0}"
],
"description": "Insert table with 3 rows and 3 columns. First row is heading."
},
"Insert 4x3 table": {
"prefix": "4x3table",
"body": [
"| ${1:Column1} | ${2:Column2} | ${3:Column3} |",
"|---------------- | --------------- | --------------- |",
"| ${4:Item1.1} | ${5:Item2.1} | ${6:Item3.1} |",
"| ${7:Item1.2} | ${8:Item2.2} | ${9:Item3.2} |",
"| ${10:Item1.3} | ${11:Item2.3} | ${12:Item3.3} |",
"${0}"
],
"description": "Insert table with 4 rows and 3 columns. First row is heading."
},
"Insert 5x3 table": {
"prefix": "5x3table",
"body": [
"| ${1:Column1} | ${2:Column2} | ${3:Column3} |",
"|---------------- | --------------- | --------------- |",
"| ${4:Item1.1} | ${5:Item2.1} | ${6:Item3.1} |",
"| ${7:Item1.2} | ${8:Item2.2} | ${9:Item3.2} |",
"| ${10:Item1.3} | ${11:Item2.3} | ${12:Item3.3} |",
"| ${13:Item1.4} | ${14:Item2.4} | ${15:Item3.4} |",
"${0}"
],
"description": "Insert table with 5 rows and 3 columns. First row is heading."
},
"Insert 2x4 table": {
"prefix": "2x4table",
"body": [
"| ${1:Column1} | ${2:Column2} | ${3:Column3} | ${4:Column4} |",
"|---------------- | --------------- | --------------- | --------------- |",
"| ${5:Item1.1} | ${6:Item2.1} | ${7:Item3.1} | ${8:Item4.1} |",
"${0}"
],
"description": "Insert table with 2 rows and 4 columns. First row is heading."
},
"Insert 3x4 table": {
"prefix": "3x4table",
"body": [
"| ${1:Column1} | ${2:Column2} | ${3:Column3} | ${4:Column4} |",
"|---------------- | --------------- | --------------- | --------------- |",
"| ${5:Item1.1} | ${6:Item2.1} | ${7:Item3.1} | ${8:Item4.1} |",
"| ${9:Item1.2} | ${10:Item2.2} | ${11:Item3.2} | ${12:Item4.2} |",
"${0}"
],
"description": "Insert table with 3 rows and 4 columns. First row is heading."
},
"Insert 4x4 table": {
"prefix": "4x4table",
"body": [
"| ${1:Column1} | ${2:Column2} | ${3:Column3} | ${4:Column4} |",
"|---------------- | --------------- | --------------- | --------------- |",
"| ${5:Item1.1} | ${6:Item2.1} | ${7:Item3.1} | ${8:Item4.1} |",
"| ${9:Item1.2} | ${10:Item2.2} | ${11:Item3.2} | ${12:Item4.2} |",
"| ${13:Item1.3} | ${14:Item2.3} | ${15:Item3.3} | ${16:Item4.3} |",
"${0}"
],
"description": "Insert table with 4 rows and 4 columns. First row is heading."
},
"Insert 5x4 table": {
"prefix": "5x4table",
"body": [
"| ${1:Column1} | ${2:Column2} | ${3:Column3} | ${4:Column4} |",
"|---------------- | --------------- | --------------- | --------------- |",
"| ${5:Item1.1} | ${6:Item2.1} | ${7:Item3.1} | ${8:Item4.1} |",
"| ${9:Item1.2} | ${10:Item2.2} | ${11:Item3.2} | ${12:Item4.2} |",
"| ${13:Item1.3} | ${14:Item2.3} | ${15:Item3.3} | ${16:Item4.3} |",
"| ${17:Item1.4} | ${18:Item2.4} | ${19:Item3.4} | ${20:Item4.4} |",
"${0}"
],
"description": "Insert table with 5 rows and 4 columns. First row is heading."
},
"Insert 2x5 table": {
"prefix": "2x5table",
"body": [
"| ${1:Column1} | ${2:Column2} | ${3:Column3} | ${4:Column4} | ${5:Column5} |",
"|---------------- | --------------- | --------------- | --------------- | --------------- |",
"| ${6:Item1.1} | ${7:Item2.1} | ${8:Item3.1} | ${9:Item4.1} | ${10:Item5.1} |",
"${0}"
],
"description": "Insert table with 2 rows and 5 columns. First row is heading."
},
"Insert 3x5 table": {
"prefix": "3x5table",
"body": [
"| ${1:Column1} | ${2:Column2} | ${3:Column3} | ${4:Column4} | ${5:Column5} |",
"|---------------- | --------------- | --------------- | --------------- | --------------- |",
"| ${6:Item1.1} | ${7:Item2.1} | ${8:Item3.1} | ${9:Item4.1} | ${10:Item5.1} |",
"| ${11:Item1.2} | ${12:Item2.2} | ${13:Item3.2} | ${14:Item4.2} | ${15:Item5.2} |",
"${0}"
],
"description": "Insert table with 3 rows and 5 columns. First row is heading."
},
"Insert 4x5 table": {
"prefix": "4x5table",
"body": [
"| ${1:Column1} | ${2:Column2} | ${3:Column3} | ${4:Column4} | ${5:Column5} |",
"|---------------- | --------------- | --------------- | --------------- | --------------- |",
"| ${6:Item1.1} | ${7:Item2.1} | ${8:Item3.1} | ${9:Item4.1} | ${10:Item5.1} |",
"| ${11:Item1.2} | ${12:Item2.2} | ${13:Item3.2} | ${14:Item4.2} | ${15:Item5.2} |",
"| ${16:Item1.3} | ${17:Item2.3} | ${18:Item3.3} | ${19:Item4.3} | ${20:Item5.3} |",
"${0}"
],
"description": "Insert table with 4 rows and 5 columns. First row is heading."
},
"Insert 5x5 table": {
"prefix": "5x5table",
"body": [
"| ${1:Column1} | ${2:Column2} | ${3:Column3} | ${4:Column4} | ${5:Column5} |",
"|---------------- | --------------- | --------------- | --------------- | --------------- |",
"| ${6:Item1.1} | ${7:Item2.1} | ${8:Item3.1} | ${9:Item4.1} | ${10:Item5.1} |",
"| ${11:Item1.2} | ${12:Item2.2} | ${13:Item3.2} | ${14:Item4.2} | ${15:Item5.2} |",
"| ${16:Item1.3} | ${17:Item2.3} | ${18:Item3.3} | ${19:Item4.3} | ${20:Item5.3} |",
"| ${21:Item1.4} | ${22:Item2.4} | ${23:Item3.4} | ${24:Item4.4} | ${25:Item5.4} |",
"${0}"
],
"description": "Insert table with 5 rows and 5 columns. First row is heading."
}
}

View File

@ -1,137 +0,0 @@
{
"\\begin{}…\\end{}": {
"prefix": "begin",
"body": [
"\\\\begin{${1:env}}",
"\t$0",
"\\\\end{${1:env}}"
],
"description": "Begin - End"
},
"Display Math — \\[ … \\]": {
"prefix": "$$",
"body": [
"\\[",
"\t$TM_SELECTED_TEXT$1",
"\\]"
],
"description": "Display Math"
},
"Itemize": {
"prefix": "item",
"body": [
"\\\\begin{itemize}",
"\t\\item $0",
"\\\\end{itemize}"
],
"description": "Itemize"
},
"Enumerate": {
"prefix": "enum",
"body": [
"\\\\begin{enumerate}",
"\t\\item $0",
"\\\\end{enumerate}"
],
"description": "enumerate"
},
"Task": {
"prefix": "task",
"body": [
"\\\\begin{tasks}(${1:2})",
"\t\\task $0",
"\\\\end{tasks}"
],
"description": "enumerate"
},
"center": {
"prefix": "center",
"body": [
"\\\\begin{center}",
"\t$0",
"\\\\end{center}"
],
"description": "center"
},
"tabular": {
"prefix": "tabular",
"body": [
"\\\\begin{tabular}{$1}",
"\t\\\\hline",
"\t$0",
"\t\\\\hline",
"\\\\end{tabular}"
],
"description": "tabular"
},
"minipage": {
"prefix": "minipage",
"body": [
"\\\\begin{minipage}{${1:0.5}${2:\\\\linewidth}}",
"\t$0",
"\\\\end{minipage}"
],
"description": "minipage"
},
"multicols": {
"prefix": "multicols",
"body": [
"\\\\begin{multicols}{${1:2}}",
"\t$0",
"\\\\end{multicols}"
],
"description": "multicols"
},
"image": {
"prefix": "image",
"body": [
"\\\\includegraphics[scale=${1:1}]{${2:./fig/}}",
"$0"
],
"description": "exercise xsim"
},
"exercise": {
"prefix": "exercise",
"body": [
"\\\\begin{exercise}[subtitle={${1:subtitle}}, step={${2:1}}, origin={${3:Création}}, topics={${4:chapitre}}, tags={${5:tags}}, mode={${5:groupe}}]",
"\t$0",
"\\\\end{exercise}"
],
"description": "exercise xsim"
},
"AMC_multquestion": {
"prefix": "multquestion",
"body": [
"\\\\element{${1:group}}{",
"\\\\begin{questionmult}{${2:name}}\\\\bareme{b=0.5,m=0.5,p=0}",
"\t$3",
"\t\\\\begin{reponseshoriz}",
"\t\t\\\\bonne{$4}",
"\t\t\\\\mauvaise{$5}",
"\t\\\\end{reponseshoriz}",
"\\\\end{questionmult}",
"}"
],
"description": "Question simple pour AMC"
},
"AMC_question": {
"prefix": "question",
"body": [
"\\\\element{${1:group}}{",
"\\\\begin{question}{${2:name}}",
"\t$3",
"\t\\\\begin{reponseshoriz}",
"\t\t\\\\bonne{$4}",
"\t\t\\\\mauvaise{$5}",
"\t\\\\end{reponseshoriz}",
"\\\\end{question}",
"}"
],
"description": "Question multiple pour AMC"
}
}