Skip to content
Closed

Dev #1447

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .gitignore

This file was deleted.

50 changes: 37 additions & 13 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ require('lazy').setup({
-- Then, because we use the `opts` key (recommended), the configuration runs
-- after the plugin has been loaded as `require(MODULE).setup(opts)`.

{ -- Useful plugin to show you pending keybinds.
{ -- Useful plugin to show you pending keybinds.
'folke/which-key.nvim',
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
opts = {
Expand Down Expand Up @@ -336,7 +336,7 @@ require('lazy').setup({

-- Document existing key chains
spec = {
{ '<leader>c', group = '[C]ode', mode = { 'n', 'x' } },
{ '<leader>c', group = '[C]ode', mode = { 'n', 'x' } },
{ '<leader>d', group = '[D]ocument' },
{ '<leader>r', group = '[R]ename' },
{ '<leader>s', group = '[S]earch' },
Expand Down Expand Up @@ -376,7 +376,7 @@ require('lazy').setup({
{ 'nvim-telescope/telescope-ui-select.nvim' },

-- Useful for getting pretty icons, but requires a Nerd Font.
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
},
config = function()
-- Telescope is a fuzzy finder that comes with a lot of different things that
Expand Down Expand Up @@ -472,6 +472,9 @@ require('lazy').setup({
},
},
},

{ 'Bilal2453/luvit-meta', lazy = true },

{
-- Main LSP Configuration
'neovim/nvim-lspconfig',
Expand All @@ -484,8 +487,10 @@ require('lazy').setup({
'WhoIsSethDaniel/mason-tool-installer.nvim',

-- Useful status updates for LSP.

{ 'j-hui/fidget.nvim', opts = {} },


-- Allows extra capabilities provided by nvim-cmp
'hrsh7th/cmp-nvim-lsp',
},
Expand Down Expand Up @@ -795,12 +800,12 @@ require('lazy').setup({
-- `friendly-snippets` contains a variety of premade snippets.
-- See the README about individual language/framework/plugin snippets:
-- https://github.com/rafamadriz/friendly-snippets
-- {
-- 'rafamadriz/friendly-snippets',
-- config = function()
-- require('luasnip.loaders.from_vscode').lazy_load()
-- end,
-- },
{
'rafamadriz/friendly-snippets',
config = function()
require('luasnip.loaders.from_vscode').lazy_load()
end,
},
},
},
'saadparwaiz1/cmp_luasnip',
Expand All @@ -816,7 +821,7 @@ require('lazy').setup({
-- See `:help cmp`
local cmp = require 'cmp'
local luasnip = require 'luasnip'
luasnip.config.setup {}
luasnip.config.setup ({ enable_autosnippets = true })

cmp.setup {
snippet = {
Expand Down Expand Up @@ -911,7 +916,12 @@ require('lazy').setup({
-- Load the colorscheme here.
-- Like many other themes, this one has different styles, and you could load
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
vim.cmd.colorscheme 'tokyonight-night'

vim.cmd.colorscheme 'tokyonight'

-- You can configure highlights by doing something like:
vim.cmd.hi 'Comment gui=none'

end,
},

Expand Down Expand Up @@ -966,10 +976,11 @@ require('lazy').setup({
auto_install = true,
highlight = {
enable = true,
disable = {"latex"},
-- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules.
-- If you are experiencing weird indenting issues, add the language to
-- the list of additional_vim_regex_highlighting and disabled languages for indent.
additional_vim_regex_highlighting = { 'ruby' },
additional_vim_regex_highlighting = { 'ruby', "latex","markdown" },
},
indent = { enable = true, disable = { 'ruby' } },
},
Expand Down Expand Up @@ -1001,7 +1012,7 @@ require('lazy').setup({
-- This is the easiest way to modularize your config.
--
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
-- { import = 'custom.plugins' },
{ import = 'custom.plugins' },
--
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
-- Or use telescope!
Expand Down Expand Up @@ -1031,3 +1042,16 @@ require('lazy').setup({

-- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et
--
require("luasnip.loaders.from_lua").load({paths = "/home/BogosBinted/.config/nvim-kickstart/lua/custom/plugins/Luasnip"})

-- Somewhere in your Neovim startup, e.g. init.lua
require("luasnip").config.set_config({ -- Setting LuaSnip config

-- Enable autotriggered snippets
enable_autosnippets = true,

-- Use Tab (or some other key if you prefer) to trigger visual selection
store_selection_keys = "<Tab>",
})

32 changes: 32 additions & 0 deletions lazy-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"LuaSnip": { "branch": "master", "commit": "0f7bbce41ea152a94d12aea286f2ce98e63c0f58" },
"auto-session": { "branch": "main", "commit": "8d2eddb14ef66ed1019c92251e2d31bb7a2a2f87" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"conform.nvim": { "branch": "master", "commit": "f1125f8eace158255cf55772ce039aaf178a6b42" },
"fidget.nvim": { "branch": "main", "commit": "e2a175c2abe2d4f65357da1c98c59a5cfb2b543f" },
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
"gitsigns.nvim": { "branch": "main", "commit": "ac5aba6dce8c06ea22bea2c9016f51a2dbf90dc7" },
"lazy.nvim": { "branch": "main", "commit": "56ead98e05bb37a4ec28930a54d836d033cf00f2" },
"lazydev.nvim": { "branch": "main", "commit": "d5800897d9180cea800023f2429bce0a94ed6064" },
"luvit-meta": { "branch": "main", "commit": "57d464c4acb5c2e66bd4145060f5dc9e96a7bbb7" },
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "43894adcf10bb1190c2184bd7c1750e8ea2b3dce" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"mini.nvim": { "branch": "main", "commit": "6714e738555b1cfbef646a23af29aa113f91f4fe" },
"nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" },
"nvim-cmp": { "branch": "main", "commit": "40a03dc225383c4f6256596c2cdf27e03b8119b5" },
"nvim-lspconfig": { "branch": "master", "commit": "f012c1b176f0e3c71f40eb309bdec0316689462e" },
"nvim-treesitter": { "branch": "master", "commit": "a3a732107f8b529f97bf4921b3e1af5dcc756bb6" },
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
"tokyonight.nvim": { "branch": "main", "commit": "c2725eb6d086c8c9624456d734bd365194660017" },
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
"vimtex": { "branch": "master", "commit": "6ee92c7ed2cdc876f499bd5561a65d04dee10d1f" },
"which-key.nvim": { "branch": "main", "commit": "68e37e12913a66b60073906f5d3f14dee0de19f2" }
}
15 changes: 15 additions & 0 deletions lua/custom/plugins/Luasnip/all.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
-- Place this in ${HOME}/.config/nvim/LuaSnip/all.lua
return {
-- A snippet that expands the trigger "hi" into the string "Hello, world!".
require("luasnip").snippet(
{ trig = "hi" },
{ t("Hello, world!") }
),

-- To return multiple snippets, use one `return` statement per snippet file
-- and return a table of Lua snippets.
require("luasnip").snippet(
{ trig = "foo" },
{ t("Another snippet.") }
),
}
16 changes: 16 additions & 0 deletions lua/custom/plugins/Luasnip/tex/all.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
return {
-- Example: how to set snippet parameters
require("luasnip").snippet(
{ -- Table 1: snippet parameters
trig="saucisse",
dscr="An autotriggering snippet that expands 'hi' into 'Hello, world!'",
regTrig=false,
priority=100,
snippetType="autosnippet"
},
{ -- Table 2: snippet nodes (don't worry about this for now---we'll cover nodes shortly)
t("Hello, world!"), -- A single text node
}
-- Table 3, the advanced snippet options, is left blank.
),
}
131 changes: 131 additions & 0 deletions lua/custom/plugins/Luasnip/tex/delimiters.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
local ls = require("luasnip")
local s = ls.snippet
local t = ls.text_node
local i = ls.insert_node
local f = ls.function_node
local fmt = require("luasnip.extras.fmt").fmt

-- Add LaTeX snippets
return { -- [[
-- Implies
s({trig="=>", snippetType="autosnippet"},
{
t("\\implies")
}),

-- Inline Math
s({trig="mk", snippetType="autosnippet"}, fmt("${}$", { i(1) })),


-- Not Equals
s({trig="!=",snippetType="autosnippet"}, t("\\neq")),

-- Sum
s({trig="sum",snippetType="autosnippet"}, fmt("\\sum_{{n={}}}^{{{}}} {}", { i(1, "1"), i(2, "\\infty"), i(3, "a_n z^n") })),

-- Taylor Series
s({trig="taylor",snippetType="autosnippet"}, fmt("\\sum_{{{}={}}}^{{{}}} {} (x-a)^{}", { i(1, "k"), i(2, "0"), i(3, "\\infty"), i(4, "c_"), i(1) })),

-- Limit
s({trig="lim",snippetType="autosnippet"}, fmt("\\lim_{{{} \\to {}}}", { i(1, "n"), i(2, "\\infty") })),

s({trig="xx",snippetType="autosnippet"}, t("\\times")),
--[[
-- Greek Letters
s("alpha", t("\\alpha")),
s("beta", t("\\beta")),
s("gamma", t("\\gamma")),
s("delta", t("\\delta")),
s("epsilon", t("\\epsilon")),
s("zeta", t("\\zeta")),
s("eta", t("\\eta")),
s("theta", t("\\theta")),
s("iota", t("\\iota")),
s("kappa", t("\\kappa")),
s("lambda", t("\\lambda")),
s("mu", t("\\mu")),
s("nu", t("\\nu")),
s("xi", t("\\xi")),
s("omicron", t("\\omicron")),
s("pi", t("\\pi")),
s("rho", t("\\rho")),
s("sigma", t("\\sigma")),
s("tau", t("\\tau")),
s("upsilon", t("\\upsilon")),
s("phi", t("\\phi")),
s("chi", t("\\chi")),
s("psi", t("\\psi")),
s("omega", t("\\omega")),
s("Alpha", t("\\Alpha")),
s("Beta", t("\\Beta")),
s("Gamma", t("\\Gamma")),
s("Delta", t("\\Delta")),
s("Epsilon", t("\\Epsilon")),
s("Zeta", t("\\Zeta")),
s("Eta", t("\\Eta")),
s("Theta", t("\\Theta")),
s("Iota", t("\\Iota")),
s("Kappa", t("\\Kappa")),
s("Lambda", t("\\Lambda")),
s("Mu", t("\\Mu")),
s("Nu", t("\\Nu")),
s("Xi", t("\\Xi")),
s("Omicron", t("\\Omicron")),
s("Pi", t("\\Pi")),
s("Rho", t("\\Rho")),
s("Sigma", t("\\Sigma")),
s("Tau", t("\\Tau")),
s("Upsilon", t("\\Upsilon")),
s("Phi", t("\\Phi")),
s("Chi", t("\\Chi")),
s("Psi", t("\\Psi")),
s("Omega", t("\\Omega")),

-- Other Symbols
s("ooo", t("\\infty")),
s("prod", t("\\prod")),
s("pm", t("\\pm")),
s("mp", t("\\mp")),
s("+-", t("\\pm")),
s("-+", t("\\mp")),
s("...", t("\\dots")),
s("<->", t("\\leftrightarrow")),
s("->", t("\\to")),
s("!>", t("\\mapsto")),
s("invs", t("^{-1}")),
s("\\\\\\", t("\\setminus")),
s("||", t("\\mid")),
s("and", t("\\cap")),
s("orr", t("\\cup")),
s("inn", t("\\in")),
s("notin", t("\\not\\in")),
s("\\subset eq", t("\\subseteq")),
s("eset", t("\\emptyset")),
s("set", fmt("\\{{}}", { i(1) })),
s("=>", t("\\implies")),
s("=<", t("\\impliedby")),
s("iff", t("\\iff")),
s("exists", t("\\exists")),

-- Special Formatting
s("mcal", fmt("\\mathcal{{{}}}", { i(1) })),
s("mbb", fmt("\\mathbb{{{}}}", { i(1) })),
s("ell", t("\\ell")),
s("lll", t("\\ell")),
s("LL", t("\\mathcal{L}")),
s("HH", t("\\mathcal{H}")),
s("CC", t("\\mathbb{C}")),
s("RR", t("\\mathbb{R}")),
s("ZZ", t("\\mathbb{Z}")),
s("NN", t("\\mathbb{N}")),
s("II", t("\\mathbb{1}")),

-- Miscellaneous Symbols
s("del", t("\\nabla")),
s("avg", fmt("\\langle {} \\rangle", { i(1) })),
s("norm", fmt("\\lvert {} \\rvert", { i(1) })),
s("ceil", fmt("\\lceil {} \\rceil", { i(1) })),
s("floor", fmt("\\lfloor {} \\rfloor", { i(1) }))
]]--
}

Loading
Loading