diff --git a/init.lua b/init.lua index 3403eaa..fe52973 100644 --- a/init.lua +++ b/init.lua @@ -195,7 +195,10 @@ require('lazy').setup({ end, }, - { 'benfowler/telescope-luasnip.nvim' }, + { + -- Allow to search for snippets + 'benfowler/telescope-luasnip.nvim' + }, { -- Highlight, edit, and navigate code @@ -472,7 +475,7 @@ local servers = { -- pyright = {}, -- rust_analyzer = {}, -- tsserver = {}, - + marksman = { ft = { 'markdown', @@ -486,6 +489,22 @@ local servers = { telemetry = { enable = false }, }, }, + + texlab = { + settings = { + build = { + executable = "tectonic", + args = { + "-X", + "compile", + "%f", + "--syntex", + "--keep-logs", + "--keep-intermediates" + } + } + } + }, } -- Setup neovim lua configuration diff --git a/my_snippets/markdown.lua b/my_snippets/markdown.lua index 231450b..6a6c590 100644 --- a/my_snippets/markdown.lua +++ b/my_snippets/markdown.lua @@ -8,14 +8,21 @@ local fmt = require("luasnip.extras.fmt").fmt -- Function to get the datetime -- with daylight saving time -- according to the locale -local get_date = function() +local get_datetime = function() return os.date("%Y-%m-%dT%H:%M:%S%z") end +-- Function to get the current date +local get_date = function() + return os.date("%Y-%m-%d") +end + +-- Function to get the current month local get_month = function() return os.date("%B") end +-- Function to get the current year local get_month_year = function() return os.date("%B-%Y") end @@ -25,27 +32,52 @@ local get_id = function() return os.date("%Y%m%d%H%M%S") end +-- Function to get the number of the current day +local get_day = function() + return os.date("%d") +end + return { s( { trig = "datetime", name = "Datetime", - dscr = "Insert datetime with locale daylight saving" + dscr = "Insert the current datetime with locale daylight saving." }, { - f(get_date, {}) + f(get_datetime, {}) + } + ), + s( + { + trig = "date", + name = "Date", + dscr = "Insert the current date." + }, + { + f(get_datetime, {}) } ), s( { trig = "id", Name = "ID", - dscr = "Insert an id based on the datetime" + dscr = "Insert an id based on the current datetime." }, { f(get_id, {}) } ), + s( + { + trig = "today", + Name = "Today", + dscr = "Insert the number of the current day." + }, + { + f(get_day, {}) + } + ), s( { trig = "fm",