Merge branch 'master' into laptop

This commit is contained in:
Thomas Avé 2024-02-26 23:27:10 +01:00
commit 73a4526637
6 changed files with 31 additions and 9 deletions

View File

@ -4,7 +4,5 @@ require('mappings')
require('teaching')
vim.api.nvim_create_autocmd("FileType", { pattern = "make", command = [[set tabstop=8 shiftwidth=8 softtabstop=0 noexpandtab]] })
vim.api.nvim_create_autocmd("FileType", { pattern = "vimwiki", command = [[setlocal shiftwidth=2 softtabstop=2 expandtab]] })
vim.api.nvim_create_autocmd("FileType", { pattern = "vimwiki", command = [[setlocal filetype=markdown]] })
vim.api.nvim_create_autocmd("FileType", { pattern = "javascript", command = [[setlocal shiftwidth=2 softtabstop=2 expandtab]] })
vim.api.nvim_create_autocmd("FileType", { pattern = "vue", command = [[setlocal shiftwidth=2 softtabstop=2 expandtab]] })

View File

@ -11,6 +11,6 @@ return {
'neovim/nvim-lspconfig'
},
opts = {
ensure_installed = { "pyright", "texlab", "clangd", "bashls", "cmake", "jsonls", "tsserver", "vuels", "dockerls", "vimls", "html", "yamlls", "cssls", "lua_ls", "ltex", "gopls", "rust_analyzer", "jdtls", "emmet_ls", "ruff_lsp", "csharp_ls" },
ensure_installed = { "pyright", "texlab", "clangd", "bashls", "cmake", "jsonls", "tsserver", "vuels", "dockerls", "vimls", "html", "yamlls", "cssls", "lua_ls", "ltex", "gopls", "rust_analyzer", "jdtls", "emmet_ls", "ruff_lsp", "csharp_ls", "typst_lsp" },
}
}

View File

@ -151,6 +151,10 @@ return {
capabilities = capabilities
}
require('lspconfig').typst_lsp.setup {
capabilities = capabilities
}
require('lspconfig').cmake.setup {
capabilities = capabilities
}
@ -256,10 +260,11 @@ return {
end,
settings = {
ltex = {
enabled = true,
enabled = { "bibtex", "gitcommit", "markdown", "org", "tex", "restructuredtext", "rsweave", "latex", "quarto", "rmd", "context", "html", "xhtml", "typst" },
language = "en-GB"
}
}
},
},
filetypes = { "bib", "gitcommit", "markdown", "org", "plaintex", "rst", "rnoweb", "tex", "pandoc", "quarto", "rmd", "context", "html", "xhtml" , "typst"}
}
vim.diagnostic.config({

View File

@ -1,6 +1,9 @@
return {
'nvim-treesitter/nvim-treesitter',
dependencies = {"luckasRanarison/tree-sitter-hyprlang"},
dependencies = {
"https://github.com/TheZoq2/tree-sitter-typst",
"luckasRanarison/tree-sitter-hyprlang"
},
build = ":TSUpdate",
opts = {
ensure_installed = { "cpp", "c", "lua", "vim", "dockerfile", "python", "java", "cmake", "diff", "gitcommit", "html", "css", "javascript", "json", "rust", "sql", "yaml", "markdown", "markdown_inline" },
@ -25,8 +28,17 @@ return {
},
config = function (_, opts)
require("nvim-treesitter.configs").setup(opts)
local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
require'nvim-treesitter.install'.prefer_git = true
parser_config.typst = {
install_info = {
url = "https://github.com/frozolotl/tree-sitter-typst.git", -- local path or git repo
files = {"src/parser.c", "src/scanner.cc"},
},
filetype = "typst", -- if filetype does not match the parser name
}
vim.filetype.add({
pattern = { [".*/hyprland%.conf"] = "hyprlang" },
pattern = { [".*.typ"] = "typst" },
})
end
}

View File

@ -4,3 +4,5 @@ OpenSwarm
Lumentis
stochasticity
Feywild
ECML
theshold-based

View File

@ -90,7 +90,12 @@ function zvm_after_init() {
# Use FZY instead of FZF for ctrl-t
function find_files() {
zle -I
# Check if ~/Containers exists
if [ -d ~/Containers ]; then
BUFFER=cd "$(fd -H . ~/Workspace ~/Containers -t d | fzy -l 20)"
else
BUFFER=cd "$(fd -H . ~/Workspace -t d | fzy -l 20)"
fi
zle accept-line
clear
}