|
|
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
|
|
|
})
|
|
|
end
|
|
|
vim.opt.rtp:prepend(lazypath)
|
|
|
|
|
|
local plugins = {
|
|
|
{ "preservim/vim-markdown", dependencies = "godlygeek/tabular" },
|
|
|
{ "nathanielc/vim-tickscript" }, -- { "neomake/neomake" },
|
|
|
{ "jghauser/follow-md-links.nvim" },
|
|
|
{ 'akinsho/toggleterm.nvim', version = "*", config = true }, {
|
|
|
'JellyApple102/flote.nvim',
|
|
|
config = function()
|
|
|
require('flote').setup {
|
|
|
q_to_quit = true,
|
|
|
window_style = 'minimal',
|
|
|
-- window_style = '',
|
|
|
window_border = 'solid',
|
|
|
window_title = true
|
|
|
}
|
|
|
end
|
|
|
}, { 'jghauser/follow-md-links.nvim' }, {
|
|
|
'rebelot/kanagawa.nvim',
|
|
|
config = function()
|
|
|
require('kanagawa').setup()
|
|
|
-- Moved to set.lua
|
|
|
-- vim.cmd("colorscheme kanagawa")
|
|
|
end
|
|
|
}, {
|
|
|
"toppair/peek.nvim",
|
|
|
build = "deno task --quiet build:fast",
|
|
|
config = function()
|
|
|
require("peek").setup({ app = { "cmd.exe", "/c", "start", "msedge" } })
|
|
|
local peek = require("peek")
|
|
|
|
|
|
vim.api.nvim_create_user_command("PeekOpen", function()
|
|
|
if not peek.is_open() and
|
|
|
vim.bo[vim.api.nvim_get_current_buf()].filetype ==
|
|
|
"markdown" then
|
|
|
-- vim.fn.system("i3-msg split horizontal")
|
|
|
peek.open()
|
|
|
end
|
|
|
end, {})
|
|
|
|
|
|
vim.api.nvim_create_user_command("PeekClose", function()
|
|
|
if peek.is_open() then
|
|
|
peek.close()
|
|
|
-- vim.fn.system("i3-msg move left")
|
|
|
end
|
|
|
end, {})
|
|
|
end
|
|
|
}, { 'gianarb/vim-flux' }, {
|
|
|
"nvim-telescope/telescope.nvim",
|
|
|
tag = "0.1.0",
|
|
|
dependencies = "nvim-lua/plenary.nvim"
|
|
|
}, {
|
|
|
"jackMort/ChatGPT.nvim",
|
|
|
config = function()
|
|
|
require("chatgpt").setup({
|
|
|
-- optional configuration
|
|
|
})
|
|
|
end,
|
|
|
dependencies = {
|
|
|
"MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim",
|
|
|
"nvim-telescope/telescope.nvim"
|
|
|
}
|
|
|
}, {
|
|
|
"rose-pine/neovim",
|
|
|
name = "rose-pine",
|
|
|
lazy = false,
|
|
|
priority = 1000,
|
|
|
config = function()
|
|
|
require("rose-pine").setup()
|
|
|
-- Moved to set.lua
|
|
|
-- vim.cmd("colorscheme rose-pine")
|
|
|
end
|
|
|
}, { "TimUntersberger/neogit", dependencies = "nvim-lua/plenary.nvim" },
|
|
|
|
|
|
-- { "tpope/vim-fugitive" },
|
|
|
|
|
|
{
|
|
|
"nvim-lualine/lualine.nvim",
|
|
|
config = function()
|
|
|
require("lualine").setup({
|
|
|
options = { theme = "auto" },
|
|
|
winbar = {
|
|
|
lualine_a = { 'filename' },
|
|
|
lualine_b = { 'branch' },
|
|
|
lualine_c = { 'diff' },
|
|
|
lualine_x = {},
|
|
|
lualine_y = {},
|
|
|
lualine_z = {}
|
|
|
},
|
|
|
inactive_winbar = {
|
|
|
lualine_a = { 'filename' },
|
|
|
lualine_b = { 'branch' },
|
|
|
lualine_c = { 'diff' },
|
|
|
lualine_x = {},
|
|
|
lualine_y = {},
|
|
|
lualine_z = {}
|
|
|
},
|
|
|
-- tabline = {
|
|
|
-- lualine_a = {},
|
|
|
-- lualine_b = {},
|
|
|
-- -- lualine_b = { "branch" },
|
|
|
-- -- lualine_c = { 'filename' },
|
|
|
-- lualine_c = {},
|
|
|
-- lualine_x = {},
|
|
|
-- lualine_y = {},
|
|
|
-- lualine_z = {},
|
|
|
-- },
|
|
|
sections = {
|
|
|
lualine_b = {
|
|
|
"branch", "diff", {
|
|
|
"diagnostics",
|
|
|
sections = { "error", "warn", "info", "hint" },
|
|
|
diagnostics_color = {
|
|
|
-- Same values as the general color option can be used here.
|
|
|
error = "DiagnosticError", -- Changes diagnostics' error color.
|
|
|
warn = "DiagnosticWarn", -- Changes diagnostics' warn color.
|
|
|
info = "DiagnosticInfo", -- Changes diagnostics' info color.
|
|
|
hint = "DiagnosticHint" -- Changes diagnostics' hint color.
|
|
|
},
|
|
|
symbols = {
|
|
|
error = "E",
|
|
|
warn = "W",
|
|
|
info = "I",
|
|
|
hint = "H"
|
|
|
},
|
|
|
colored = true, -- Displays diagnostics status in color if set to true.
|
|
|
update_in_insert = false, -- Update diagnostics in insert mode.
|
|
|
always_visible = false -- Show diagnostics even if there are none.
|
|
|
}
|
|
|
},
|
|
|
-- lualine_c = { sections = { 'lsp_progress' } },
|
|
|
lualine_x = {
|
|
|
"encoding", {
|
|
|
"fileformat",
|
|
|
symbols = {
|
|
|
unix = "unix", -- e712
|
|
|
dos = "dos", -- e70f
|
|
|
mac = "mac" -- e711
|
|
|
}
|
|
|
}, "filetype", "lsp_progress"
|
|
|
-- "tabnine",
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
end
|
|
|
}, {
|
|
|
"nvim-treesitter/nvim-treesitter",
|
|
|
run = ":TSUpdate",
|
|
|
config = function()
|
|
|
require("nvim-treesitter.configs").setup({
|
|
|
-- A list of parser names, or "all" (the five listed parsers should always be installed)
|
|
|
ensure_installed = {
|
|
|
|
|
|
"awk", "bash", "bibtex", "c", "c_sharp", "clojure", "cmake",
|
|
|
"comment", "css", "diff", "dockerfile", "dot", "elm",
|
|
|
"git_config", "git_rebase", "gitattributes", "gitcommit",
|
|
|
"gitignore", "go", "godot_resource", "gomod", "gosum",
|
|
|
"gowork", "graphql", "help", "html", "http", "ini", "java",
|
|
|
"javascript", "jq", "jsdoc", "json", "json5", "kotlin",
|
|
|
"latex", "lua", "luadoc", "luap", "luau", "make",
|
|
|
"markdown", "markdown_inline", "norg", "norg_meta", "org",
|
|
|
"perl", "php", "python", "query", "regex", "rust", "sql",
|
|
|
"terraform", "toml", "typescript", "vim", "vimdoc", "yaml"
|
|
|
|
|
|
},
|
|
|
-- Install parsers synchronously (only applied to `ensure_installed`)
|
|
|
sync_install = false,
|
|
|
-- Automatically install missing parsers when entering buffer
|
|
|
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
|
|
auto_install = true,
|
|
|
-- List of parsers to ignore installing (for "all")
|
|
|
ignore_install = { "javascript" },
|
|
|
---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
|
|
|
-- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
|
|
|
|
|
|
highlight = {
|
|
|
enable = true,
|
|
|
-- NOTE: these are the names of the parsers and not the filetype. (for example if you want to
|
|
|
-- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is
|
|
|
-- the name of the parser)
|
|
|
-- list of language that will be disabled
|
|
|
-- disable = { "c", "rust" },
|
|
|
-- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files
|
|
|
disable = function(lang, buf)
|
|
|
local max_filesize = 100 * 1024 -- 100 KB
|
|
|
local ok, stats =
|
|
|
pcall(vim.loop.fs_stat,
|
|
|
vim.api.nvim_buf_get_name(buf))
|
|
|
if ok and stats and stats.size > max_filesize then
|
|
|
return true
|
|
|
end
|
|
|
end,
|
|
|
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
|
|
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
|
|
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
|
|
-- Instead of true it can also be a list of languages
|
|
|
additional_vim_regex_highlighting = false
|
|
|
}
|
|
|
})
|
|
|
end
|
|
|
}, { "nvim-treesitter/playground" }, { "theprimeagen/harpoon" },
|
|
|
{ "mbbill/undotree" },
|
|
|
|
|
|
{
|
|
|
"williamboman/mason.nvim",
|
|
|
config = function() require("mason").setup() end
|
|
|
},
|
|
|
|
|
|
{
|
|
|
"williamboman/mason-lspconfig.nvim",
|
|
|
dependencies = { "neovim/nvim-lspconfig" }
|
|
|
}, {
|
|
|
"jay-babu/mason-null-ls.nvim",
|
|
|
-- config = function()
|
|
|
-- local mason_null_ls = require("mason-null-ls")
|
|
|
--
|
|
|
-- mason_null_ls.setup({
|
|
|
-- ensure_installed = {
|
|
|
-- -- Opt to list sources here, when available in mason.
|
|
|
-- },
|
|
|
-- automatic_installation = false,
|
|
|
-- automatic_setup = true, -- Recommended, but optional
|
|
|
-- })
|
|
|
--
|
|
|
-- local null_ls = require("null-ls")
|
|
|
-- null_ls.setup(
|
|
|
-- -- {
|
|
|
-- -- sources = {
|
|
|
-- -- null_ls.builtins.formatting.beautysh,
|
|
|
-- -- },
|
|
|
-- -- }
|
|
|
-- )
|
|
|
-- mason_null_ls.setup_handlers()
|
|
|
-- end,
|
|
|
dependencies = { "jose-elias-alvarez/null-ls.nvim" }
|
|
|
}, -- Snippets
|
|
|
{ "L3MON4D3/LuaSnip" }, { "rafamadriz/friendly-snippets" }, -- Autocompletion
|
|
|
{ "hrsh7th/cmp-buffer" }, { "hrsh7th/cmp-cmdline" }, { "hrsh7th/cmp-nvim-lsp" },
|
|
|
{ "hrsh7th/cmp-nvim-lua" }, { "hrsh7th/cmp-path" }, { "hrsh7th/nvim-cmp" },
|
|
|
{ "saadparwaiz1/cmp_luasnip" }, -- -- Debugging
|
|
|
{
|
|
|
"jay-babu/mason-nvim-dap.nvim",
|
|
|
config = function()
|
|
|
require("mason-nvim-dap").setup({ ensure_installed = { "delve" } })
|
|
|
end
|
|
|
}, { "mfussenegger/nvim-jdtls" }, { "mfussenegger/nvim-dap" },
|
|
|
{ "rcarriga/nvim-dap-ui", dependencies = { "mfussenegger/nvim-dap" } }, {
|
|
|
"JoosepAlviste/nvim-ts-context-commentstring",
|
|
|
dependencies = {
|
|
|
{ "numToStr/Comment.nvim" }, { "nvim-treesitter/nvim-treesitter" }
|
|
|
},
|
|
|
config = function()
|
|
|
require('Comment').setup()
|
|
|
local ft = require('Comment.ft')
|
|
|
ft.set('flux', '// %s')
|
|
|
require("nvim-treesitter.configs").setup({
|
|
|
context_commentstring = { enable = true, enable_autocmd = false }
|
|
|
})
|
|
|
end
|
|
|
}, {
|
|
|
"numToStr/Comment.nvim",
|
|
|
config = function()
|
|
|
require("Comment").setup({
|
|
|
pre_hook = require(
|
|
|
"ts_context_commentstring.integrations.comment_nvim").create_pre_hook()
|
|
|
})
|
|
|
end
|
|
|
}, {
|
|
|
"folke/which-key.nvim",
|
|
|
config = function() require("which-key").setup({}) end
|
|
|
}, -- {
|
|
|
-- "tzachar/cmp-tabnine",
|
|
|
-- build = "./install.sh",
|
|
|
-- dependencies = "hrsh7th/nvim-cmp",
|
|
|
-- config = function()
|
|
|
-- require("cmp_tabnine").setup({
|
|
|
-- max_lines = 1000,
|
|
|
-- max_num_results = 20,
|
|
|
-- sort = true,
|
|
|
-- run_on_every_keystroke = true,
|
|
|
-- snippet_placeholder = "..",
|
|
|
-- ignored_file_types = {
|
|
|
-- -- default is not to ignore
|
|
|
-- -- uncomment to ignore in lua:
|
|
|
-- -- lua = true
|
|
|
-- norg = true,
|
|
|
-- },
|
|
|
-- show_prediction_strength = true,
|
|
|
-- })
|
|
|
-- end,
|
|
|
-- },
|
|
|
{ "weilbith/nvim-code-action-menu", cmd = "CodeActionMenu" },
|
|
|
{
|
|
|
"kosayoda/nvim-lightbulb",
|
|
|
dependencies = "antoinemadec/FixCursorHold.nvim"
|
|
|
}, {
|
|
|
"nvim-neotest/neotest",
|
|
|
dependencies = {
|
|
|
"nvim-lua/plenary.nvim", "nvim-treesitter/nvim-treesitter",
|
|
|
"antoinemadec/FixCursorHold.nvim", "nvim-neotest/neotest-vim-test"
|
|
|
},
|
|
|
config = function()
|
|
|
require("neotest").setup({
|
|
|
adapters = {
|
|
|
require("neotest-vim-test")({ ignore_filetypes = {} })
|
|
|
}
|
|
|
})
|
|
|
end
|
|
|
}, { "nvim-neorg/tree-sitter-norg" }, { "nvim-neorg/neorg-telescope" }, {
|
|
|
"nvim-neorg/neorg",
|
|
|
config = function()
|
|
|
require("neorg").setup({
|
|
|
load = {
|
|
|
["core.defaults"] = {} -- Load all the default modules
|
|
|
-- ["core.norg.concealer"] = {
|
|
|
-- -- config = {
|
|
|
-- -- folds = false,
|
|
|
-- -- },
|
|
|
-- },
|
|
|
-- ["core.norg.dirman"] = { -- Manage your directories with Neorg
|
|
|
-- config = {
|
|
|
-- workspaces = {
|
|
|
-- work = "/Users/nige/notes/work",
|
|
|
-- home = "/Users/nige/notes/home",
|
|
|
-- gtd =
|
|
|
-- "/Users/nige/Documents/PARA/PROJECTS/example_workspaces/gtd",
|
|
|
-- -- gtd = "/Users/nige/gtd"
|
|
|
-- },
|
|
|
-- },
|
|
|
-- },
|
|
|
-- -- ["core.gtd.base"] = {
|
|
|
-- -- config = {
|
|
|
-- -- workspace = "gtd",
|
|
|
-- -- -- workspace = "notes",
|
|
|
-- -- },
|
|
|
-- -- },
|
|
|
-- ["core.norg.completion"] = {
|
|
|
-- config = {
|
|
|
-- engine = "nvim-cmp", -- We current support nvim-compe and nvim-cmp only
|
|
|
-- },
|
|
|
-- },
|
|
|
-- ["core.norg.qol.todo_items"] = {},
|
|
|
-- -- ["core.norg.qol.toc"] = {
|
|
|
-- -- config = { -- Note that this table is optional and doesn't need to be provided
|
|
|
-- -- -- Configuration here
|
|
|
-- -- default_toc_mode = "toqflist"
|
|
|
-- -- }
|
|
|
-- -- },
|
|
|
-- -- ["core.norg.journal"] = {
|
|
|
-- -- config = { -- Note that this table is optional and doesn't need to be provided
|
|
|
-- -- -- workspace = "notes",
|
|
|
-- -- }
|
|
|
-- -- },
|
|
|
-- -- ["core.presenter"] = {
|
|
|
-- -- config = { -- Note that this table is optional and doesn't need to be provided
|
|
|
-- -- -- Configuration here
|
|
|
-- -- -- zen_mode = "truezen",
|
|
|
-- -- zen_mode = "zen-mode"
|
|
|
-- -- }
|
|
|
-- -- },
|
|
|
-- ["core.export"] = {
|
|
|
-- config = { -- Note that this table is optional and doesn't need to be provided
|
|
|
-- -- Configuration here
|
|
|
-- },
|
|
|
-- },
|
|
|
-- ["core.integrations.telescope"] = {}, -- Enable the telescope module
|
|
|
}
|
|
|
})
|
|
|
end
|
|
|
-- dependencies = "nvim-neorg/neorg-telescope", -- Be sure to pull in the repo
|
|
|
}
|
|
|
}
|
|
|
|
|
|
local opts = {
|
|
|
ui = {
|
|
|
-- a number <1 is a percentage., >1 is a fixed size
|
|
|
size = { width = 0.8, height = 0.8 },
|
|
|
wrap = true, -- wrap the lines in the ui
|
|
|
-- The border to use for the UI window. Accepts same border values as |nvim_open_win()|.
|
|
|
border = "none",
|
|
|
icons = {
|
|
|
cmd = "cmd",
|
|
|
config = "config",
|
|
|
event = "event",
|
|
|
ft = "ft",
|
|
|
init = "init",
|
|
|
import = "import",
|
|
|
keys = "⚿",
|
|
|
lazy = "lazy",
|
|
|
loaded = "●",
|
|
|
not_loaded = "○",
|
|
|
plugin = "+",
|
|
|
runtime = "runtime",
|
|
|
source = "⦻",
|
|
|
start = "⏵",
|
|
|
task = "✔ ",
|
|
|
list = { "●", "➜", "★", "‒" }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
require("lazy").setup(plugins, opts)
|