dotfiles/nvim/lua/plugins.lua

252 lines
5.5 KiB
Lua
Raw Normal View History

2023-07-10 13:46:48 +02:00
return {
2023-07-22 13:52:10 +02:00
-- Editor theme
{
"rebelot/kanagawa.nvim",
lazy = false,
priority = 1000,
config = function()
vim.cmd("colorscheme kanagawa")
end,
},
-- Status line
{
"nvim-lualine/lualine.nvim",
dependencies = {
"nvim-tree/nvim-web-devicons",
},
config = function()
local lualine = require("lualine")
lualine.setup()
end,
},
2023-07-10 22:33:59 +02:00
-- Telescope
2023-07-10 13:46:48 +02:00
{
"nvim-telescope/telescope.nvim",
2023-07-22 13:52:10 +02:00
branch = "0.1.x",
2023-07-11 22:41:32 +02:00
dependencies = {
"nvim-lua/plenary.nvim",
},
2023-07-22 13:52:10 +02:00
config = function()
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
end,
},
-- Discord presence
{
"andweeb/presence.nvim",
config = function()
local presence = require("presence")
presence.setup({
main_image = "file",
buttons = false,
show_time = false,
})
end,
2023-07-10 13:46:48 +02:00
},
2023-07-22 13:52:10 +02:00
2023-07-10 22:33:59 +02:00
-- Treesitter
2023-07-10 15:18:34 +02:00
{
"nvim-treesitter/nvim-treesitter",
2023-07-22 13:52:10 +02:00
build = ":TSUpdate",
2023-07-11 22:41:32 +02:00
config = function()
local configs = require("nvim-treesitter.configs");
configs.setup({
2023-07-22 13:52:10 +02:00
sync_install = false,
2023-07-11 22:41:32 +02:00
ensure_installed = {
-- nvim
"vim", "vimdoc", "lua",
2023-07-22 13:52:10 +02:00
-- misc
"comment", "gitignore", "diff", "dockerfile", "json", "yaml", "toml", "regex",
2023-07-11 22:41:32 +02:00
-- shell
2023-07-22 13:52:10 +02:00
"bash", -- "fish", "nu",
-- markdown
"markdown", "markdown_inline",
2023-07-11 22:41:32 +02:00
-- python
"python",
2023-07-22 13:52:10 +02:00
-- rust
"rust", "toml",
2023-07-11 22:41:32 +02:00
-- webdev
"html", "css", "scss", "javascript", "jsdoc", "typescript", "tsx", "astro", "svelte", "vue",
-- haskell
"haskell",
2023-07-22 13:52:10 +02:00
-- nix
"nix",
2023-07-12 19:15:14 +02:00
-- literate
"latex", "bibtex", -- "typst",
2023-07-11 22:41:32 +02:00
},
2023-07-22 13:52:10 +02:00
highlight = {
enable = true,
},
indent = {
enable = true,
},
2023-07-11 22:41:32 +02:00
})
end,
2023-07-10 15:18:34 +02:00
init = function()
vim.treesitter.language.register("markdown", "mdx")
2023-07-11 22:41:32 +02:00
end,
2023-07-10 15:18:34 +02:00
},
2023-07-22 13:52:10 +02:00
-- LS configs
2023-07-10 13:46:48 +02:00
{
"neovim/nvim-lspconfig",
2023-07-22 13:52:10 +02:00
-- TODO: config here
-- https://github.com/neovim/nvim-lspconfig#suggested-configuration
2023-07-10 22:33:59 +02:00
},
2023-07-22 13:52:10 +02:00
2023-07-10 22:33:59 +02:00
-- Snippet engine
{
"saadparwaiz1/cmp_luasnip",
2023-07-11 22:41:32 +02:00
dependencies = {
"L3MON4D3/LuaSnip",
}
2023-07-10 22:33:59 +02:00
},
-- Completion
{
"hrsh7th/nvim-cmp",
config = require "configs/cmp",
dependencies = {
2023-07-11 22:41:32 +02:00
"hrsh7th/cmp-cmdline",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
2023-07-10 22:33:59 +02:00
"saadparwaiz1/cmp_luasnip",
},
2023-07-10 13:46:48 +02:00
},
2023-07-11 22:41:32 +02:00
{
"hrsh7th/cmp-nvim-lsp",
},
2023-07-11 23:48:37 +02:00
-- DAP
{
"mfussenegger/nvim-dap",
config = function()
local dap = require "dap"
vim.keymap.set('n', "<leader>b", dap.toggle_breakpoint)
end,
},
{
"rcarriga/nvim-dap-ui",
config = require "configs/debugging",
dependencies = {
"mfussenegger/nvim-dap",
},
},
-- Mason
{
"williamboman/mason.nvim",
config = function()
require("mason").setup()
end,
},
{
"williamboman/mason-lspconfig.nvim",
config = function()
2023-07-12 19:15:14 +02:00
local mason = require "mason-lspconfig"
mason.setup({
2023-07-11 23:48:37 +02:00
automatic_installation = true,
ensure_installed = {
2023-07-12 19:15:14 +02:00
"lua_ls", -- Lua
2023-07-12 00:34:27 +02:00
"rust_analyzer", -- Rust
2023-07-21 01:07:59 +02:00
-- "hls", -- use GHCup instead
2023-07-12 19:15:14 +02:00
"html", -- HTML
"cssls", -- CSS / SCSS
2023-07-12 00:34:27 +02:00
"tsserver", -- TypeScript
"astro", -- Astro
"svelte", -- Svelte
2023-07-12 19:15:14 +02:00
"pyright", -- Python
"typst_lsp", -- Typst
2023-07-12 19:49:49 +02:00
"rnix", -- Nix
2023-07-11 23:48:37 +02:00
},
})
2023-07-12 19:15:14 +02:00
local lsp = require "lspconfig"
local capabilities = require("cmp_nvim_lsp").default_capabilities()
mason.setup_handlers({
function(server)
lsp[server].setup({
single_file_support = true,
capabilities = capabilities,
})
end,
["lua_ls"] = function()
lsp.lua_ls.setup({
single_file_support = true,
capabilities = capabilities,
settings = {
Lua = { diagnostics = { globals = { "vim" } } }
},
})
end,
})
2023-07-11 23:48:37 +02:00
end,
dependencies = {
"williamboman/mason.nvim",
"neovim/nvim-lspconfig",
},
},
{
"jay-babu/mason-nvim-dap.nvim",
config = function()
require("mason-nvim-dap").setup({
automatic_installation = true,
ensure_installed = {
2023-07-12 01:00:44 +02:00
"codelldb", -- Rust
2023-07-11 23:48:37 +02:00
},
})
end,
dependencies = {
"mfussenegger/nvim-dap",
"williamboman/mason.nvim",
},
},
2023-07-10 22:33:59 +02:00
-- Rust tools
2023-07-10 14:30:11 +02:00
{
"simrat39/rust-tools.nvim",
config = require "configs/rust-tools",
},
2023-07-10 22:33:59 +02:00
-- Haskell tools
2023-07-10 13:46:48 +02:00
{
2023-07-10 15:18:34 +02:00
"mrcjkb/haskell-tools.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
},
branch = "1.x.x",
2023-07-10 13:46:48 +02:00
},
2023-07-12 19:15:14 +02:00
-- Typst
{
"kaarmu/typst.vim",
ft = "typst",
},
2023-07-12 01:00:44 +02:00
-- File tree
{
"nvim-neo-tree/neo-tree.nvim",
2023-07-21 14:02:50 +02:00
branch = "v3.x",
2023-07-12 01:00:44 +02:00
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim",
},
},
2023-07-12 19:49:49 +02:00
-- Git
2023-07-12 01:00:44 +02:00
{
"sindrets/diffview.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
},
},
2023-07-12 19:49:49 +02:00
{
"lewis6991/gitsigns.nvim",
config = function()
require("gitsigns").setup()
end,
},
2023-07-10 13:46:48 +02:00
}