1
Fork 0

feat: latex stuff

This commit is contained in:
Matei Adriel 2022-02-09 22:20:34 +02:00
parent ce832a3ca2
commit 6dd9ebbb6e
8 changed files with 60 additions and 5 deletions

View file

@ -0,0 +1,7 @@
local M = {}
function M.global(name, value)
vim.g[name] = value
end
return M

View 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

View file

@ -1,6 +1,7 @@
local M = {}
function M.setup()
require("my.plugins.cmp").setup()
require("my.plugins.lspconfig").setup()
-- require("my.plugins.fzf-lua").setup()
require("my.plugins.telescope").setup()
@ -8,6 +9,7 @@ function M.setup()
require("my.plugins.comment").setup()
-- require("my.plugins.nerdtree").setup()
require("my.plugins.nvim-tree").setup()
require("my.plugins.vimtex").setup()
-- Other unconfigured plugins
require('nvim-autopairs').setup()

View file

@ -74,6 +74,8 @@ local servers = {
}
function M.setup()
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
-- Setup basic language servers
for lsp, details in pairs(servers) do
if details.on_attach == nil then
@ -87,13 +89,12 @@ function M.setup()
flags = {
debounce_text_changes = 150 -- This will be the default in neovim 0.7+
},
cmd = details.cmd
cmd = details.cmd,
capabilities = capabilities
}
end
local efmLanguages = {
lua = {{formatCommand = formatLua, formatStdin = true}}
}
local efmLanguages = {lua = {{formatCommand = formatLua, formatStdin = true}}}
-- Setup auto-formatting
require"lspconfig".efm.setup {

View file

@ -10,7 +10,7 @@ local bindings = {
live_grep = "<c-F>",
-- See diagnostics with space + d
diagnotics = "<space>d",
diagnostics = "<space>d",
-- Open a list with all the pickers
builtin = "<space>t",

View 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

View file

@ -63,6 +63,7 @@
# blueman # bluetooth manager
# freesweep # minesweeper I can play w the keyboard.
# multimc
sloc # line of code counter
# Nes emulators and stuff
# zsnes

View file

@ -31,6 +31,7 @@ in
fd # file finder
ripgrep # grep rewrite (I think?)
nodePackages.typescript # typescript language
texlive.combined.scheme-full # latex stuff
];
plugins = with pkgs.vimPlugins;
@ -49,6 +50,14 @@ in
plenary-nvim # async utility lib it seems?
lualine-nvim # customizable status line
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
];
};
}