Updated vim config

This commit is contained in:
2023-08-12 19:13:43 +02:00
parent aeb428bd54
commit 5163ae312d

View File

@@ -11,7 +11,7 @@ an executable
-- general
lvim.log.level = "warn"
lvim.format_on_save = false
lvim.colorscheme = "onedarker"
lvim.colorscheme = "onedark"
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4
@@ -60,6 +60,8 @@ lvim.builtin.which_key.mappings["t"] = {
w = { "<cmd>Trouble workspace_diagnostics<cr>", "Workspace Diagnostics" },
}
lvim.builtin.which_key.mappings["g"].g = {"<cmd>TermExec cmd='gitui&&exit'<CR>", "Gitui"}
-- TODO: User Config for predefined plugins
-- After changing plugin config exit and reopen LunarVim, Run :PackerInstall :PackerCompile
lvim.builtin.alpha.active = true
@@ -168,6 +170,7 @@ lvim.builtin.treesitter.highlight.enabled = true
-- Additional Plugins
lvim.plugins = {
{ "navarasu/onedark.nvim" },
{ "folke/tokyonight.nvim" },
{
"folke/trouble.nvim",
@@ -181,19 +184,26 @@ lvim.plugins = {
},
-- Markdonw
{
"ellisonleao/glow.nvim",
ft = { "markdown" },
cmd = "GlowInstall",
"iamcco/markdown-preview.nvim",
build = function() vim.fn["mkdp#util#install"]() end,
}, -- :Rust
{
'saecki/crates.nvim',
-- ft = {"toml"},
config = function(_, opts)
local crates = require('crates')
crates.setup({
null_ls = {
enabled = true,
name = "crates.nvim",
},
})
require('cmp').setup.buffer({
sources = { { name = "crates" } }
})
crates.show()
end,
},
-- :Rust
-- {
-- 'saecki/crates.nvim',
-- event = { "BufRead Cargo.toml" },
-- requires = { { 'nvim-lua/plenary.nvim' } },
-- config = function()
-- require('crates').setup()
-- end,
-- },
{
"simrat39/rust-tools.nvim",
-- ft = { "rust", "rs" }, -- IMPORTANT: re-enabling this seems to break inlay-hints
@@ -242,10 +252,53 @@ lvim.plugins = {
}
end,
},
{"slint-ui/vim-slint"},
-- Java
{
'hdiniz/vim-gradle'
},
-- Deno
{'sigmasd/deno-nvim'}
}
local nvim_lsp = require("lspconfig")
nvim_lsp.denols.setup {
on_attach = on_attach,
root_dir = nvim_lsp.util.root_pattern("deno.jsonc","deno.json"),
init_options = {
lint = true,
},
}
nvim_lsp.tsserver.setup {
on_attach = on_attach,
root_dir = nvim_lsp.util.root_pattern("package.json"),
single_file_support = false
}
require("deno-nvim").setup({
server = {
on_attach = ...,
capabilites = ...
},
-- if you're using dap to debug (see the README for more info)
dap = {
adapter = ...
}
})
require('onedark').setup {
style = 'darker', -- Default theme style. Choose between 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' and 'light'
toggle_style_key = "<leader>ss";
transparent = false, -- Show/hide background
code_style = {
comments = 'italic',
keywords = 'italic,',
functions = 'bold',
strings = 'none',
variables = 'none'
},
}
-- Autocommands (https://neovim.io/doc/user/autocmd.html)