feat: latex stuff
This commit is contained in:
parent
ce832a3ca2
commit
6dd9ebbb6e
7
dotfiles/neovim/lua/my/helpers.lua
Normal file
7
dotfiles/neovim/lua/my/helpers.lua
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.global(name, value)
|
||||||
|
vim.g[name] = value
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
25
dotfiles/neovim/lua/my/plugins/cmp.lua
Normal file
25
dotfiles/neovim/lua/my/plugins/cmp.lua
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.setup()
|
||||||
|
local cmp = require("cmp")
|
||||||
|
|
||||||
|
cmp.setup({
|
||||||
|
mapping = {
|
||||||
|
['<C-b>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), {'i', 'c'}),
|
||||||
|
['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), {'i', 'c'}),
|
||||||
|
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), {'i', 'c'}),
|
||||||
|
['<C-y>'] = cmp.config.disable,
|
||||||
|
['<C-e>'] = cmp.mapping({i = cmp.mapping.abort(), c = cmp.mapping.close()}),
|
||||||
|
['<CR>'] = cmp.mapping.confirm({select = true})
|
||||||
|
},
|
||||||
|
sources = cmp.config.sources({}, {{name = 'buffer'}})
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
|
||||||
|
cmp.setup.cmdline('/', {sources = {{name = 'buffer'}}})
|
||||||
|
|
||||||
|
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||||
|
cmp.setup.cmdline(':', {sources = cmp.config.sources({{name = 'path'}}, {{name = 'cmdline'}})})
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
|
@ -1,6 +1,7 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
function M.setup()
|
function M.setup()
|
||||||
|
require("my.plugins.cmp").setup()
|
||||||
require("my.plugins.lspconfig").setup()
|
require("my.plugins.lspconfig").setup()
|
||||||
-- require("my.plugins.fzf-lua").setup()
|
-- require("my.plugins.fzf-lua").setup()
|
||||||
require("my.plugins.telescope").setup()
|
require("my.plugins.telescope").setup()
|
||||||
|
@ -8,6 +9,7 @@ function M.setup()
|
||||||
require("my.plugins.comment").setup()
|
require("my.plugins.comment").setup()
|
||||||
-- require("my.plugins.nerdtree").setup()
|
-- require("my.plugins.nerdtree").setup()
|
||||||
require("my.plugins.nvim-tree").setup()
|
require("my.plugins.nvim-tree").setup()
|
||||||
|
require("my.plugins.vimtex").setup()
|
||||||
|
|
||||||
-- Other unconfigured plugins
|
-- Other unconfigured plugins
|
||||||
require('nvim-autopairs').setup()
|
require('nvim-autopairs').setup()
|
||||||
|
|
|
@ -74,6 +74,8 @@ local servers = {
|
||||||
}
|
}
|
||||||
|
|
||||||
function M.setup()
|
function M.setup()
|
||||||
|
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||||
|
|
||||||
-- Setup basic language servers
|
-- Setup basic language servers
|
||||||
for lsp, details in pairs(servers) do
|
for lsp, details in pairs(servers) do
|
||||||
if details.on_attach == nil then
|
if details.on_attach == nil then
|
||||||
|
@ -87,13 +89,12 @@ function M.setup()
|
||||||
flags = {
|
flags = {
|
||||||
debounce_text_changes = 150 -- This will be the default in neovim 0.7+
|
debounce_text_changes = 150 -- This will be the default in neovim 0.7+
|
||||||
},
|
},
|
||||||
cmd = details.cmd
|
cmd = details.cmd,
|
||||||
|
capabilities = capabilities
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
local efmLanguages = {
|
local efmLanguages = {lua = {{formatCommand = formatLua, formatStdin = true}}}
|
||||||
lua = {{formatCommand = formatLua, formatStdin = true}}
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Setup auto-formatting
|
-- Setup auto-formatting
|
||||||
require"lspconfig".efm.setup {
|
require"lspconfig".efm.setup {
|
||||||
|
|
|
@ -10,7 +10,7 @@ local bindings = {
|
||||||
live_grep = "<c-F>",
|
live_grep = "<c-F>",
|
||||||
|
|
||||||
-- See diagnostics with space + d
|
-- See diagnostics with space + d
|
||||||
diagnotics = "<space>d",
|
diagnostics = "<space>d",
|
||||||
|
|
||||||
-- Open a list with all the pickers
|
-- Open a list with all the pickers
|
||||||
builtin = "<space>t",
|
builtin = "<space>t",
|
||||||
|
|
10
dotfiles/neovim/lua/my/plugins/vimtex.lua
Normal file
10
dotfiles/neovim/lua/my/plugins/vimtex.lua
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
local global = require("my.helpers").global
|
||||||
|
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.setup()
|
||||||
|
-- Viewer method
|
||||||
|
global("vimtex_view_method", "zathura")
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
|
@ -63,6 +63,7 @@
|
||||||
# blueman # bluetooth manager
|
# blueman # bluetooth manager
|
||||||
# freesweep # minesweeper I can play w the keyboard.
|
# freesweep # minesweeper I can play w the keyboard.
|
||||||
# multimc
|
# multimc
|
||||||
|
sloc # line of code counter
|
||||||
|
|
||||||
# Nes emulators and stuff
|
# Nes emulators and stuff
|
||||||
# zsnes
|
# zsnes
|
||||||
|
|
|
@ -31,6 +31,7 @@ in
|
||||||
fd # file finder
|
fd # file finder
|
||||||
ripgrep # grep rewrite (I think?)
|
ripgrep # grep rewrite (I think?)
|
||||||
nodePackages.typescript # typescript language
|
nodePackages.typescript # typescript language
|
||||||
|
texlive.combined.scheme-full # latex stuff
|
||||||
];
|
];
|
||||||
|
|
||||||
plugins = with pkgs.vimPlugins;
|
plugins = with pkgs.vimPlugins;
|
||||||
|
@ -49,6 +50,14 @@ in
|
||||||
plenary-nvim # async utility lib it seems?
|
plenary-nvim # async utility lib it seems?
|
||||||
lualine-nvim # customizable status line
|
lualine-nvim # customizable status line
|
||||||
nvim-tree-lua # file tree
|
nvim-tree-lua # file tree
|
||||||
|
vimtex # latex plugin
|
||||||
|
|
||||||
|
# Cmp related stuff. See https://github.com/hrsh7th/nvim-cmp
|
||||||
|
cmp-nvim-lsp
|
||||||
|
cmp-buffer
|
||||||
|
cmp-path
|
||||||
|
cmd-cmdline
|
||||||
|
nvim-cmp
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue