a lot more stuff
This commit is contained in:
@ -1,14 +1,22 @@
|
||||
local lsp = require('core.lsp.functions')
|
||||
|
||||
return { 'hrsh7th/nvim-cmp',
|
||||
requires = {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
'lukas-reineke/cmp-under-comparator' -- better results
|
||||
'lukas-reineke/cmp-under-comparator', -- better results
|
||||
'xzbdmw/colorful-menu.nvim' -- fancy colors
|
||||
},
|
||||
|
||||
-- suppliers for completions (they require nvim-cmp to be loaded before they are)
|
||||
deps = {
|
||||
'hrsh7th/cmp-buffer', -- buffers
|
||||
'FelipeLema/cmp-async-path', -- path
|
||||
'hrsh7th/cmp-nvim-lsp', -- lsp
|
||||
{ 'hrsh7th/cmp-nvim-lsp',
|
||||
function()
|
||||
-- add lsp capabilities
|
||||
lsp.add_capabilities(require('cmp_nvim_lsp').default_capabilities())
|
||||
end
|
||||
}, -- lsp
|
||||
'hrsh7th/cmp-nvim-lsp-signature-help', -- completion information
|
||||
{ 'L3MON4D3/cmp-luasnip-choice', -- luasnip
|
||||
requires = 'L3MON4D3/LuaSnip'
|
||||
@ -19,6 +27,7 @@ return { 'hrsh7th/nvim-cmp',
|
||||
local cmp = require('cmp')
|
||||
local luasnip = require('luasnip')
|
||||
|
||||
-- setup cmp
|
||||
cmp.setup {
|
||||
-- disable when in comments
|
||||
enabled = function()
|
||||
@ -44,8 +53,8 @@ return { 'hrsh7th/nvim-cmp',
|
||||
-- how to sort results
|
||||
sorting = {
|
||||
comparators = {
|
||||
cmp.config.compare.offset,
|
||||
cmp.config.compare.exact,
|
||||
cmp.config.compare.offset,
|
||||
cmp.config.compare.score,
|
||||
require('cmp-under-comparator').under,
|
||||
cmp.config.compare.kind,
|
||||
@ -80,16 +89,24 @@ return { 'hrsh7th/nvim-cmp',
|
||||
formatting = {
|
||||
fields = { 'menu', 'abbr', 'kind' },
|
||||
format = function(entry, item)
|
||||
local hl_info = require("colorful-menu").cmp_highlights(entry)
|
||||
local menu_icon = {
|
||||
nvim_lsp = 'λ',
|
||||
nvim_lua = 'v',
|
||||
luasnip = '%',
|
||||
buffer = '@',
|
||||
path = '#',
|
||||
async_path = '#'
|
||||
}
|
||||
|
||||
-- add a little icon
|
||||
item.menu = menu_icon[entry.source.name]
|
||||
|
||||
-- add highlights
|
||||
if hl_info ~= nil then
|
||||
item.abbr_hl_group = hl_info.highlights
|
||||
item.abbr = hl_info.text
|
||||
end
|
||||
|
||||
return item
|
||||
end
|
||||
},
|
||||
@ -107,25 +124,14 @@ return { 'hrsh7th/nvim-cmp',
|
||||
|
||||
-- mappings
|
||||
mapping = cmp.mapping.preset.insert {
|
||||
["<C-y>"] = cmp.mapping(function()
|
||||
cmp.confirm({ select = true })
|
||||
end, { "i", "c" }),
|
||||
|
||||
["<C-n>"] = cmp.mapping(function()
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
end
|
||||
end),
|
||||
|
||||
["<C-p>"] = cmp.mapping(function()
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
end
|
||||
end),
|
||||
|
||||
["<C-y>"] = cmp.mapping.confirm {
|
||||
select = true
|
||||
},
|
||||
["<C-n>"] = cmp.mapping.select_next_item(),
|
||||
["<C-p>"] = cmp.mapping.select_prev_item(),
|
||||
["<C-u>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-d>"] = cmp.mapping.scroll_docs(4),
|
||||
['<ESC>'] = cmp.mapping.close()
|
||||
["<ESC>"] = cmp.mapping.close()
|
||||
}
|
||||
}
|
||||
end
|
||||
|
@ -1,9 +0,0 @@
|
||||
return { 'theHamsta/nvim-dap-virtual-text',
|
||||
requires = {
|
||||
'mfussenegger/nvim-dap',
|
||||
'nvim-treesitter/nvim-treesitter'
|
||||
},
|
||||
function()
|
||||
require("nvim-dap-virtual-text").setup {}
|
||||
end
|
||||
}
|
@ -4,9 +4,9 @@ local map = misc.map
|
||||
return { 'mfussenegger/nvim-dap',
|
||||
requires = {
|
||||
'williamboman/mason.nvim',
|
||||
'nvim-telescope/telescope.nvim'
|
||||
'nvim-telescope/telescope.nvim',
|
||||
},
|
||||
disable = vim.version().minor < 8,
|
||||
disable = not vim.fn.has("nvim-0.8.0"),
|
||||
branch = '0.8.0',
|
||||
function()
|
||||
|
||||
@ -38,10 +38,13 @@ return { 'mfussenegger/nvim-dap',
|
||||
}
|
||||
}
|
||||
|
||||
map('n', '<Leader>ec', dap.continue)
|
||||
map('n', '<Leader>eb', require("dap.breakpoints").toggle)
|
||||
map('n', '<Leader>e]', dap.step_over)
|
||||
map('n', '<Leader>e[', dap.step_back)
|
||||
map('n', '<Leader>eR', dap.restart)
|
||||
map('n', '<Leader>ec', dap.continue, { desc = "dap continue " })
|
||||
map('n', '<Leader>el', dap.run_last, { desc = "dap run last" })
|
||||
map('n', '<Leader>et', dap.terminate, { desc = "dap terminate " })
|
||||
map('n', '<Leader>eb', require("dap.breakpoints").toggle, { desc = "dap toggle breakpoint" })
|
||||
map('n', '<Leader>e]', dap.step_over, { desc = "dap step over" })
|
||||
map('n', '<Leader>e[', dap.step_back, { desc = "dap step back" })
|
||||
map('n', '<Leader>er', dap.repl.toggle, { desc = "dap repl toggle" })
|
||||
map('n', '<Leader>eR', dap.restart, { desc = "dap restart" })
|
||||
end
|
||||
}
|
||||
|
@ -1,12 +1,12 @@
|
||||
local branch = nil
|
||||
if vim.version().minor == 7 then
|
||||
if vim.fn.has("nvim-0.7.0") then
|
||||
branch = 'nvim-0.7'
|
||||
elseif vim.version().minor == 5 then
|
||||
elseif vim.fn.has("nvim-0.5.0") then
|
||||
branch = 'nvim-0.5'
|
||||
end
|
||||
|
||||
return { 'stevearc/dressing.nvim',
|
||||
disable = vim.version().minor < 5,
|
||||
disable = true or not vim.fn.has("nvim-0.5.0"),
|
||||
branch = branch,
|
||||
requires = 'nvim-telescope/telescope.nvim',
|
||||
function()
|
||||
|
@ -1,5 +1,5 @@
|
||||
return { 'j-hui/fidget.nvim',
|
||||
disable = vim.version().minor < 9,
|
||||
disable = not vim.fn.has("nvim-0.9.0"),
|
||||
branch = "v1.5.0",
|
||||
function()
|
||||
local notification_defaults = require("fidget.notification").default_config
|
||||
@ -16,6 +16,7 @@ return { 'j-hui/fidget.nvim',
|
||||
}
|
||||
},
|
||||
notification = {
|
||||
filter = vim.log.levels.DEBUG,
|
||||
override_vim_notify = true,
|
||||
configs = {
|
||||
default = notification_defaults
|
||||
|
@ -2,7 +2,7 @@ local misc = require('core.misc')
|
||||
local map = misc.map
|
||||
|
||||
return { 'lewis6991/gitsigns.nvim',
|
||||
disable = vim.version().minor < 9,
|
||||
disable = not vim.fn.has("nvim-0.9.0"),
|
||||
function()
|
||||
local gs = require("gitsigns")
|
||||
|
||||
|
@ -2,7 +2,7 @@ local misc = require('core.misc')
|
||||
local map = misc.map
|
||||
|
||||
return { 'ThePrimeagen/harpoon',
|
||||
disable = vim.version().minor < 8,
|
||||
disable = not vim.fn.has("nvim-0.8.0"),
|
||||
commit = 'e76cb03',
|
||||
branch = 'harpoon2',
|
||||
requires = 'nvim-lua/plenary.nvim',
|
||||
|
@ -14,14 +14,7 @@ return { 'lukas-reineke/headlines.nvim',
|
||||
bullets = { "", "", "", "" },
|
||||
},
|
||||
markdown = {
|
||||
headline_highlights = {
|
||||
"@neorg.headings.1.title",
|
||||
"@neorg.headings.2.title",
|
||||
"@neorg.headings.3.title",
|
||||
"@neorg.headings.4.title",
|
||||
"@neorg.headings.5.title",
|
||||
"@neorg.headings.6.title"
|
||||
}
|
||||
headline_highlights = false
|
||||
}
|
||||
}
|
||||
end
|
||||
|
5
lua/conf/plugins/instant.lua
Normal file
5
lua/conf/plugins/instant.lua
Normal file
@ -0,0 +1,5 @@
|
||||
return { 'jbyuki/instant.nvim',
|
||||
function()
|
||||
vim.g.instant_username = "squibid"
|
||||
end
|
||||
}
|
@ -3,7 +3,7 @@ local lsp = require('core.lsp.functions')
|
||||
local map, auto = misc.map, misc.auto
|
||||
|
||||
return { 'mfussenegger/nvim-jdtls',
|
||||
disable = vim.version().minor < 6,
|
||||
disable = not vim.fn.has("nvim-0.6.0"),
|
||||
requires = 'mfussenegger/nvim-dap',
|
||||
function()
|
||||
auto("FileType", {
|
||||
@ -34,7 +34,10 @@ return { 'mfussenegger/nvim-jdtls',
|
||||
'gradlew',
|
||||
'.git',
|
||||
'mvnw',
|
||||
'build.xml'
|
||||
'settings.gradle', -- Gradle (multi-project)
|
||||
'settings.gradle.kts', -- Gradle (multi-project)
|
||||
'build.xml', -- Ant
|
||||
'pom.xml', -- Maven
|
||||
}, { upward = true })[1]),
|
||||
|
||||
-- don't print out status messages
|
||||
@ -42,10 +45,7 @@ return { 'mfussenegger/nvim-jdtls',
|
||||
['language/status'] = function() end
|
||||
},
|
||||
|
||||
capabilities = lsp.capabilities(),
|
||||
on_attach = function(client, bufnr)
|
||||
lsp.attach(client, bufnr)
|
||||
|
||||
on_attach = function(_, bufnr)
|
||||
-- add some jdtls specific mappings
|
||||
local opts = { buffer = bufnr }
|
||||
map('n', 'cri', jdtls.organize_imports, opts)
|
||||
@ -64,8 +64,10 @@ return { 'mfussenegger/nvim-jdtls',
|
||||
end
|
||||
})
|
||||
end,
|
||||
capabilities = lsp.capabilities
|
||||
}
|
||||
|
||||
-- generate the path to the java file(s)
|
||||
---@type string|nil
|
||||
local cache_path = vim.fs.joinpath(vim.fn.stdpath("cache"), "/JavaVersion.class")
|
||||
---@type string|nil
|
||||
|
@ -7,7 +7,7 @@ return { 'kawre/leetcode.nvim',
|
||||
},
|
||||
config = function()
|
||||
-- because we're using treesitter make sure to install the html parser
|
||||
vim.cmd.TSUpdate("html")
|
||||
vim.cmd("TSUpdate html")
|
||||
end,
|
||||
function()
|
||||
require('leetcode').setup {
|
||||
|
@ -1,3 +1,4 @@
|
||||
return { 'whynothugo/lsp_lines',
|
||||
url = 'https://git.sr.ht/~whynothugo/lsp_lines.nvim'
|
||||
url = 'https://git.sr.ht/~whynothugo/lsp_lines.nvim',
|
||||
disable = not vim.fn.has("nvim-0.8.0")
|
||||
}
|
||||
|
@ -3,9 +3,9 @@ local map = misc.map
|
||||
|
||||
return { 'L3MON4D3/LuaSnip',
|
||||
branch = 'v2.3.0',
|
||||
disable = vim.version().minor < 7,
|
||||
disable = not vim.fn.has("nvim-0.7.0"),
|
||||
config = function()
|
||||
vim.cmd.make('install_jsregexp')
|
||||
vim.cmd('make install_jsregexp')
|
||||
end,
|
||||
function()
|
||||
local luasnip = require('luasnip')
|
||||
|
@ -1,18 +1,23 @@
|
||||
local misc = require('core.misc')
|
||||
local lsp = require('core.lsp.functions')
|
||||
local map, auto, augroup = misc.map, misc.auto, misc.augroup
|
||||
local map = misc.map
|
||||
|
||||
return { 'williamboman/mason-lspconfig.nvim',
|
||||
requires = {
|
||||
'williamboman/mason.nvim',
|
||||
{ 'neovim/nvim-lspconfig',
|
||||
disable = vim.version().minor < 8,
|
||||
disable = not vim.fn.has("nvim-0.8.0"),
|
||||
function()
|
||||
lsp.setup()
|
||||
end
|
||||
}
|
||||
},
|
||||
|
||||
-- these two update some lsp capabilities and therefore must be run first
|
||||
-- 'hrsh7th/cmp-nvim-lsp',
|
||||
-- 'kevinhwang91/nvim-ufo'
|
||||
},
|
||||
function()
|
||||
local lspconfig = require('lspconfig')
|
||||
local util = require('lspconfig.util')
|
||||
|
||||
-- setup language servers
|
||||
@ -27,97 +32,105 @@ return { 'williamboman/mason-lspconfig.nvim',
|
||||
"bashls",
|
||||
"zls"
|
||||
-- "asm-lsp", -- seems to be broken
|
||||
}
|
||||
}
|
||||
require('mason-lspconfig').setup_handlers {
|
||||
function(server_name)
|
||||
require('lspconfig')[server_name].setup {
|
||||
on_attach = lsp.lsp_attach,
|
||||
capabilities = lsp.capabilities()
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
-- setup luals
|
||||
["lua_ls"] = function(server_name)
|
||||
local root_files = { '.luarc.json', '.luarc.jsonc', '.luacheckrc',
|
||||
'.stylua.toml', 'stylua.toml', 'selene.toml', 'selene.yml',
|
||||
'README.md'
|
||||
}
|
||||
-- setup all handlers
|
||||
handlers = {
|
||||
function(server_name)
|
||||
lspconfig[server_name].setup {}
|
||||
end,
|
||||
|
||||
-- FIXME: luals seems to start up twice and sends back twice the
|
||||
-- completions (one configured with the below settings and one without)
|
||||
require('lspconfig')[server_name].setup {
|
||||
on_attach = lsp.attach,
|
||||
capabilities = lsp.capabilities(),
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { "vim", 'mp' }
|
||||
},
|
||||
runtime = {
|
||||
version = 'LuaJIT'
|
||||
},
|
||||
format = {
|
||||
enable = false
|
||||
},
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
library = {
|
||||
vim.env.VIMRUNTIME
|
||||
-- setup luals
|
||||
["lua_ls"] = function(server_name)
|
||||
local root_files = { '.luarc.json', '.luarc.jsonc', '.luacheckrc',
|
||||
'.stylua.toml', 'stylua.toml', 'selene.toml', 'selene.yml',
|
||||
'README.md'
|
||||
}
|
||||
|
||||
-- FIXME: luals seems to start up twice and sends back twice the
|
||||
-- completions (one configured with the below settings and one without)
|
||||
lspconfig[server_name].setup {
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { "vim", 'mp' }
|
||||
},
|
||||
runtime = {
|
||||
version = 'LuaJIT'
|
||||
},
|
||||
format = {
|
||||
enable = false
|
||||
},
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
library = {
|
||||
vim.env.VIMRUNTIME
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
root_dir = function(fname)
|
||||
local root = util.root_pattern(unpack(root_files))(fname)
|
||||
if root and root ~= vim.env.HOME then
|
||||
return root
|
||||
root_dir = function(fname)
|
||||
local root = util.root_pattern(unpack(root_files))(fname)
|
||||
if root and root ~= vim.env.HOME then
|
||||
return root
|
||||
end
|
||||
|
||||
root = util.root_pattern('lua/')(fname)
|
||||
if root then
|
||||
return root
|
||||
end
|
||||
return util.find_git_ancestor(fname)
|
||||
end
|
||||
}
|
||||
end,
|
||||
|
||||
root = util.root_pattern('lua/')(fname)
|
||||
if root then
|
||||
return root
|
||||
end
|
||||
return util.find_git_ancestor(fname)
|
||||
end
|
||||
}
|
||||
end,
|
||||
-- setup clangd
|
||||
["clangd"] = function(server_name)
|
||||
lspconfig[server_name].setup {
|
||||
on_attach = function(client, bufnr)
|
||||
-- add some clangd specific mappings
|
||||
local opts = { buffer = bufnr }
|
||||
map("n", "<leader>o", "<cmd>ClangdSwitchSourceHeader<CR>", opts)
|
||||
end,
|
||||
|
||||
-- setup clangd
|
||||
["clangd"] = function(server_name)
|
||||
require('lspconfig')[server_name].setup {
|
||||
on_attach = function(client, bufnr)
|
||||
lsp.attach(client, bufnr)
|
||||
|
||||
-- add some clangd specific mappings
|
||||
local opts = { buffer = bufnr }
|
||||
map("n", "<leader>o", "<cmd>ClangdSwitchSourceHeader<CR>", opts)
|
||||
end,
|
||||
capabilities = lsp.capabilities(),
|
||||
|
||||
cmd = {
|
||||
"clangd",
|
||||
"--background-index",
|
||||
"--clang-tidy",
|
||||
"--header-insertion=iwyu",
|
||||
"--completion-style=detailed",
|
||||
"--function-arg-placeholders",
|
||||
"--fallback-style=llvm"
|
||||
},
|
||||
init_options = {
|
||||
usePlaceholders = true,
|
||||
clangdFileStatus = true,
|
||||
fallback_flags = {
|
||||
"-xc" -- makes clangd think we're using c instead of c++
|
||||
cmd = {
|
||||
"clangd",
|
||||
"--background-index",
|
||||
"--clang-tidy",
|
||||
"--header-insertion=iwyu",
|
||||
"--completion-style=detailed",
|
||||
"--function-arg-placeholders",
|
||||
"--fallback-style=llvm"
|
||||
},
|
||||
init_options = {
|
||||
usePlaceholders = true,
|
||||
clangdFileStatus = true,
|
||||
fallback_flags = {
|
||||
"-xc" -- makes clangd think we're using c instead of c++
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end,
|
||||
end,
|
||||
|
||||
-- disable it, we start this using nvim-jdtls
|
||||
["jdtls"] = function(_) end
|
||||
-- disable it, we start this using nvim-jdtls
|
||||
["jdtls"] = function(_) end,
|
||||
|
||||
-- setup basedpyright
|
||||
["basedpyright"] = function(server_name)
|
||||
lspconfig[server_name].setup {
|
||||
on_attach = function(client, bufnr)
|
||||
-- add some basedpyright specific mappings
|
||||
local opts = { buffer = bufnr }
|
||||
map("n", "cri", "<cmd>PyrightOrganizeImports<CR>", opts)
|
||||
end,
|
||||
}
|
||||
end
|
||||
},
|
||||
|
||||
["openscad_lsp"] = function(server_name)
|
||||
lspconfig[server_name].setup {}
|
||||
end
|
||||
}
|
||||
|
||||
end
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
return { 'williamboman/mason.nvim',
|
||||
disable = vim.version().minor < 7,
|
||||
disable = not vim.fn.has("nvim-0.7.0"),
|
||||
function()
|
||||
local mason = require('mason')
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
return { 'mellow-theme/mellow.nvim',
|
||||
disable = vim.version().minor < 8,
|
||||
disable = not vim.fn.has("nvim-0.8.0"),
|
||||
requires = 'nvim-treesitter/nvim-treesitter',
|
||||
function()
|
||||
vim.g.mellow_variant = "dark"
|
||||
|
52
lua/conf/plugins/mini-clue.lua
Normal file
52
lua/conf/plugins/mini-clue.lua
Normal file
@ -0,0 +1,52 @@
|
||||
return { 'echasnovski/mini.clue',
|
||||
disable = true,
|
||||
-- disable = not vim.fn.has("nvim-0.9.0"),
|
||||
branch = "stable",
|
||||
function()
|
||||
local miniclue = require('mini.clue')
|
||||
miniclue.setup({
|
||||
triggers = {
|
||||
-- Leader triggers
|
||||
{ mode = 'n', keys = '<Leader>' },
|
||||
{ mode = 'x', keys = '<Leader>' },
|
||||
|
||||
-- Built-in completion
|
||||
{ mode = 'i', keys = '<C-x>' },
|
||||
|
||||
-- `g` key
|
||||
{ mode = 'n', keys = 'g' },
|
||||
{ mode = 'x', keys = 'g' },
|
||||
|
||||
-- Marks
|
||||
{ mode = 'n', keys = "'" },
|
||||
{ mode = 'n', keys = '`' },
|
||||
{ mode = 'x', keys = "'" },
|
||||
{ mode = 'x', keys = '`' },
|
||||
|
||||
-- Registers
|
||||
{ mode = 'n', keys = '"' },
|
||||
{ mode = 'x', keys = '"' },
|
||||
{ mode = 'i', keys = '<C-r>' },
|
||||
{ mode = 'c', keys = '<C-r>' },
|
||||
|
||||
-- Window commands
|
||||
{ mode = 'n', keys = '<C-w>' },
|
||||
|
||||
-- `z` key
|
||||
{ mode = 'n', keys = 'z' },
|
||||
{ mode = 'x', keys = 'z' },
|
||||
},
|
||||
|
||||
clues = {
|
||||
-- Enhance this by adding descriptions for <Leader> mapping groups
|
||||
miniclue.gen_clues.builtin_completion(),
|
||||
miniclue.gen_clues.g(),
|
||||
miniclue.gen_clues.marks(),
|
||||
miniclue.gen_clues.registers(),
|
||||
miniclue.gen_clues.windows(),
|
||||
miniclue.gen_clues.z(),
|
||||
},
|
||||
})
|
||||
|
||||
end
|
||||
}
|
@ -8,7 +8,12 @@
|
||||
-- dependencies take a look at the build.lua for versioning info. Also make sure
|
||||
-- to check the release notes on github for info on breaking changes.
|
||||
|
||||
local workspace_cache = vim.fs.joinpath(vim.fn.stdpath("data"), "neorg-workspace-cache.lua")
|
||||
local workspace_cache
|
||||
if not vim.fs then
|
||||
workspace_cache = vim.fn.stdpath("data").."/neorg-workspace-cache.lua"
|
||||
else
|
||||
workspace_cache = vim.fs.joinpath(vim.fn.stdpath("data"), "neorg-workspace-cache.lua")
|
||||
end
|
||||
|
||||
--- populate neorg workspaces from path or cache
|
||||
---@param path string path to populate workspaces from
|
||||
@ -57,8 +62,8 @@ local function populate_workspaces(path, cache)
|
||||
end
|
||||
|
||||
return { 'nvim-neorg/neorg',
|
||||
disable = vim.version.lt(vim.version(), { 0, 10, 0 }),
|
||||
branch = 'v9.1.1',
|
||||
disable = not vim.fn.has("nvim-0.10.0"),
|
||||
branch = 'v9.3.0',
|
||||
requires = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
@ -69,7 +74,8 @@ return { 'nvim-neorg/neorg',
|
||||
},
|
||||
|
||||
-- NOTE: these are usually installed by neorg via luarocks, the versions
|
||||
-- were picked based on the build.lua found in the root of the neorg repo
|
||||
-- were picked based on the neorg-scm-1.rockspec found in the root of the
|
||||
-- neorg repo
|
||||
{ 'nvim-neotest/nvim-nio',
|
||||
branch = 'v1.7.0'
|
||||
},
|
||||
|
@ -1,5 +1,5 @@
|
||||
return { 'norcalli/nvim-colorizer.lua',
|
||||
disable = vim.version().minor < 4 and not vim.fn.has("termguicolors"),
|
||||
disable = not vim.fn.has("nvim-0.4.0") and not vim.fn.has("termguicolors"),
|
||||
function()
|
||||
require('colorizer').setup(nil, {
|
||||
names = false,
|
||||
|
7
lua/conf/plugins/nyooom.lua
Normal file
7
lua/conf/plugins/nyooom.lua
Normal file
@ -0,0 +1,7 @@
|
||||
return { 'squibid/nyooom',
|
||||
url = 'https://git.squi.bid/nyooom',
|
||||
pin = true,
|
||||
function()
|
||||
require('nyooom').setup {}
|
||||
end
|
||||
}
|
160
lua/conf/plugins/oil.lua
Normal file
160
lua/conf/plugins/oil.lua
Normal file
@ -0,0 +1,160 @@
|
||||
local misc = require('core.misc')
|
||||
local map = misc.map
|
||||
|
||||
local permission_hlgroups = {
|
||||
['-'] = 'NonText',
|
||||
['r'] = 'DiagnosticSignWarn',
|
||||
['w'] = 'DiagnosticSignHint',
|
||||
['x'] = 'DiagnosticSignOk',
|
||||
}
|
||||
|
||||
return { 'stevearc/oil.nvim',
|
||||
disable = not vim.fn.has("nvim-0.8.0"),
|
||||
function()
|
||||
require("oil").setup {
|
||||
-- ID is automatically added at the beginning, and name at the end
|
||||
-- See :help oil-columns
|
||||
columns = {
|
||||
{
|
||||
"permissions",
|
||||
highlight = function(permission_str)
|
||||
local hls = {}
|
||||
for i = 1, #permission_str do
|
||||
local char = permission_str:sub(i, i)
|
||||
table.insert(hls, { permission_hlgroups[char], i - 1, i })
|
||||
end
|
||||
return hls
|
||||
end,
|
||||
},
|
||||
{ "size", highlight = '@number' }
|
||||
},
|
||||
|
||||
-- Window-local options to use for oil buffers
|
||||
win_options = {
|
||||
number = false,
|
||||
relativenumber = false,
|
||||
wrap = false,
|
||||
signcolumn = "no",
|
||||
cursorcolumn = false,
|
||||
foldcolumn = "0",
|
||||
spell = false,
|
||||
list = false,
|
||||
conceallevel = 3,
|
||||
concealcursor = "nvic"
|
||||
},
|
||||
|
||||
-- Send deleted files to the trash instead of permanently deleting them (:help oil-trash)
|
||||
delete_to_trash = false,
|
||||
|
||||
-- Skip the confirmation popup for simple operations (:help oil.skip_confirm_for_simple_edits)
|
||||
skip_confirm_for_simple_edits = false,
|
||||
|
||||
-- Selecting a new/moved/renamed file or directory will prompt you to save changes first
|
||||
-- (:help prompt_save_on_select_new_entry)
|
||||
prompt_save_on_select_new_entry = true,
|
||||
|
||||
-- Oil will automatically delete hidden buffers after this delay
|
||||
-- You can set the delay to false to disable cleanup entirely
|
||||
-- Note that the cleanup process only starts when none of the oil buffers are currently displayed
|
||||
cleanup_delay_ms = 2000,
|
||||
lsp_file_methods = {
|
||||
-- Enable or disable LSP file operations
|
||||
enabled = true,
|
||||
-- Time to wait for LSP file operations to complete before skipping
|
||||
timeout_ms = 1000,
|
||||
-- Set to true to autosave buffers that are updated with LSP willRenameFiles
|
||||
-- Set to "unmodified" to only save unmodified buffers
|
||||
autosave_changes = "unmodified"
|
||||
},
|
||||
|
||||
-- Constrain the cursor to the editable parts of the oil buffer
|
||||
-- Set to `false` to disable, or "name" to keep it on the file names
|
||||
constrain_cursor = "editable",
|
||||
|
||||
-- Set to true to watch the filesystem for changes and reload oil
|
||||
watch_for_changes = false,
|
||||
|
||||
-- Keymaps in oil buffer. Can be any value that `vim.keymap.set` accepts OR a table of keymap
|
||||
-- options with a `callback` (e.g. { callback = function() ... end, desc = "", mode = "n" })
|
||||
-- Additionally, if it is a string that matches "actions.<name>",
|
||||
-- it will use the mapping at require("oil.actions").<name>
|
||||
-- Set to `false` to remove a keymap
|
||||
-- See :help oil-actions for a list of all available actions
|
||||
keymaps = {
|
||||
["g?"] = { "actions.show_help", mode = "n" },
|
||||
["<C-l>"] = "actions.refresh",
|
||||
["<CR>"] = "actions.select",
|
||||
["-"] = { "actions.parent", mode = "n" },
|
||||
["_"] = { "actions.open_cwd", mode = "n" },
|
||||
["`"] = { "actions.cd", mode = "n" },
|
||||
["~"] = { "actions.cd", opts = { scope = "tab" }, mode = "n" },
|
||||
["gs"] = { "actions.change_sort", mode = "n" },
|
||||
["gx"] = "actions.open_external",
|
||||
["g."] = { "actions.toggle_hidden", mode = "n" },
|
||||
["g\\"] = { "actions.toggle_trash", mode = "n" }
|
||||
},
|
||||
|
||||
view_options = {
|
||||
-- Show files and directories that start with "."
|
||||
show_hidden = false,
|
||||
|
||||
-- This function defines what is considered a "hidden" file
|
||||
is_hidden_file = function(name, bufnr)
|
||||
if name == ".." then -- show previous directory
|
||||
return false
|
||||
end
|
||||
local m = name:match("^%.")
|
||||
return m ~= nil
|
||||
end,
|
||||
|
||||
-- This function defines what will never be shown, even when `show_hidden` is set
|
||||
is_always_hidden = function(name, bufnr)
|
||||
return false
|
||||
end,
|
||||
|
||||
-- Sort file names with numbers in a more intuitive order for humans.
|
||||
-- Can be "fast", true, or false. "fast" will turn it off for large directories.
|
||||
natural_order = "fast",
|
||||
|
||||
-- Sort file and directory names case insensitive
|
||||
case_insensitive = false,
|
||||
|
||||
sort = {
|
||||
-- sort order can be "asc" or "desc"
|
||||
-- see :help oil-columns to see which columns are sortable
|
||||
{ "type", "asc" },
|
||||
{ "name", "asc" },
|
||||
},
|
||||
|
||||
-- Customize the highlight group for the file name
|
||||
highlight_filename = function(entry, is_hidden, is_link_target, is_link_orphan)
|
||||
return nil
|
||||
end,
|
||||
},
|
||||
|
||||
-- Configuration for the floating window in oil.open_float
|
||||
float = {
|
||||
border = "solid"
|
||||
},
|
||||
|
||||
-- Configuration for the floating action confirmation window
|
||||
confirmation = {
|
||||
border = "solid"
|
||||
},
|
||||
-- Configuration for the floating progress window
|
||||
progress = {
|
||||
border = "solid"
|
||||
},
|
||||
-- Configuration for the floating SSH window
|
||||
ssh = {
|
||||
border = "solid"
|
||||
},
|
||||
-- Configuration for the floating keymaps help window
|
||||
keymaps_help = {
|
||||
border = "solid"
|
||||
}
|
||||
}
|
||||
|
||||
map('n', '-', '<cmd>Oil<CR>')
|
||||
end
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
return { 'ahmedkhalf/project.nvim',
|
||||
disable = vim.version().minor < 5,
|
||||
disable = true,
|
||||
-- disable = vim.fn.has("nvim-0.5.0"),
|
||||
function()
|
||||
require('project_nvim').setup {
|
||||
patterns = {
|
||||
|
@ -1,13 +0,0 @@
|
||||
-- yea it's a bit flashy, but it's genuenly useful to be able to tell where my
|
||||
-- cursor has gone
|
||||
return { 'sphamba/smear-cursor.nvim',
|
||||
disable = vim.version.lt(vim.version(), { 0, 10, 2 }) or vim.g.neovide_version,
|
||||
function()
|
||||
require('smear_cursor').setup {
|
||||
stiffness = 0.8, -- 0.6 [0, 1]
|
||||
trailing_stiffness = 0.5, -- 0.3 [0, 1]
|
||||
distance_stop_animating = 0.5, -- 0.1 > 0
|
||||
hide_target_hack = false -- true boolean
|
||||
}
|
||||
end
|
||||
}
|
@ -2,12 +2,12 @@ local misc = require('core.misc')
|
||||
local map = misc.map
|
||||
|
||||
return { 'nvim-telescope/telescope.nvim',
|
||||
disable = vim.version().minor < 9,
|
||||
disable = not vim.fn.has("nvim-0.9.0"),
|
||||
requires = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
{ 'nvim-telescope/telescope-fzf-native.nvim',
|
||||
config = function()
|
||||
vim.cmd.make()
|
||||
vim.cmd("make")
|
||||
end
|
||||
}
|
||||
},
|
||||
@ -48,14 +48,8 @@ return { 'nvim-telescope/telescope.nvim',
|
||||
["<esc>"] = actions.close,
|
||||
['<C-j>'] = actions.move_selection_next,
|
||||
['<C-k>'] = actions.move_selection_previous,
|
||||
['<C-l>'] = actions.select_default,
|
||||
['<C-u>'] = actions.preview_scrolling_up,
|
||||
['<C-d>'] = actions.preview_scrolling_down,
|
||||
["<C-p>"] = action_layout.toggle_preview
|
||||
},
|
||||
n = {
|
||||
["gg"] = actions.move_to_top,
|
||||
["G"] = actions.move_to_bottom,
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -77,7 +71,7 @@ return { 'nvim-telescope/telescope.nvim',
|
||||
desc = 'Find string in current buffer.',
|
||||
})
|
||||
map('n', '<leader>i', telebuilt.help_tags, {
|
||||
desc = 'Fuzzy find over help tags.',
|
||||
desc = 'find help tags.',
|
||||
})
|
||||
|
||||
-- find over specific directories
|
||||
@ -85,12 +79,12 @@ return { 'nvim-telescope/telescope.nvim',
|
||||
require('telescope.builtin').find_files {
|
||||
cwd = vim.fn.stdpath("config")
|
||||
}
|
||||
end, { desc = "Fuzzy find over files in my config" })
|
||||
end, { desc = "find config files" })
|
||||
map('n', '<leader>tp', function()
|
||||
require('telescope.builtin').find_files {
|
||||
cwd = vim.fs.joinpath(vim.fn.stdpath("data"), "site/pack/deps/opt")
|
||||
}
|
||||
end, { desc = "Fuzzy find over files in my plugin directory" })
|
||||
end, { desc = "find files in plugin directory" })
|
||||
|
||||
-- enable previewing in the default colorscheme switcher
|
||||
telebuilt.colorscheme = function()
|
||||
|
@ -1,11 +1,6 @@
|
||||
local branch = nil
|
||||
if vim.version().minor < 8 then
|
||||
branch = 'neovim-pre-0.8.0'
|
||||
end
|
||||
|
||||
return { 'folke/todo-comments.nvim',
|
||||
requires = 'nvim-lua/plenary.nvim',
|
||||
branch = branch,
|
||||
disable = not vim.fn.has("nvim-0.8.0"),
|
||||
function()
|
||||
require('todo-comments').setup {
|
||||
keywords = {
|
||||
|
@ -8,9 +8,9 @@ table.contains = function(self, string)
|
||||
end
|
||||
|
||||
return { 'nvim-treesitter/nvim-treesitter',
|
||||
disable = vim.version().minor < 10,
|
||||
disable = not vim.fn.has("nvim-0.10.0"),
|
||||
config = function()
|
||||
vim.cmd.TSUpdate()
|
||||
vim.cmd("TSUpdate")
|
||||
end,
|
||||
function()
|
||||
require('nvim-treesitter.configs').setup {
|
||||
|
@ -2,7 +2,7 @@ local misc = require('core.misc')
|
||||
local map = misc.map
|
||||
|
||||
return { 'Wansmer/treesj',
|
||||
disable = vim.version().minor < 9,
|
||||
disable = not vim.fn.has("nvim-0.9.0"),
|
||||
requires = 'nvim-treesitter/nvim-treesitter',
|
||||
function()
|
||||
require('treesj').setup {
|
||||
|
@ -1,6 +1,9 @@
|
||||
return { 'windwp/nvim-ts-autotag',
|
||||
requires = 'nvim-telescope/telescope.nvim',
|
||||
disable = vim.version.lt(vim.version(), { 0, 9, 5 }),
|
||||
requires = {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
'nvim-treesitter/nvim-treesitter'
|
||||
},
|
||||
disable = not vim.fn.has("nvim-0.9.5"),
|
||||
|
||||
function()
|
||||
require('nvim-ts-autotag').setup {}
|
||||
|
Reference in New Issue
Block a user