2023-10-21 06:59:41 +02:00
|
|
|
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
|
|
|
|
if not vim.loop.fs_stat(lazypath) then
|
|
|
|
vim.fn.system({
|
|
|
|
'git',
|
|
|
|
'clone',
|
|
|
|
'--filter=blob:none',
|
|
|
|
'https://github.com/folke/lazy.nvim.git',
|
|
|
|
'--branch=stable', -- latest stable release
|
|
|
|
lazypath,
|
|
|
|
})
|
2021-12-14 07:32:00 +01:00
|
|
|
end
|
2023-10-21 06:59:41 +02:00
|
|
|
vim.opt.rtp:prepend(lazypath)
|
2021-12-14 07:32:00 +01:00
|
|
|
|
2023-10-21 06:59:41 +02:00
|
|
|
require('lazy').setup({
|
|
|
|
{
|
|
|
|
'nvim-treesitter/nvim-treesitter',
|
|
|
|
build = ':TSUpdate',
|
2023-06-14 23:50:14 +02:00
|
|
|
config = function()
|
2023-10-21 06:59:41 +02:00
|
|
|
local configs = require('nvim-treesitter.configs')
|
|
|
|
configs.setup {
|
2023-06-14 23:50:14 +02:00
|
|
|
ensure_installed = {
|
|
|
|
'c',
|
|
|
|
'lua',
|
|
|
|
'vim',
|
|
|
|
'vimdoc',
|
|
|
|
'query',
|
|
|
|
'bash',
|
|
|
|
'comment',
|
|
|
|
'cpp',
|
|
|
|
'diff',
|
|
|
|
'git_config',
|
|
|
|
'git_rebase',
|
|
|
|
'gitattributes',
|
|
|
|
'gitcommit',
|
|
|
|
'gitignore',
|
|
|
|
'json',
|
|
|
|
'jsonc',
|
|
|
|
'latex',
|
|
|
|
'make',
|
|
|
|
'python',
|
|
|
|
'regex',
|
|
|
|
'rust',
|
|
|
|
'toml',
|
|
|
|
},
|
|
|
|
auto_install = true,
|
|
|
|
highlight = { enable = true },
|
|
|
|
indent = { enable = true },
|
|
|
|
incremental_selection = { enable = true }
|
|
|
|
}
|
|
|
|
end,
|
2023-10-21 06:59:41 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'williamboman/mason.nvim',
|
|
|
|
opts = {
|
|
|
|
ui = {
|
|
|
|
icons = {
|
|
|
|
package_installed = "✓",
|
|
|
|
package_pending = "➜",
|
|
|
|
package_uninstalled = "✗"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"williamboman/mason-lspconfig.nvim",
|
|
|
|
config = function()
|
|
|
|
require("mason-lspconfig").setup({
|
|
|
|
ensure_installed = {
|
|
|
|
'lua_ls',
|
|
|
|
'rust_analyzer',
|
|
|
|
'bashls',
|
|
|
|
'pylsp', -- run PylspInstall pylsp-rope python-lsp-black python-lsp-ruff
|
|
|
|
'pyright',
|
|
|
|
'texlab',
|
|
|
|
'clangd',
|
|
|
|
},
|
|
|
|
automatic_installation = true
|
|
|
|
})
|
|
|
|
end
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"neovim/nvim-lspconfig",
|
|
|
|
config = function()
|
|
|
|
require('LSPconfig')
|
|
|
|
end
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'simrat39/rust-tools.nvim',
|
|
|
|
-- config = function()
|
|
|
|
-- require('rust-tools-setup')
|
|
|
|
-- end
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'hrsh7th/nvim-cmp',
|
|
|
|
config = function()
|
|
|
|
require('rust-tools-setup')
|
|
|
|
end,
|
|
|
|
dependencies = {
|
2022-01-22 01:35:32 +01:00
|
|
|
'neovim/nvim-lspconfig',
|
|
|
|
'hrsh7th/cmp-nvim-lsp',
|
|
|
|
'saadparwaiz1/cmp_luasnip',
|
2022-04-21 21:51:01 +02:00
|
|
|
'hrsh7th/cmp-buffer',
|
|
|
|
'hrsh7th/cmp-path',
|
|
|
|
'hrsh7th/cmp-cmdline',
|
|
|
|
'L3MON4D3/LuaSnip',
|
|
|
|
'f3fora/cmp-spell',
|
|
|
|
'dmitmel/cmp-digraphs',
|
|
|
|
'hrsh7th/cmp-nvim-lsp-signature-help',
|
|
|
|
'kdheepak/cmp-latex-symbols',
|
|
|
|
'hrsh7th/cmp-emoji',
|
|
|
|
'ray-x/cmp-treesitter',
|
|
|
|
'uga-rosa/cmp-dictionary',
|
2023-10-21 06:59:41 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'L3MON4D3/LuaSnip',
|
|
|
|
dependencies = {
|
2022-02-07 20:47:57 +01:00
|
|
|
'rafamadriz/friendly-snippets'
|
|
|
|
},
|
2023-06-14 23:50:14 +02:00
|
|
|
config = function()
|
2022-02-07 20:47:57 +01:00
|
|
|
require("luasnip.loaders.from_snipmate").load()
|
|
|
|
require("luasnip.loaders.from_vscode").load()
|
|
|
|
end
|
2023-10-21 06:59:41 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'nvim-telescope/telescope.nvim',
|
|
|
|
config = true,
|
|
|
|
dependencies = {
|
2023-06-14 23:50:14 +02:00
|
|
|
{ 'nvim-lua/popup.nvim' },
|
|
|
|
{ 'nvim-treesitter/nvim-treesitter' },
|
|
|
|
{ 'nvim-telescope/telescope-symbols.nvim' },
|
|
|
|
{ 'nvim-telescope/telescope-file-browser.nvim' },
|
2023-10-21 06:59:41 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2023-08-03 23:08:06 +02:00
|
|
|
"folke/todo-comments.nvim",
|
2023-10-21 06:59:41 +02:00
|
|
|
dependencies = { "nvim-lua/plenary.nvim" },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'kyazdani42/nvim-tree.lua',
|
|
|
|
config = true,
|
|
|
|
dependencies = {
|
2023-06-14 23:50:14 +02:00
|
|
|
'kyazdani42/nvim-web-devicons', -- optional, for file icon
|
2022-01-22 01:35:32 +01:00
|
|
|
},
|
2023-10-21 06:59:41 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'folke/which-key.nvim',
|
2023-09-07 18:10:29 +02:00
|
|
|
config = function()
|
|
|
|
vim.o.timeout = true
|
|
|
|
vim.o.timeoutlen = 300
|
|
|
|
-- default kemaps that whitch-key misses.
|
|
|
|
local wk = require("which-key")
|
|
|
|
wk.register {
|
|
|
|
g = {
|
|
|
|
t = "next tab",
|
|
|
|
T = "previous tab"
|
|
|
|
},
|
|
|
|
}
|
|
|
|
require("which-key").setup {
|
|
|
|
-- your configuration comes here
|
|
|
|
-- or leave it empty to use the default settings
|
|
|
|
-- refer to the configuration section below
|
|
|
|
-- local wk = require("which-key")
|
|
|
|
}
|
|
|
|
end
|
2023-10-21 06:59:41 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"akinsho/toggleterm.nvim",
|
|
|
|
opts = {
|
2023-09-07 18:10:29 +02:00
|
|
|
insert_mappings = false,
|
2023-09-13 01:28:53 +02:00
|
|
|
terminal_mappings = false,
|
2023-09-07 18:10:29 +02:00
|
|
|
open_mapping = [[<c-\>]],
|
|
|
|
}
|
2023-10-21 06:59:41 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'simrat39/symbols-outline.nvim',
|
|
|
|
opts = {
|
|
|
|
highlight_hovered_item = true,
|
|
|
|
show_guides = true,
|
|
|
|
auto_preview = false,
|
|
|
|
position = 'right',
|
|
|
|
relative_width = true,
|
|
|
|
width = 30,
|
|
|
|
auto_close = false,
|
|
|
|
show_numbers = false,
|
|
|
|
show_relative_numbers = false,
|
|
|
|
show_symbol_details = true,
|
|
|
|
preview_bg_highlight = 'Pmenu',
|
|
|
|
autofold_depth = nil,
|
|
|
|
auto_unfold_hover = true,
|
|
|
|
fold_markers = { '', '' },
|
|
|
|
wrap = false,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'stevearc/dressing.nvim',
|
|
|
|
config = true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'nvim-lualine/lualine.nvim',
|
|
|
|
dependencies = { 'kyazdani42/nvim-web-devicons' },
|
|
|
|
opts = {
|
|
|
|
options = {
|
|
|
|
icons_enabled = true,
|
|
|
|
theme = 'auto',
|
|
|
|
component_separators = { left = '', right = '' },
|
|
|
|
section_separators = { left = '', right = '' },
|
|
|
|
disabled_filetypes = {},
|
|
|
|
always_divide_middle = true,
|
|
|
|
},
|
|
|
|
sections = {
|
|
|
|
lualine_a = { 'mode' },
|
|
|
|
lualine_b = { 'branch', 'diff', 'diagnostics' },
|
|
|
|
lualine_c = { 'filename' },
|
|
|
|
lualine_x = { 'encoding', 'fileformat', 'filetype' },
|
|
|
|
lualine_y = { 'progress' },
|
|
|
|
lualine_z = { 'location' }
|
|
|
|
},
|
|
|
|
inactive_sections = {
|
|
|
|
lualine_a = {},
|
|
|
|
lualine_b = {},
|
|
|
|
lualine_c = { 'filename' },
|
|
|
|
lualine_x = { 'location' },
|
|
|
|
lualine_y = {},
|
|
|
|
lualine_z = {}
|
|
|
|
},
|
|
|
|
extensions = {}
|
|
|
|
},
|
2023-06-14 23:50:14 +02:00
|
|
|
|
2023-10-21 06:59:41 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'kdheepak/tabline.nvim',
|
|
|
|
dependencies = { 'nvim-lualine/lualine.nvim' },
|
2023-06-14 23:50:14 +02:00
|
|
|
config = function()
|
|
|
|
require 'tabline'.setup {
|
|
|
|
-- Defaults configuration options
|
|
|
|
enable = true,
|
|
|
|
options = {
|
|
|
|
-- If lualine is installed tabline will use separators configured in lualine by default.
|
|
|
|
-- These options can be used to override those settings.
|
|
|
|
-- section_separators = {'', ''},
|
|
|
|
-- component_separators = {'', ''},
|
|
|
|
-- max_bufferline_percent = 66, -- set to nil by default, and it uses vim.o.columns * 2/3
|
|
|
|
show_tabs_always = false, -- this shows tabs only when there are more than one tab or if the first tab is named
|
|
|
|
show_devicons = true, -- this shows devicons in buffer section
|
|
|
|
show_bufnr = true, -- this appends [bufnr] to buffer section,
|
|
|
|
show_filename_only = false, -- shows base filename only instead of relative path in filename
|
|
|
|
}
|
|
|
|
}
|
|
|
|
vim.cmd [[
|
2023-04-20 21:19:47 +02:00
|
|
|
set guioptions-=e " Use showtabline in gui vim
|
|
|
|
set sessionoptions+=tabpages,globals " store tabpages and globals in session
|
|
|
|
]]
|
2023-06-14 23:50:14 +02:00
|
|
|
end,
|
2023-10-21 06:59:41 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'romgrk/nvim-treesitter-context',
|
|
|
|
dependencies = { 'nvim-treesitter/nvim-treesitter' },
|
|
|
|
opts = {
|
|
|
|
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
|
|
|
|
max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
|
|
|
|
trim_scope = 'outer', -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
|
|
|
|
min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit.
|
|
|
|
zindex = 200, -- The Z-index of the context window
|
|
|
|
mode = 'cursor', -- Line used to calculate context. Choices: 'cursor', 'topline'
|
|
|
|
-- Separator between context and content. Should be a single character string, like '-'.
|
|
|
|
-- When separator is set, the context will only show up when there are at least 2 lines above cursorline.
|
|
|
|
separator = nil,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"lukas-reineke/indent-blankline.nvim",
|
|
|
|
main = "ibl",
|
|
|
|
opts = {}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'lewis6991/gitsigns.nvim',
|
|
|
|
config = true,
|
|
|
|
},
|
|
|
|
'chentau/marks.nvim',
|
|
|
|
'sitiom/nvim-numbertoggle',
|
|
|
|
{
|
|
|
|
'numToStr/Comment.nvim',
|
|
|
|
config = true,
|
|
|
|
},
|
|
|
|
-- {
|
|
|
|
-- "tversteeg/registers.nvim",
|
|
|
|
-- config = true,
|
|
|
|
-- },
|
|
|
|
{
|
|
|
|
'Wansmer/treesj',
|
|
|
|
dependencies = { 'nvim-treesitter' },
|
|
|
|
opts = {
|
|
|
|
-- Use default keymaps
|
|
|
|
-- (<space>m - toggle, <space>j - join, <space>s - split)
|
|
|
|
use_default_keymaps = false,
|
|
|
|
max_join_length = 256,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"jbyuki/venn.nvim",
|
2022-01-22 01:35:32 +01:00
|
|
|
|
2023-10-21 06:59:41 +02:00
|
|
|
--colorscheme
|
|
|
|
{
|
|
|
|
'bluz71/vim-moonfly-colors',
|
|
|
|
lazy = true,
|
|
|
|
},
|
2021-12-14 07:32:00 +01:00
|
|
|
|
2023-10-21 06:59:41 +02:00
|
|
|
{
|
|
|
|
'bluz71/vim-nightfly-guicolors',
|
|
|
|
lazy = true,
|
|
|
|
},
|
2021-12-14 07:32:00 +01:00
|
|
|
|
2023-10-21 06:59:41 +02:00
|
|
|
})
|