about summary refs log tree commit diff stats
path: root/home-manager/soispha/config/neovim/nixvim/files/ftplugin/tex.lua
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-08-26 22:52:12 +0200
committerSoispha <soispha@vhack.eu>2023-08-26 22:56:09 +0200
commit4c743a2afb87994be4ff7c2dc76d21c70d31e4de (patch)
tree70922dd5db390641da012085bc674333b53d2ef1 /home-manager/soispha/config/neovim/nixvim/files/ftplugin/tex.lua
parentFix(hm/conf/neovim/plugins/colorscheme): Mk todo,fix,&c comments visible (diff)
downloadnixos-config-4c743a2afb87994be4ff7c2dc76d21c70d31e4de.zip
Style(treewide): Format all lua-files makes lua ➛ nix easier
The files were formatted according to the `.editorconfig` file and with
the formatter from [this](1) repo, as it's the only one that fully
understands all keys in the `.editorconfig` file.

The formatting was chosen in this special (and honestly unconventional)
way because moving code from lua to nix is now easier, as the syntax is
nearly identical in some places.
Diffstat (limited to 'home-manager/soispha/config/neovim/nixvim/files/ftplugin/tex.lua')
-rw-r--r--home-manager/soispha/config/neovim/nixvim/files/ftplugin/tex.lua111
1 files changed, 51 insertions, 60 deletions
diff --git a/home-manager/soispha/config/neovim/nixvim/files/ftplugin/tex.lua b/home-manager/soispha/config/neovim/nixvim/files/ftplugin/tex.lua
index 6cc37c4c..8f39d7bb 100644
--- a/home-manager/soispha/config/neovim/nixvim/files/ftplugin/tex.lua
+++ b/home-manager/soispha/config/neovim/nixvim/files/ftplugin/tex.lua
@@ -18,70 +18,61 @@
 -- );
 --
 --
-
 -- Set non-treesitter colorscheme
 require("gruvbox").setup({
-    undercurl = true,
-    underline = true,
-    bold = true,
-    italic = {
-        strings = true,
-        comments = true,
-        operators = false,
-        folds = true,
-    },
-    strikethrough = true,
-    invert_selection = false,
-    invert_signs = false,
-    invert_tabline = false,
-    invert_intend_guides = false,
-    inverse = true, -- invert background for search, diffs, statuslines and errors
-    contrast = "",  -- can be "hard", "soft" or empty string
-    palette_overrides = {},
-    overrides = {},
-    dim_inactive = false,
-    transparent_mode = false,
+  undercurl = true;
+  underline = true;
+  bold = true;
+  italic = { strings = true; comments = true; operators = false; folds = true; };
+  strikethrough = true;
+  invert_selection = false;
+  invert_signs = false;
+  invert_tabline = false;
+  invert_intend_guides = false;
+  inverse = true; -- invert background for search, diffs, statuslines and errors
+  contrast = "";  -- can be "hard", "soft" or empty string
+  palette_overrides = {};
+  overrides = {};
+  dim_inactive = false;
+  transparent_mode = false;
 })
 vim.cmd("colorscheme gruvbox")
 
-require('lualine').setup {
-    options = {
-        theme = 'gruvbox',
-    },
-}
+require("lualine").setup({ options = { theme = "gruvbox"; }; })
 
 -- Set tex specific telescope extension
-require('telescope').setup {
-    extensions = {
-        bibtex = {
-            -- Depth for the *.bib file
-            depth = 1,
-            -- Path to global bibliographies (placed outside of the project)
-            global_files = {},
-            -- Define the search keys to use in the picker
-            search_keys = { 'author', 'year', 'title' },
-            -- Template for the formatted citation
-            citation_format = '{{author}} ({{year}}), {{title}}.',
-            -- Only use initials for the authors first name
-            citation_trim_firstname = true,
-            -- Max number of authors to write in the formatted citation
-            -- following authors will be replaced by "et al."
-            citation_max_auth = 2,
-            -- Wrapping in the preview window is disabled by default
-            wrap = false,
-            -- Custom format for citation label
-            custom_formats = {
-                { id = 'tex_autocite', cite_marker = '\\autocite{%s}' }
-            },
-            format = 'tex_autocite',
-            -- Use context awareness
-            context = true,
-            -- Fallback to global/directory .bib files if context not found
-            -- This setting has no effect if context = false
-            context_fallback = true,
-        },
-    }
-}
-require('telescope').load_extension('bibtex')
-vim.api.nvim_set_keymap("n", "<leader>ib", function() require('telescope').extensions.bibtex.bibtex() end,
-    { noremap = true, silent = true, desc = "list bibtex entries in telescope" })
+require("telescope").setup({
+  extensions = {
+    bibtex = {
+      -- Depth for the *.bib file
+      depth = 1;
+      -- Path to global bibliographies (placed outside of the project)
+      global_files = {};
+      -- Define the search keys to use in the picker
+      search_keys = { "author"; "year"; "title"; };
+      -- Template for the formatted citation
+      citation_format = "{{author}} ({{year}}), {{title}}.";
+      -- Only use initials for the authors first name
+      citation_trim_firstname = true;
+      -- Max number of authors to write in the formatted citation
+      -- following authors will be replaced by "et al."
+      citation_max_auth = 2;
+      -- Wrapping in the preview window is disabled by default
+      wrap = false;
+      -- Custom format for citation label
+      custom_formats = {
+        { id = "tex_autocite"; cite_marker = "\\autocite{%s}"; };
+      };
+      format = "tex_autocite";
+      -- Use context awareness
+      context = true;
+      -- Fallback to global/directory .bib files if context not found
+      -- This setting has no effect if context = false
+      context_fallback = true;
+    };
+  };
+})
+require("telescope").load_extension("bibtex")
+vim.api.nvim_set_keymap("n", "<leader>ib", function()
+                          require("telescope").extensions.bibtex.bibtex()
+                        end, { noremap = true; silent = true; desc = "list bibtex entries in telescope"; })