Refactor config

This commit is contained in:
Maciej Jur 2023-07-11 22:41:32 +02:00
parent 1d9519f146
commit d4617e8187
No known key found for this signature in database
GPG key ID: ADA3BF323198C639
4 changed files with 58 additions and 70 deletions

View file

@ -1,5 +0,0 @@
return function()
local config = require("lualine")
config.setup({})
end

View file

@ -1,8 +0,0 @@
return function()
local configs = require("presence").setup({
main_image = "file",
buttons = false,
show_time = false,
})
end

View file

@ -1,31 +0,0 @@
return function()
local configs = require("nvim-treesitter.configs");
configs.setup({
ensure_installed = {
-- nvim
"vim", "vimdoc", "lua",
-- shell
"bash", -- "nu",
-- rust
"rust", "toml",
-- python
"python",
-- webdev
"html", "css", "scss", "typescript", "tsx", "astro",
-- markdown
"markdown",
-- nix
"nix",
-- haskell
"haskell",
-- latex
"latex", "bibtex",
-- misc
"gitignore", "yaml", "regex",
},
sync_install = false,
highlight = { enable = true },
indent = { enable = true },
})
end

View file

@ -2,53 +2,74 @@ return {
-- Telescope
{
"nvim-telescope/telescope.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
dependencies = {
"nvim-lua/plenary.nvim",
},
},
-- Treesitter
{
"nvim-treesitter/nvim-treesitter",
config = require "configs/treesitter",
config = function()
local configs = require("nvim-treesitter.configs");
configs.setup({
ensure_installed = {
-- nvim
"vim", "vimdoc", "lua",
-- shell
"bash", "fish", -- "nu",
-- rust
"rust", "toml",
-- python
"python",
-- webdev
"html", "css", "scss", "javascript", "jsdoc", "typescript", "tsx", "astro", "svelte", "vue",
-- markdown
"markdown", "markdown_inline",
-- nix
"nix",
-- haskell
"haskell",
-- latex
"latex", "bibtex",
-- misc
"gitignore", "diff", "dockerfile", "json", "yaml", "regex",
},
sync_install = false,
highlight = { enable = true },
indent = { enable = true },
})
end,
build = ":TSUpdate",
init = function()
vim.treesitter.language.register("markdown", "mdx")
end
end,
},
-- LSP Configs
{
"neovim/nvim-lspconfig",
config = require "configs/lspconfig",
dependencies = {
"hrsh7th/cmp-nvim-lsp"
},
},
-- Snippet engine
{
"L3MON4D3/LuaSnip",
},
{
"saadparwaiz1/cmp_luasnip",
dependencies = {
"L3MON4D3/LuaSnip",
}
},
-- Completion
{
"hrsh7th/cmp-nvim-lsp",
},
{
"hrsh7th/cmp-buffer",
},
{
"hrsh7th/cmp-path",
},
{
"hrsh7th/cmp-cmdline",
},
{
"hrsh7th/nvim-cmp",
config = require "configs/cmp",
dependencies = {
"L3MON4D3/LuaSnip",
"hrsh7th/cmp-cmdline",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"saadparwaiz1/cmp_luasnip",
},
},
{
"hrsh7th/cmp-nvim-lsp",
},
-- Rust tools
{
"simrat39/rust-tools.nvim",
@ -66,20 +87,31 @@ return {
-- Discord presence
{
"andweeb/presence.nvim",
config = require "configs/presence",
config = function()
local configs = require("presence").setup({
main_image = "file",
buttons = false,
show_time = false,
})
end,
},
-- Status line
{
"nvim-lualine/lualine.nvim",
config = require "configs/lualine",
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
local config = require("lualine")
config.setup({})
end,
dependencies = {
"nvim-tree/nvim-web-devicons",
},
},
-- Editor theme
{
"rebelot/kanagawa.nvim",
init = function()
vim.cmd("colorscheme kanagawa")
end
end,
}
}