Merge pull request 'Add Latex Support & Some updates' (#9) from add-latex-support into main

Reviewed-on: https://git.softinio.com/softinio/nix-config/pulls/9
This commit is contained in:
Salar Rahmanian 2022-09-18 23:59:54 +00:00
commit 90571fac9e
2 changed files with 47 additions and 4 deletions

View file

@ -37,6 +37,7 @@
exa exa
fd fd
ffmpeg ffmpeg
font-awesome
gitAndTools.diff-so-fancy gitAndTools.diff-so-fancy
gnupg gnupg
go go
@ -70,6 +71,7 @@
ripgrep ripgrep
ripgrep-all ripgrep-all
rnix-lsp rnix-lsp
rust-analyzer
rustup rustup
sbt sbt
scala-cli scala-cli
@ -79,6 +81,8 @@
stack stack
sumneko-lua-language-server sumneko-lua-language-server
tealdeer tealdeer
tectonic
texlab
tig tig
tokei tokei
tree tree
@ -278,7 +282,7 @@
rmxcodederived="rm -fr ~/Library/Developer/Xcode/DerivedData"; rmxcodederived="rm -fr ~/Library/Developer/Xcode/DerivedData";
v="nvim"; v="nvim";
sshfre1="ssh salar@fre1.softinio.net"; sshfre1="ssh salar@fre1.softinio.net";
sshfre2="ssh -p 2022 salar@fre2.softinio.net"; sshfre2="ssh -p 22 salar@fre2.softinio.net";
}; };
}; };

View file

@ -57,6 +57,11 @@ local function load_plugins()
use 'gennaro-tedesco/nvim-jqx' use 'gennaro-tedesco/nvim-jqx'
use 'p00f/nvim-ts-rainbow' use 'p00f/nvim-ts-rainbow'
use 'christoomey/vim-tmux-navigator' use 'christoomey/vim-tmux-navigator'
use 'lervag/vimtex'
use {
'f3fora/nvim-texlabconfig',
run = 'go build'
}
end) end)
end end
@ -144,6 +149,40 @@ _G.load_config = function()
require('dap-python').test_runner = 'pytest' require('dap-python').test_runner = 'pytest'
-- vimtex
vim.g.vimtex_view_method = 'skim'
vim.g.vimtex_compiler_method = 'tectonic'
-- nvim-texlabconfig
local tex_preview_executable = '/Applications/Skim.app/Contents/SharedSupport/displayline'
local tex_preview_args = {"%l", "%p", "%f"}
local texlab_build_executable = 'tectonic'
local texlab_build_args = {
'-X',
'compile',
'%f',
'--synctex',
'--keep-logs',
'--keep-intermediates'
}
require('texlabconfig').setup {
cache_activate = true,
cache_filetypes = { 'tex', 'bib' },
reverse_search_edit_cmd = 'split',
settings = {
texlab = {
build = {
executable = texlab_build_executable,
args = texlab_build_args
},
forwardSearch = {
executable = tex_preview_executable,
args = tex_preview_args
}
}
}
}
-- nvim-tree -- nvim-tree
require('nvim-tree').setup() require('nvim-tree').setup()
@ -397,7 +436,7 @@ _G.load_config = function()
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', '<Cmd>lua vim.lsp.buf.definition()<CR>', opts) vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', '<Cmd>lua vim.lsp.buf.definition()<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', '<Cmd>lua vim.lsp.buf.hover()<CR>', opts) vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', '<Cmd>lua vim.lsp.buf.hover()<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gm', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts) vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gm', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts) vim.api.nvim_buf_set_keymap(bufnr, 'n', '<C-s>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts) vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts) vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts) vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
@ -423,7 +462,7 @@ _G.load_config = function()
end end
-- Enable the following language servers -- Enable the following language servers
local servers = { 'html', 'jdtls', 'jsonls', 'pyright', 'rnix', 'sourcekit', 'tsserver', 'yamlls' } local servers = { 'html', 'jdtls', 'jsonls', 'pyright', 'rnix', 'rust_analyzer','sourcekit', 'tsserver', 'yamlls' }
for _, lsp in ipairs(servers) do for _, lsp in ipairs(servers) do
nvim_lsp[lsp].setup { on_attach = on_attach } nvim_lsp[lsp].setup { on_attach = on_attach }
end end
@ -471,7 +510,7 @@ _G.load_config = function()
}, },
}, },
} }
require('lspconfig').sumneko_lua.setup(luadev) nvim_lsp.sumneko_lua.setup(luadev)
-- metals -- metals
vim.g.metals_server_version = '0.11.8' vim.g.metals_server_version = '0.11.8'