Options and plugins: - enabled spell checker with languages de and en - RPN calculator added to cmp - Added python to lsps - fzf workspaces now always sorted by name Key bindings: - table mode added, use <leader>t and submap - File manager moved to <leader>T - Spell suggestion z= uses fzf - LSP code actions <space>ca moved to <space>c and fzf
229 lines
6.8 KiB
Lua
229 lines
6.8 KiB
Lua
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
|
if not (vim.uv or 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,
|
|
})
|
|
end
|
|
vim.opt.rtp:prepend(lazypath)
|
|
|
|
require("lazy").setup({
|
|
-- Vscode-like pictograms
|
|
{
|
|
"onsails/lspkind.nvim",
|
|
event = { "VimEnter" },
|
|
},
|
|
|
|
-- Auto-completion engine
|
|
{
|
|
"hrsh7th/nvim-cmp",
|
|
dependencies = {
|
|
"lspkind.nvim",
|
|
"hrsh7th/cmp-nvim-lsp", -- lsp auto-completion
|
|
"hrsh7th/cmp-buffer", -- buffer auto-completion
|
|
"hrsh7th/cmp-path", -- path auto-completion
|
|
"hrsh7th/cmp-cmdline", -- cmdline auto-completion
|
|
},
|
|
config = function()
|
|
require("config.nvim-cmp")
|
|
end,
|
|
},
|
|
|
|
-- Code snippet engine
|
|
{
|
|
"L3MON4D3/LuaSnip",
|
|
version = "v2.*",
|
|
},
|
|
|
|
-- LSP manager
|
|
"williamboman/mason.nvim",
|
|
"williamboman/mason-lspconfig.nvim",
|
|
"neovim/nvim-lspconfig",
|
|
|
|
-- neogit setup
|
|
{
|
|
"NeogitOrg/neogit",
|
|
dependencies = {
|
|
"nvim-lua/plenary.nvim", -- required
|
|
"sindrets/diffview.nvim", -- optional - Diff integration
|
|
|
|
-- Only one of these is needed, not both.
|
|
-- "nvim-telescope/telescope.nvim", -- optional
|
|
"ibhagwan/fzf-lua", -- optional
|
|
},
|
|
config = true
|
|
},
|
|
|
|
-- org-mode
|
|
{
|
|
'nvim-orgmode/orgmode',
|
|
event = 'VeryLazy',
|
|
ft = { 'org' },
|
|
config = function()
|
|
-- Setup orgmode
|
|
require('orgmode').setup({
|
|
org_agenda_files = '~/orgfiles/**/*',
|
|
org_default_notes_file = '~/orgfiles/refile.org',
|
|
})
|
|
|
|
-- NOTE: If you are using nvim-treesitter with ~ensure_installed = "all"~ option
|
|
-- add ~org~ to ignore_install
|
|
-- require('nvim-treesitter.configs').setup({
|
|
-- ensure_installed = 'all',
|
|
-- ignore_install = { 'org' },
|
|
-- })
|
|
end,
|
|
},
|
|
|
|
-- fzf-lua
|
|
{
|
|
"ibhagwan/fzf-lua",
|
|
-- optional for icon support
|
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
|
config = function()
|
|
-- calling `setup` is optional for customization
|
|
require("fzf-lua").setup({})
|
|
end
|
|
},
|
|
|
|
-- whichkey
|
|
{
|
|
"folke/which-key.nvim",
|
|
event = "VeryLazy",
|
|
opts = {
|
|
-- your configuration comes here
|
|
-- or leave it empty to use the default settings
|
|
-- refer to the configuration section below
|
|
preset = 'helix',
|
|
expand = 4,
|
|
keys = {
|
|
scroll_down = "<c-d>", -- binding to scroll down inside the popup
|
|
scroll_up = "<c-u>", -- binding to scroll up inside the popup
|
|
},
|
|
},
|
|
keys = {
|
|
{
|
|
"<leader>?",
|
|
function()
|
|
require("which-key").show({ global = false })
|
|
end,
|
|
desc = "Buffer Local Keymaps (which-key)",
|
|
},
|
|
},
|
|
},
|
|
|
|
-- treesitter
|
|
{
|
|
"nvim-treesitter/nvim-treesitter",
|
|
build = ":TSUpdate",
|
|
config = function()
|
|
local configs = require("nvim-treesitter.configs")
|
|
|
|
configs.setup({
|
|
ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "elixir", "heex", "javascript", "html", "diff", "go", "rust", "python" },
|
|
sync_install = false,
|
|
highlight = { enable = true },
|
|
indent = { enable = true },
|
|
})
|
|
end
|
|
},
|
|
|
|
-- lualine statusline plugin
|
|
{
|
|
'nvim-lualine/lualine.nvim',
|
|
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
|
config = function()
|
|
require("lualine").setup {
|
|
options = {
|
|
icons_enabled = false,
|
|
theme = 'papercolor_light',
|
|
component_separators = {},
|
|
section_separators = {},
|
|
disabled_filetypes = {
|
|
statusline = {},
|
|
winbar = {},
|
|
},
|
|
ignore_focus = {},
|
|
always_divide_middle = true,
|
|
globalstatus = false,
|
|
refresh = {
|
|
statusline = 1000,
|
|
tabline = 1000,
|
|
winbar = 1000,
|
|
}
|
|
},
|
|
sections = {
|
|
lualine_a = { 'filename' },
|
|
lualine_b = { 'branch', 'diff', 'diagnostics' },
|
|
lualine_c = {},
|
|
lualine_x = { 'encoding', 'fileformat', 'filetype' },
|
|
lualine_y = { 'filesize' },
|
|
lualine_z = { 'progress', 'location' }
|
|
},
|
|
inactive_sections = {
|
|
lualine_a = {},
|
|
lualine_b = {},
|
|
lualine_c = { 'filename' },
|
|
lualine_x = { 'location' },
|
|
lualine_y = {},
|
|
lualine_z = {}
|
|
},
|
|
tabline = {},
|
|
winbar = {},
|
|
inactive_winbar = {},
|
|
extensions = {}
|
|
}
|
|
end
|
|
|
|
},
|
|
|
|
-- neo-tree file management
|
|
{
|
|
"nvim-neo-tree/neo-tree.nvim",
|
|
branch = "v3.x",
|
|
dependencies = {
|
|
"nvim-lua/plenary.nvim",
|
|
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
|
"MunifTanjim/nui.nvim",
|
|
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
|
|
}
|
|
},
|
|
|
|
-- workspaces, lightweight "projects"
|
|
{
|
|
"natecraddock/workspaces.nvim",
|
|
config = function()
|
|
require("workspaces").setup {
|
|
-- sort the list of workspaces by name after loading from the workspaces path.
|
|
sort = true,
|
|
|
|
-- sort by recent use rather than by name. requires sort to be true
|
|
mru_sort = false,
|
|
|
|
-- option to automatically activate workspace when opening neovim in a workspace directory
|
|
auto_open = true,
|
|
|
|
-- option to automatically activate workspace when changing directory not via this plugin
|
|
auto_dir = true,
|
|
|
|
hooks = {
|
|
open = "FzfLua files"
|
|
}
|
|
}
|
|
end
|
|
},
|
|
|
|
-- rpn calculator
|
|
-- also added as source to cmp
|
|
{
|
|
"PhilRunninger/cmp-rpncalc",
|
|
},
|
|
|
|
-- comfortable table editing
|
|
{ 'dhruvasagar/vim-table-mode' },
|
|
})
|