summaryrefslogtreecommitdiffstats
path: root/lua/conf/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'lua/conf/plugins')
-rw-r--r--lua/conf/plugins/cmp.lua66
-rw-r--r--lua/conf/plugins/comment.lua6
-rw-r--r--lua/conf/plugins/dap.lua46
-rw-r--r--lua/conf/plugins/dressing.lua19
-rw-r--r--lua/conf/plugins/fidget.lua4
-rw-r--r--lua/conf/plugins/gitsigns.lua64
-rw-r--r--lua/conf/plugins/harpoon.lua10
-rw-r--r--lua/conf/plugins/headlines.lua21
-rw-r--r--lua/conf/plugins/helpful.lua1
-rw-r--r--lua/conf/plugins/hml.lua5
-rw-r--r--lua/conf/plugins/instant.lua2
-rw-r--r--lua/conf/plugins/jdtls.lua81
-rw-r--r--lua/conf/plugins/leetcode.lua14
-rw-r--r--lua/conf/plugins/lsp_lines.lua4
-rw-r--r--lua/conf/plugins/luasnip.lua14
-rw-r--r--lua/conf/plugins/mason-lspconfig.lua34
-rw-r--r--lua/conf/plugins/mason.lua6
-rw-r--r--lua/conf/plugins/mellow.lua16
-rw-r--r--lua/conf/plugins/mini-clue.lua52
-rw-r--r--lua/conf/plugins/neogen.lua12
-rw-r--r--lua/conf/plugins/neorg.lua42
-rw-r--r--lua/conf/plugins/nvim-colorizer.lua4
-rw-r--r--lua/conf/plugins/nyooom.lua6
-rw-r--r--lua/conf/plugins/oil.lua110
-rw-r--r--lua/conf/plugins/project.lua18
-rw-r--r--lua/conf/plugins/telescope.lua79
-rw-r--r--lua/conf/plugins/todo-comments.lua6
-rw-r--r--lua/conf/plugins/treesitter.lua8
-rw-r--r--lua/conf/plugins/treesj.lua10
-rw-r--r--lua/conf/plugins/ts-autotag.lua9
-rw-r--r--lua/conf/plugins/undotree.lua4
-rw-r--r--lua/conf/plugins/vimtex.lua2
32 files changed, 370 insertions, 405 deletions
diff --git a/lua/conf/plugins/cmp.lua b/lua/conf/plugins/cmp.lua
index d6d7766..c83a2c9 100644
--- a/lua/conf/plugins/cmp.lua
+++ b/lua/conf/plugins/cmp.lua
@@ -1,38 +1,38 @@
-local lsp = require('core.lsp.functions')
+local lsp = require("core.lsp.functions")
-return { 'hrsh7th/nvim-cmp',
+return { "hrsh7th/nvim-cmp",
requires = {
- 'nvim-treesitter/nvim-treesitter',
- 'lukas-reineke/cmp-under-comparator', -- better results
- 'xzbdmw/colorful-menu.nvim' -- fancy colors
+ "nvim-treesitter/nvim-treesitter",
+ "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',
+ "hrsh7th/cmp-buffer", -- buffers
+ "FelipeLema/cmp-async-path", -- path
+ { "hrsh7th/cmp-nvim-lsp",
function()
-- add lsp capabilities
- lsp.add_capabilities(require('cmp_nvim_lsp').default_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'
+ "hrsh7th/cmp-nvim-lsp-signature-help", -- completion information
+ { "L3MON4D3/cmp-luasnip-choice", -- luasnip
+ requires = "L3MON4D3/LuaSnip"
}
},
function()
- local cmp = require('cmp')
- local luasnip = require('luasnip')
+ local cmp = require("cmp")
+ local luasnip = require("luasnip")
-- setup cmp
cmp.setup {
-- disable when in comments
enabled = function()
- local context = require('cmp.config.context')
- if vim.api.nvim_get_mode().mode == 'c' then
+ local context = require("cmp.config.context")
+ if vim.api.nvim_get_mode().mode == "c" then
return true
else
return not context.in_treesitter_capture("comment")
@@ -42,12 +42,12 @@ return { 'hrsh7th/nvim-cmp',
-- completion sources
sources = cmp.config.sources {
- { name = 'nvim_lsp', priority = 999 },
- { name = 'luasnip_choice', priority = 750 },
- { name = 'buffer', max_item_count = 3 },
- { name = 'async_path', max_item_count = 5 },
- { name = 'neorg' },
- { name = 'nvim_lsp_signature_help' }
+ { name = "nvim_lsp", priority = 999 },
+ { name = "luasnip_choice", priority = 750 },
+ { name = "buffer", max_item_count = 3 },
+ { name = "async_path", max_item_count = 5 },
+ { name = "neorg" },
+ { name = "nvim_lsp_signature_help" }
},
-- how to sort results
@@ -56,7 +56,7 @@ return { 'hrsh7th/nvim-cmp',
cmp.config.compare.exact,
cmp.config.compare.offset,
cmp.config.compare.score,
- require('cmp-under-comparator').under,
+ require("cmp-under-comparator").under,
cmp.config.compare.kind,
cmp.config.compare.sort_text,
cmp.config.compare.length,
@@ -68,11 +68,11 @@ return { 'hrsh7th/nvim-cmp',
window = {
completion = {
scrollbar = false,
- border = 'solid',
+ border = vim.g.border_style,
winhighlight = "Normal:WinBarNC,FloatBorder:WinBarNC,Search:WinBarNC",
},
documentation = {
- border = 'solid',
+ border = vim.g.border_style,
winhighlight = "Normal:WinBarNC,FloatBorder:WinBarNC,Search:WinBarNC",
}
},
@@ -80,22 +80,22 @@ return { 'hrsh7th/nvim-cmp',
-- position of window
view = {
entries = {
- name = 'custom',
- selection_order = 'near_cursor'
+ name = "custom",
+ selection_order = "near_cursor"
}
},
-- formatting of content
formatting = {
- fields = { 'menu', 'abbr', 'kind' },
+ fields = { "menu", "abbr", "kind" },
format = function(entry, item)
local hl_info = require("colorful-menu").cmp_highlights(entry)
local menu_icon = {
- nvim_lsp = 'λ',
- luasnip = '%',
- buffer = '@',
- path = '#',
- async_path = '#'
+ nvim_lsp = "λ",
+ luasnip = "%",
+ buffer = "@",
+ path = "#",
+ async_path = "#"
}
-- add a little icon
diff --git a/lua/conf/plugins/comment.lua b/lua/conf/plugins/comment.lua
index 9a6373d..b91cf4f 100644
--- a/lua/conf/plugins/comment.lua
+++ b/lua/conf/plugins/comment.lua
@@ -1,7 +1,7 @@
-return { 'numToStr/Comment.nvim',
+return { "numToStr/Comment.nvim",
function()
- require('Comment').setup {
- ignore = '^$'
+ require("Comment").setup {
+ ignore = "^$"
}
end
}
diff --git a/lua/conf/plugins/dap.lua b/lua/conf/plugins/dap.lua
index 5fafd92..7cb4903 100644
--- a/lua/conf/plugins/dap.lua
+++ b/lua/conf/plugins/dap.lua
@@ -1,50 +1,50 @@
-local misc = require('core.misc')
+local misc = require("core.misc")
local map = misc.map
-return { 'mfussenegger/nvim-dap',
+return { "mfussenegger/nvim-dap",
requires = {
- 'williamboman/mason.nvim',
- 'nvim-telescope/telescope.nvim',
+ "williamboman/mason.nvim",
+ "nvim-telescope/telescope.nvim",
},
disable = not vim.fn.has("nvim-0.8.0"),
- branch = '0.8.0',
+ branch = "0.8.0",
function()
local dap = require("dap")
local codelldb_port = 13000
dap.adapters.codelldb = {
- type = 'server',
- host = '127.0.0.1',
+ type = "server",
+ host = "127.0.0.1",
port = codelldb_port,
executable = {
- command = require('mason-registry').get_package('codelldb'):get_install_path()..'/codelldb',
- args = { '--port', codelldb_port }
+ command = require("mason-registry").get_package("codelldb"):get_install_path().."/codelldb",
+ args = { "--port", codelldb_port }
}
}
dap.configurations.c = {
{
- name = 'LLDB: Launch',
- type = 'codelldb',
- request = 'launch',
+ name = "LLDB: Launch",
+ type = "codelldb",
+ request = "launch",
program = function()
- return vim.fn.input('Path to executable: ', vim.fn.getcwd()..'/', 'file')
+ return vim.fn.input("Path to executable: ", vim.fn.getcwd().."/", "file")
end,
- cwd = '${workspaceFolder}',
+ cwd = "${workspaceFolder}",
stopOnEntry = false,
args = {},
- console = 'integratedTerminal'
+ console = "integratedTerminal"
}
}
- 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" })
+ 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
}
diff --git a/lua/conf/plugins/dressing.lua b/lua/conf/plugins/dressing.lua
deleted file mode 100644
index 75e4a44..0000000
--- a/lua/conf/plugins/dressing.lua
+++ /dev/null
@@ -1,19 +0,0 @@
-local branch = nil
-if vim.fn.has("nvim-0.7.0") then
- branch = 'nvim-0.7'
-elseif vim.fn.has("nvim-0.5.0") then
- branch = 'nvim-0.5'
-end
-
-return { 'stevearc/dressing.nvim',
- disable = true or not vim.fn.has("nvim-0.5.0"),
- branch = branch,
- requires = 'nvim-telescope/telescope.nvim',
- function()
- require('dressing').setup {
- input = {
- enabled = false
- }
- }
- end
-}
diff --git a/lua/conf/plugins/fidget.lua b/lua/conf/plugins/fidget.lua
index b4bfbac..02977ba 100644
--- a/lua/conf/plugins/fidget.lua
+++ b/lua/conf/plugins/fidget.lua
@@ -1,11 +1,11 @@
-return { 'j-hui/fidget.nvim',
+return { "j-hui/fidget.nvim",
disable = not vim.fn.has("nvim-0.9.0"),
branch = "v1.5.0",
function()
local notification_defaults = require("fidget.notification").default_config
notification_defaults["icon"] = ""
- require('fidget').setup {
+ require("fidget").setup {
progress = {
display = {
progress_icon = {
diff --git a/lua/conf/plugins/gitsigns.lua b/lua/conf/plugins/gitsigns.lua
index a92264e..b420746 100644
--- a/lua/conf/plugins/gitsigns.lua
+++ b/lua/conf/plugins/gitsigns.lua
@@ -1,19 +1,19 @@
-local misc = require('core.misc')
+local misc = require("core.misc")
local map = misc.map
-return { 'lewis6991/gitsigns.nvim',
+return { "lewis6991/gitsigns.nvim",
disable = not vim.fn.has("nvim-0.9.0"),
function()
local gs = require("gitsigns")
gs.setup {
signs = {
- add = { text = '│' },
- change = { text = '│' },
- delete = { text = '-' },
- topdelete = { text = '‾' },
- changedelete = { text = '~' },
- untracked = { text = '┆' }
+ add = { text = "│" },
+ change = { text = "│" },
+ delete = { text = "-" },
+ topdelete = { text = "‾" },
+ changedelete = { text = "~" },
+ untracked = { text = "┆" }
},
signcolumn = true,
@@ -27,51 +27,51 @@ return { 'lewis6991/gitsigns.nvim',
},
attach_to_untracked = true,
- current_line_blame_formatter = '<author>, <author_time:%Y-%m-%d> - <summary>',
+ current_line_blame_formatter = "<author>, <author_time:%Y-%m-%d> - <summary>",
- preview_config = { border = 'solid' },
+ preview_config = { border = vim.g.border_style },
on_attach = function(bufnr)
local opts = { buffer = bufnr }
-- Navigation
- map('n', ']c', function()
+ map("n", "]c", function()
if vim.wo.diff then
- return ']c'
+ return "]c"
end
vim.schedule(function() gs.next_hunk() end)
- return '<Ignore>'
+ return "<Ignore>"
end, { expr = true, buffer = bufnr })
- map('n', '[c', function()
+ map("n", "[c", function()
if vim.wo.diff then
- return '[c'
+ return "[c"
end
vim.schedule(function() gs.prev_hunk() end)
- return '<Ignore>'
+ return "<Ignore>"
end, { expr = true, buffer = bufnr })
-- Actions
- map('n', '<leader>hs', gs.stage_hunk, opts)
- map('n', '<leader>hr', gs.reset_hunk, opts)
- map('v', '<leader>hs', function()
- gs.stage_hunk { vim.fn.line('.'), vim.fn.line('v') }
+ map("n", "<leader>hs", gs.stage_hunk, opts)
+ map("n", "<leader>hr", gs.reset_hunk, opts)
+ map("v", "<leader>hs", function()
+ gs.stage_hunk { vim.fn.line("."), vim.fn.line("v") }
end, opts)
- map('v', '<leader>hr', function()
- gs.reset_hunk { vim.fn.line('.'), vim.fn.line('v') }
+ map("v", "<leader>hr", function()
+ gs.reset_hunk { vim.fn.line("."), vim.fn.line("v") }
end, opts)
- map('n', '<leader>hS', gs.stage_buffer, opts)
- map('n', '<leader>hu', gs.undo_stage_hunk, opts)
- map('n', '<leader>hR', gs.reset_buffer, opts)
- map('n', '<leader>hp', gs.preview_hunk, opts)
- map('n', '<leader>hb', function() gs.blame_line { full=true } end, opts)
- map('n', '<leader>tb', gs.toggle_current_line_blame, opts)
- map('n', '<leader>hd', gs.diffthis, opts)
- map('n', '<leader>hD', function() gs.diffthis('~') end, opts)
- map('n', '<leader>td', gs.toggle_deleted, opts)
+ map("n", "<leader>hS", gs.stage_buffer, opts)
+ map("n", "<leader>hu", gs.undo_stage_hunk, opts)
+ map("n", "<leader>hR", gs.reset_buffer, opts)
+ map("n", "<leader>hp", gs.preview_hunk, opts)
+ map("n", "<leader>hb", function() gs.blame_line { full=true } end, opts)
+ map("n", "<leader>tb", gs.toggle_current_line_blame, opts)
+ map("n", "<leader>hd", gs.diffthis, opts)
+ map("n", "<leader>hD", function() gs.diffthis("~") end, opts)
+ map("n", "<leader>td", gs.toggle_deleted, opts)
-- Text object
- map({ 'o', 'x' }, 'ih', ':<C-U>Gitsigns select_hunk<CR>', opts)
+ map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>", opts)
end
}
end
diff --git a/lua/conf/plugins/harpoon.lua b/lua/conf/plugins/harpoon.lua
index c26964a..b4b2330 100644
--- a/lua/conf/plugins/harpoon.lua
+++ b/lua/conf/plugins/harpoon.lua
@@ -1,11 +1,11 @@
-local misc = require('core.misc')
+local misc = require("core.misc")
local map = misc.map
-return { 'ThePrimeagen/harpoon',
+return { "ThePrimeagen/harpoon",
disable = not vim.fn.has("nvim-0.8.0"),
- commit = 'e76cb03',
- branch = 'harpoon2',
- requires = 'nvim-lua/plenary.nvim',
+ commit = "e76cb03",
+ branch = "harpoon2",
+ requires = "nvim-lua/plenary.nvim",
function()
local harpoon = require("harpoon")
diff --git a/lua/conf/plugins/headlines.lua b/lua/conf/plugins/headlines.lua
deleted file mode 100644
index e2dedd6..0000000
--- a/lua/conf/plugins/headlines.lua
+++ /dev/null
@@ -1,21 +0,0 @@
-return { 'lukas-reineke/headlines.nvim',
- requires = 'nvim-treesitter/nvim-treesitter',
- function()
- require('headlines').setup {
- norg = {
- 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"
- },
- bullets = { "", "", "", "" },
- },
- markdown = {
- headline_highlights = false
- }
- }
- end
-}
diff --git a/lua/conf/plugins/helpful.lua b/lua/conf/plugins/helpful.lua
new file mode 100644
index 0000000..5d9b639
--- /dev/null
+++ b/lua/conf/plugins/helpful.lua
@@ -0,0 +1 @@
+return { "tweekmonster/helpful.vim" }
diff --git a/lua/conf/plugins/hml.lua b/lua/conf/plugins/hml.lua
new file mode 100644
index 0000000..8c605c4
--- /dev/null
+++ b/lua/conf/plugins/hml.lua
@@ -0,0 +1,5 @@
+return { "mawkler/hml.nvim",
+ function()
+ require("hml").setup {}
+ end
+}
diff --git a/lua/conf/plugins/instant.lua b/lua/conf/plugins/instant.lua
index 6866e71..d8dd9eb 100644
--- a/lua/conf/plugins/instant.lua
+++ b/lua/conf/plugins/instant.lua
@@ -1,4 +1,4 @@
-return { 'jbyuki/instant.nvim',
+return { "jbyuki/instant.nvim",
function()
vim.g.instant_username = "squibid"
end
diff --git a/lua/conf/plugins/jdtls.lua b/lua/conf/plugins/jdtls.lua
index b6dbd72..463fb23 100644
--- a/lua/conf/plugins/jdtls.lua
+++ b/lua/conf/plugins/jdtls.lua
@@ -1,64 +1,64 @@
-local misc = require('core.misc')
-local lsp = require('core.lsp.functions')
+local misc = require("core.misc")
+local lsp = require("core.lsp.functions")
local map, auto = misc.map, misc.auto
-return { 'mfussenegger/nvim-jdtls',
+return { "mfussenegger/nvim-jdtls",
disable = not vim.fn.has("nvim-0.6.0"),
- requires = 'mfussenegger/nvim-dap',
+ requires = "mfussenegger/nvim-dap",
function()
auto("FileType", {
pattern = "java",
callback = function()
- local jdtls = require('jdtls')
- local jdtls_install = require('mason-registry').get_package('jdtls'):get_install_path()
+ local jdtls = require("jdtls")
+ local jdtls_install = require("mason-registry").get_package("jdtls"):get_install_path()
-- make sure to check if things with 💀 need updating
local config = {
cmd = {
- 'java', -- 💀
- '-jar', vim.fn.glob(jdtls_install..'/plugins/org.eclipse.equinox.launcher_*.jar'), -- 💀
- '-configuration', jdtls_install..'/config_linux',
- '-data', vim.fn.stdpath('cache')..'/nvim-jdtls',
+ "/usr/lib/jvm/openjdk21/bin/java", -- 💀
+ "-jar", vim.fn.glob(jdtls_install.."/plugins/org.eclipse.equinox.launcher_*.jar"), -- 💀
+ "-configuration", jdtls_install.."/config_linux",
+ "-data", vim.fn.stdpath("cache").."/nvim-jdtls",
- '--add-modules=ALL-SYSTEM',
- '--add-opens', 'java.base/java.lang=ALL-UNNAMED',
- '--add-opens', 'java.base/java.util=ALL-UNNAMED',
- '-Declipse.application=org.eclipse.jdt.ls.core.id1',
- '-Declipse.product=org.eclipse.jdt.ls.core.product',
- '-Dlog.level=ALL',
- '-Dlog.protocol=true',
- '-Dosgi.bundles.defaultStartLevel=4',
- '-Xmx1G',
+ "--add-modules=ALL-SYSTEM",
+ "--add-opens", "java.base/java.lang=ALL-UNNAMED",
+ "--add-opens", "java.base/java.util=ALL-UNNAMED",
+ "-Declipse.application=org.eclipse.jdt.ls.core.id1",
+ "-Declipse.product=org.eclipse.jdt.ls.core.product",
+ "-Dlog.level=ALL",
+ "-Dlog.protocol=true",
+ "-Dosgi.bundles.defaultStartLevel=4",
+ "-Xmx1G",
},
root_dir = vim.fs.dirname(vim.fs.find({
- 'gradlew',
- '.git',
- 'mvnw',
- 'settings.gradle', -- Gradle (multi-project)
- 'settings.gradle.kts', -- Gradle (multi-project)
- 'build.xml', -- Ant
- 'pom.xml', -- Maven
+ "gradlew",
+ ".git",
+ "mvnw",
+ "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
+ -- don"t print out status messages
handlers = {
- ['language/status'] = function() end
+ ["language/status"] = function() end
},
on_attach = function(_, bufnr)
-- add some jdtls specific mappings
local opts = { buffer = bufnr }
- map('n', 'cri', jdtls.organize_imports, opts)
- map('n', 'crv', jdtls.extract_variable, opts)
- map('n', 'crc', jdtls.extract_constant, opts)
- map('x', 'crv', function() jdtls.extract_variable(true) end, opts)
- map('x', 'crc', function() jdtls.extract_constant(true) end, opts)
- map('x', 'crm', function() jdtls.extract_method(true) end, opts)
+ map("n", "cri", jdtls.organize_imports, opts)
+ map("n", "crv", jdtls.extract_variable, opts)
+ map("n", "crc", jdtls.extract_constant, opts)
+ map("x", "crv", function() jdtls.extract_variable(true) end, opts)
+ map("x", "crc", function() jdtls.extract_constant(true) end, opts)
+ map("x", "crm", function() jdtls.extract_method(true) end, opts)
pcall(vim.lsp.codelens.refresh)
- auto('BufWritePost', {
+ auto("BufWritePost", {
buffer = bufnr,
- desc = 'refresh codelens',
+ desc = "refresh codelens",
callback = function()
pcall(vim.lsp.codelens.refresh)
end
@@ -88,7 +88,7 @@ return { 'mfussenegger/nvim-jdtls',
end
-- compile our code
- vim.system({ 'javac', src_path, '-d', vim.fn.stdpath("cache") }, {}, function(out)
+ vim.system({ "javac", src_path, "-d", vim.fn.stdpath("cache") }, {}, function(out)
if out.code ~= 0 then
cache_path = nil
end
@@ -98,7 +98,7 @@ return { 'mfussenegger/nvim-jdtls',
-- check if we have a compiled version of JavaVersion
local f, _ = io.open(cache_path, "r")
- if not f then -- if we don't have a cache
+ if not f then -- if we don"t have a cache
build_cache()
else
io.close(f)
@@ -118,12 +118,15 @@ return { 'mfussenegger/nvim-jdtls',
on_exit = function(_, exit_code, _)
local v = vim.version.parse(table.concat(buffer))
- -- if there's an error, no version info, or the java version is
+ -- if there"s an error, no version info, or the java version is
-- less than 17 stop the lsp from starting
if exit_code ~= 0 then
vim.notify(string.format(
"java version check failed: exit code %s", exit_code),
vim.log.levels.ERROR, { title = misc.appid })
+ vim.notify(string.format(
+ "%s", vim.inspect(buffer)),
+ vim.log.levels.ERROR, { title = misc.appid })
return
elseif not v then
vim.notify("no java version info found", vim.log.levels.ERROR,
diff --git a/lua/conf/plugins/leetcode.lua b/lua/conf/plugins/leetcode.lua
index 7619c84..9276295 100644
--- a/lua/conf/plugins/leetcode.lua
+++ b/lua/conf/plugins/leetcode.lua
@@ -1,16 +1,16 @@
-return { 'kawre/leetcode.nvim',
+return { "kawre/leetcode.nvim",
requires = {
- 'nvim-lua/plenary.nvim',
- 'nvim-telescope/telescope.nvim',
- 'MunifTanjim/nui.nvim',
- 'nvim-treesitter/nvim-treesitter'
+ "nvim-lua/plenary.nvim",
+ "nvim-telescope/telescope.nvim",
+ "MunifTanjim/nui.nvim",
+ "nvim-treesitter/nvim-treesitter"
},
config = function()
- -- because we're using treesitter make sure to install the html parser
+ -- because we"re using treesitter make sure to install the html parser
vim.cmd("TSUpdate html")
end,
function()
- require('leetcode').setup {
+ require("leetcode").setup {
lang = "java"
}
end
diff --git a/lua/conf/plugins/lsp_lines.lua b/lua/conf/plugins/lsp_lines.lua
index 9ccaa73..5a0a0ca 100644
--- a/lua/conf/plugins/lsp_lines.lua
+++ b/lua/conf/plugins/lsp_lines.lua
@@ -1,4 +1,4 @@
-return { 'whynothugo/lsp_lines',
- url = 'https://git.sr.ht/~whynothugo/lsp_lines.nvim',
+return { "whynothugo/lsp_lines",
+ url = "https://git.sr.ht/~whynothugo/lsp_lines.nvim",
disable = not vim.fn.has("nvim-0.8.0")
}
diff --git a/lua/conf/plugins/luasnip.lua b/lua/conf/plugins/luasnip.lua
index 169ec5d..e5d2a0b 100644
--- a/lua/conf/plugins/luasnip.lua
+++ b/lua/conf/plugins/luasnip.lua
@@ -1,14 +1,14 @@
-local misc = require('core.misc')
+local misc = require("core.misc")
local map = misc.map
-return { 'L3MON4D3/LuaSnip',
- branch = 'v2.3.0',
+return { "L3MON4D3/LuaSnip",
+ branch = "v2.3.0",
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')
+ local luasnip = require("luasnip")
local types = require("luasnip.util.types")
luasnip.config.set_config {
@@ -57,8 +57,8 @@ return { 'L3MON4D3/LuaSnip',
-- load all snippets from snippet directory
for _, file in ipairs(vim.api.nvim_get_runtime_file("lua/snippets/*.lua", true)) do
- local fn = file:gsub('^.*/', ''):gsub('%.lua$', '')
- local ret = misc.include('snippets.'..fn)
+ local fn = file:gsub("^.*/", ""):gsub("%.lua$", "")
+ local ret = misc.include("snippets."..fn)
if type(ret) ~= "boolean" then
luasnip.add_snippets(fn, ret, { key = fn })
end
diff --git a/lua/conf/plugins/mason-lspconfig.lua b/lua/conf/plugins/mason-lspconfig.lua
index ceedb6c..c4e4684 100644
--- a/lua/conf/plugins/mason-lspconfig.lua
+++ b/lua/conf/plugins/mason-lspconfig.lua
@@ -1,11 +1,11 @@
-local misc = require('core.misc')
-local lsp = require('core.lsp.functions')
+local misc = require("core.misc")
+local lsp = require("core.lsp.functions")
local map = misc.map
-return { 'williamboman/mason-lspconfig.nvim',
+return { "williamboman/mason-lspconfig.nvim",
requires = {
- 'williamboman/mason.nvim',
- { 'neovim/nvim-lspconfig',
+ "williamboman/mason.nvim",
+ { "neovim/nvim-lspconfig",
disable = not vim.fn.has("nvim-0.8.0"),
function()
lsp.setup()
@@ -13,15 +13,15 @@ return { 'williamboman/mason-lspconfig.nvim',
},
-- these two update some lsp capabilities and therefore must be run first
- -- 'hrsh7th/cmp-nvim-lsp',
- -- 'kevinhwang91/nvim-ufo'
+ -- "hrsh7th/cmp-nvim-lsp",
+ -- "kevinhwang91/nvim-ufo"
},
function()
- local lspconfig = require('lspconfig')
- local util = require('lspconfig.util')
+ local lspconfig = require("lspconfig")
+ local util = require("lspconfig.util")
-- setup language servers
- require('mason-lspconfig').setup {
+ require("mason-lspconfig").setup {
ensure_installed = {
"lua_ls",
"clangd",
@@ -42,9 +42,9 @@ return { 'williamboman/mason-lspconfig.nvim',
-- 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'
+ 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
@@ -53,10 +53,10 @@ return { 'williamboman/mason-lspconfig.nvim',
settings = {
Lua = {
diagnostics = {
- globals = { "vim", 'mp' }
+ globals = { "vim", "mp" }
},
runtime = {
- version = 'LuaJIT'
+ version = "LuaJIT"
},
format = {
enable = false
@@ -76,7 +76,7 @@ return { 'williamboman/mason-lspconfig.nvim',
return root
end
- root = util.root_pattern('lua/')(fname)
+ root = util.root_pattern("lua/")(fname)
if root then
return root
end
@@ -107,7 +107,7 @@ return { 'williamboman/mason-lspconfig.nvim',
usePlaceholders = true,
clangdFileStatus = true,
fallback_flags = {
- "-xc" -- makes clangd think we're using c instead of c++
+ "-xc" -- makes clangd think we"re using c instead of c++
}
}
}
diff --git a/lua/conf/plugins/mason.lua b/lua/conf/plugins/mason.lua
index 87e66a9..78742e9 100644
--- a/lua/conf/plugins/mason.lua
+++ b/lua/conf/plugins/mason.lua
@@ -1,11 +1,11 @@
-return { 'williamboman/mason.nvim',
+return { "williamboman/mason.nvim",
disable = not vim.fn.has("nvim-0.7.0"),
function()
- local mason = require('mason')
+ local mason = require("mason")
mason.setup {
ui = {
- border = "solid",
+ border = vim.g.border_style,
width = 0.8,
height = 0.9,
diff --git a/lua/conf/plugins/mellow.lua b/lua/conf/plugins/mellow.lua
index 02bf7fd..f0ebf82 100644
--- a/lua/conf/plugins/mellow.lua
+++ b/lua/conf/plugins/mellow.lua
@@ -1,6 +1,6 @@
-return { 'mellow-theme/mellow.nvim',
+return { "mellow-theme/mellow.nvim",
disable = not vim.fn.has("nvim-0.8.0"),
- requires = 'nvim-treesitter/nvim-treesitter',
+ requires = "nvim-treesitter/nvim-treesitter",
function()
vim.g.mellow_variant = "dark"
local c = require("mellow.colors")[vim.g.mellow_variant]
@@ -10,26 +10,26 @@ return { 'mellow-theme/mellow.nvim',
["NormalNC"] = { link = "Normal" },
-- make floats darker
- ["NormalFloat"] = { fg = c.fg, bg = c.bg_dark },
+ ["NormalFloat"] = { fg = c.fg, bg = "#111111" },
["FloatBorder"] = { link = "NormalFloat" },
-- neorg headings, looks extra good with lukas-reineke/headlines.nvim
["@neorg.headings.1.title"] = { fg = c.yellow, bg = "#2a211c" },
["@neorg.headings.1.icon"] = { link = "@neorg.headings.1.title" },
- ["@neorg.headings.2.title"] = { fg = c.blue, bg = '#201e25' },
+ ["@neorg.headings.2.title"] = { fg = c.blue, bg = "#201e25" },
["@neorg.headings.2.icon"] = { link = "@neorg.headings.2.title" },
- ["@neorg.headings.3.title"] = { fg = c.cyan, bg = '#2b1b20' },
+ ["@neorg.headings.3.title"] = { fg = c.cyan, bg = "#2b1b20" },
["@neorg.headings.3.icon"] = { link = "@neorg.headings.3.title" },
- ["@neorg.headings.4.title"] = { fg = c.green, bg = '#1d201e' },
+ ["@neorg.headings.4.title"] = { fg = c.green, bg = "#1d201e" },
["@neorg.headings.4.icon"] = { link = "@neorg.headings.4.title" },
- ["@neorg.headings.5.title"] = { fg = c.magenta, bg = '#251a21' },
+ ["@neorg.headings.5.title"] = { fg = c.magenta, bg = "#251a21" },
["@neorg.headings.5.icon"] = { link = "@neorg.headings.5.title" },
- ["@neorg.headings.6.title"] = { fg = c.white, bg = '#212126' },
+ ["@neorg.headings.6.title"] = { fg = c.white, bg = "#212126" },
["@neorg.headings.6.icon"] = { link = "@neorg.headings.6.title" },
-- make blink actually look nice
diff --git a/lua/conf/plugins/mini-clue.lua b/lua/conf/plugins/mini-clue.lua
deleted file mode 100644
index e2c3fa0..0000000
--- a/lua/conf/plugins/mini-clue.lua
+++ /dev/null
@@ -1,52 +0,0 @@
-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
-}
diff --git a/lua/conf/plugins/neogen.lua b/lua/conf/plugins/neogen.lua
index 19c3422..1a670df 100644
--- a/lua/conf/plugins/neogen.lua
+++ b/lua/conf/plugins/neogen.lua
@@ -1,19 +1,19 @@
-local misc = require('core.misc')
+local misc = require("core.misc")
local map = misc.map
-return { 'danymat/neogen',
+return { "danymat/neogen",
requires = {
- 'nvim-treesitter/nvim-treesitter',
- 'L3MON4D3/LuaSnip'
+ "nvim-treesitter/nvim-treesitter",
+ "L3MON4D3/LuaSnip"
},
function()
- local neogen = require('neogen')
+ local neogen = require("neogen")
neogen.setup {
enabled = true,
input_after_comment = true,
snippet_engine = "luasnip",
}
- map('n', '<leader>d', neogen.generate)
+ map("n", "<leader>d", neogen.generate)
end
}
diff --git a/lua/conf/plugins/neorg.lua b/lua/conf/plugins/neorg.lua
index 84a0b79..9193a84 100644
--- a/lua/conf/plugins/neorg.lua
+++ b/lua/conf/plugins/neorg.lua
@@ -1,7 +1,7 @@
-- WARNING: neorg does some pretty stupid stuff when it comes to the plugins it
--- wants (using luarocks), in order to get around all that bullshit I've
--- manually added it's dependencies. Because I don't want this to randomly break
--- I've also pinned neorg to the latest working version that I've messed around
+-- wants (using luarocks), in order to get around all that bullshit I"ve
+-- manually added it"s dependencies. Because I don"t want this to randomly break
+-- I"ve also pinned neorg to the latest working version that I"ve messed around
-- with.
--
-- NOTE: for my future self to update this thingy while not breaking
@@ -36,7 +36,7 @@ local function populate_workspaces(path, cache)
if string.sub(n, 1, 1) == "." or (t ~= "directory" and t ~= "link") then
goto continue
end
- -- make sure this still works if the last charachter in the path isn't a '/'
+ -- make sure this still works if the last charachter in the path isn"t a "/"
workspaces[n] = (string.sub(path, #path, #path) == "/") and path..n or path.."/"..n
::continue::
end
@@ -61,32 +61,32 @@ local function populate_workspaces(path, cache)
return workspaces
end
-return { 'nvim-neorg/neorg',
+return { "nvim-neorg/neorg",
disable = not vim.fn.has("nvim-0.10.0"),
- branch = 'v9.3.0',
+ branch = "v9.3.0",
requires = {
- 'nvim-lua/plenary.nvim',
- 'nvim-treesitter/nvim-treesitter',
- 'folke/zen-mode.nvim',
- 'hrsh7th/nvim-cmp',
- { 'nvim-neorg/neorg-telescope',
- requires = 'nvim-telescope/telescope.nvim'
+ "nvim-lua/plenary.nvim",
+ "nvim-treesitter/nvim-treesitter",
+ "folke/zen-mode.nvim",
+ "hrsh7th/nvim-cmp",
+ { "nvim-neorg/neorg-telescope",
+ requires = "nvim-telescope/telescope.nvim"
},
-- NOTE: these are usually installed by neorg via luarocks, the versions
-- 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'
+ { "nvim-neotest/nvim-nio",
+ branch = "v1.7.0"
},
- { 'nvim-neorg/lua-utils.nvim',
- branch = 'v1.0.2'
+ { "nvim-neorg/lua-utils.nvim",
+ branch = "v1.0.2"
},
- { 'MunifTanjim/nui.nvim',
- branch = '0.3.0'
+ { "MunifTanjim/nui.nvim",
+ branch = "0.3.0"
},
- { 'pysan3/pathlib.nvim',
- branch = 'v2.2.2'
+ { "pysan3/pathlib.nvim",
+ branch = "v2.2.2"
}
},
@@ -94,7 +94,7 @@ return { 'nvim-neorg/neorg',
local wsphome = (os.getenv("XDG_DOCUMENTS_DIR") or
(os.getenv("HOME").."/Documents")).."/notes/"
- require('neorg').setup {
+ require("neorg").setup {
load = {
-- not sure how to sort the modules so ima just put the empty ones first
["core.defaults"] = {},
diff --git a/lua/conf/plugins/nvim-colorizer.lua b/lua/conf/plugins/nvim-colorizer.lua
index 91fac13..fce26d7 100644
--- a/lua/conf/plugins/nvim-colorizer.lua
+++ b/lua/conf/plugins/nvim-colorizer.lua
@@ -1,7 +1,7 @@
-return { 'norcalli/nvim-colorizer.lua',
+return { "norcalli/nvim-colorizer.lua",
disable = not vim.fn.has("nvim-0.4.0") and not vim.fn.has("termguicolors"),
function()
- require('colorizer').setup(nil, {
+ require("colorizer").setup(nil, {
names = false,
css = true
})
diff --git a/lua/conf/plugins/nyooom.lua b/lua/conf/plugins/nyooom.lua
index c6da17a..00de6ca 100644
--- a/lua/conf/plugins/nyooom.lua
+++ b/lua/conf/plugins/nyooom.lua
@@ -1,7 +1,7 @@
-return { 'squibid/nyooom',
- url = 'https://git.squi.bid/nyooom',
+return { "squibid/nyooom",
+ url = "https://git.squi.bid/nyooom",
pin = true,
function()
- require('nyooom').setup {}
+ require("nyooom").setup {}
end
}
diff --git a/lua/conf/plugins/oil.lua b/lua/conf/plugins/oil.lua
index 5eeac4d..d985105 100644
--- a/lua/conf/plugins/oil.lua
+++ b/lua/conf/plugins/oil.lua
@@ -1,16 +1,85 @@
-local misc = require('core.misc')
+local misc = require("core.misc")
local map = misc.map
+-- helper function to parse output
+local function parse_output(proc)
+ local result = proc:wait()
+ local ret = {}
+ if result.code == 0 then
+ for line in vim.gsplit(result.stdout, "\n", { plain = true, trimempty = true }) do
+ -- Remove trailing slash
+ line = line:gsub("/$", "")
+ ret[line] = true
+ end
+ end
+ return ret
+end
+
+-- build git status cache
+local function new_git_status()
+ return setmetatable({}, {
+ __index = function(self, key)
+ local ignore_proc = vim.system(
+ { "git", "ls-files", "--ignored", "--exclude-standard", "--others", "--directory" },
+ {
+ cwd = key,
+ text = true,
+ }
+ )
+ local tracked_proc = vim.system({ "git", "ls-tree", "HEAD", "--name-only" }, {
+ cwd = key,
+ text = true,
+ })
+ local ret = {
+ ignored = parse_output(ignore_proc),
+ tracked = parse_output(tracked_proc),
+ }
+
+ rawset(self, key, ret)
+ return ret
+ end,
+ })
+end
+local git_status = new_git_status()
+
local permission_hlgroups = {
- ['-'] = 'NonText',
- ['r'] = 'DiagnosticSignWarn',
- ['w'] = 'DiagnosticSignHint',
- ['x'] = 'DiagnosticSignOk',
+ ["-"] = "NonText",
+ ["r"] = "DiagnosticSignWarn",
+ ["w"] = "DiagnosticSignHint",
+ ["x"] = "DiagnosticSignOk",
}
-return { 'stevearc/oil.nvim',
+return { "stevearc/oil.nvim",
disable = not vim.fn.has("nvim-0.8.0"),
+ deps = {
+ { "refractalize/oil-git-status.nvim",
+ function()
+ require("oil-git-status").setup {
+ symbols = { -- customize the symbols that appear in the git status columns
+ index = {
+ ["A"] = "+",
+ ["D"] = "-",
+ ["M"] = "~",
+ },
+ working_tree = {
+ ["A"] = "+",
+ ["D"] = "-",
+ ["M"] = "~",
+ }
+ }
+ }
+ end
+ }
+ },
function()
+ -- Clear git status cache on refresh
+ local refresh = require("oil.actions").refresh
+ local orig_refresh = refresh.callback
+ refresh.callback = function(...)
+ git_status = new_git_status()
+ orig_refresh(...)
+ end
+
require("oil").setup {
-- ID is automatically added at the beginning, and name at the end
-- See :help oil-columns
@@ -26,7 +95,7 @@ return { 'stevearc/oil.nvim',
return hls
end,
},
- { "size", highlight = '@number' }
+ { "size", highlight = "@number" }
},
-- Window-local options to use for oil buffers
@@ -34,7 +103,7 @@ return { 'stevearc/oil.nvim',
number = false,
relativenumber = false,
wrap = false,
- signcolumn = "no",
+ signcolumn = "yes:2",
cursorcolumn = false,
foldcolumn = "0",
spell = false,
@@ -100,11 +169,16 @@ return { 'stevearc/oil.nvim',
-- This function defines what is considered a "hidden" file
is_hidden_file = function(name, bufnr)
- if name == ".." then -- show previous directory
- return false
+ local dir = require("oil").get_current_dir(bufnr)
+ local is_dotfile = vim.startswith(name, ".") and name ~= ".."
+ -- if no local directory (e.g. for ssh connections), just hide dotfiles
+ if not dir then
+ return is_dotfile
+ end
+ -- dotfiles are considered hidden unless tracked
+ if is_dotfile then
+ return not git_status[dir].tracked[name]
end
- local m = name:match("^%.")
- return m ~= nil
end,
-- This function defines what will never be shown, even when `show_hidden` is set
@@ -134,27 +208,27 @@ return { 'stevearc/oil.nvim',
-- Configuration for the floating window in oil.open_float
float = {
- border = "solid"
+ border = vim.g.border_style
},
-- Configuration for the floating action confirmation window
confirmation = {
- border = "solid"
+ border = vim.g.border_style
},
-- Configuration for the floating progress window
progress = {
- border = "solid"
+ border = vim.g.border_style
},
-- Configuration for the floating SSH window
ssh = {
- border = "solid"
+ border = vim.g.border_style
},
-- Configuration for the floating keymaps help window
keymaps_help = {
- border = "solid"
+ border = vim.g.border_style
}
}
- map('n', '-', '<cmd>Oil<CR>')
+ map("n", "-", "<cmd>Oil<CR>")
end
}
diff --git a/lua/conf/plugins/project.lua b/lua/conf/plugins/project.lua
deleted file mode 100644
index 1075e4c..0000000
--- a/lua/conf/plugins/project.lua
+++ /dev/null
@@ -1,18 +0,0 @@
-return { 'ahmedkhalf/project.nvim',
- disable = true,
- -- disable = vim.fn.has("nvim-0.5.0"),
- function()
- require('project_nvim').setup {
- patterns = {
- ".git",
- "Makefile",
- "_darcs",
- ".hg",
- ".bzr",
- ".svn",
- "package.json",
- "README.md"
- }
- }
- end
-}
diff --git a/lua/conf/plugins/telescope.lua b/lua/conf/plugins/telescope.lua
index b08d65d..66c098a 100644
--- a/lua/conf/plugins/telescope.lua
+++ b/lua/conf/plugins/telescope.lua
@@ -1,55 +1,48 @@
-local misc = require('core.misc')
+local misc = require("core.misc")
local map = misc.map
-return { 'nvim-telescope/telescope.nvim',
+return { "nvim-telescope/telescope.nvim",
disable = not vim.fn.has("nvim-0.9.0"),
requires = {
- 'nvim-lua/plenary.nvim',
- { 'nvim-telescope/telescope-fzf-native.nvim',
+ "nvim-lua/plenary.nvim",
+ { "nvim-telescope/telescope-fzf-native.nvim",
config = function()
vim.cmd("make")
end
- }
+ },
+ "mollerhoj/telescope-recent-files.nvim",
+ "nvim-telescope/telescope-ui-select.nvim"
},
+
function()
local telescope = require("telescope")
- local actions = require('telescope.actions')
- local action_layout = require("telescope.actions.layout")
-
- local function telescopew()
- if vim.o.columns <= 80 then
- return vim.o.columns
- else
- return 0.8
- end
- end
+ local actions = require("telescope.actions")
telescope.setup {
defaults = {
borderchars = {
- prompt = { ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' },
- results = { ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' },
- preview = { ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' },
+ prompt = { " ", " ", " ", " ", " ", " ", " ", " " },
+ results = { " ", " ", " ", " ", " ", " ", " ", " " },
+ preview = { " ", " ", " ", " ", " ", " ", " ", " " },
},
winblend = 0,
- layout_strategy = 'horizontal',
- sorting_strategy = 'descending',
- scroll_strategy = 'limit',
+ layout_strategy = "horizontal",
+ sorting_strategy = "descending",
+ scroll_strategy = "limit",
layout_config = {
horizontal = {
- width = telescopew(),
height = 20,
- prompt_position = 'bottom',
- anchor = 'N',
+ prompt_position = "bottom",
+ anchor = "N",
}
},
mappings = {
i = {
["<esc>"] = actions.close,
- ['<C-j>'] = actions.move_selection_next,
- ['<C-k>'] = actions.move_selection_previous,
- ['<C-u>'] = actions.preview_scrolling_up,
- ['<C-d>'] = actions.preview_scrolling_down,
+ ["<C-j>"] = actions.move_selection_next,
+ ["<C-k>"] = actions.move_selection_previous,
+ ["<C-u>"] = actions.preview_scrolling_up,
+ ["<C-d>"] = actions.preview_scrolling_down,
}
}
},
@@ -59,29 +52,31 @@ return { 'nvim-telescope/telescope.nvim',
}
-- load in the fzf extension
- telescope.load_extension('fzf')
+ telescope.load_extension("fzf")
+ telescope.load_extension("recent-files")
+ telescope.load_extension("ui-select")
-- keymaps
- local telebuilt = require('telescope.builtin')
- map('n', '<leader>f', function()
- telebuilt.fd { follow = true }
- end, { desc = 'Find files.' })
- map('n', '<leader>s', telebuilt.live_grep, { desc = 'Find string in project.' })
- map('n', '<leader>b', telebuilt.current_buffer_fuzzy_find, {
- desc = 'Find string in current buffer.',
+ local telebuilt = require("telescope.builtin")
+ map("n", "<leader>f", function()
+ telescope.extensions["recent-files"].recent_files { follow = true }
+ end, { desc = "Find files." })
+ map("n", "<leader>s", telebuilt.live_grep, { desc = "Find string in project." })
+ map("n", "<leader>b", telebuilt.current_buffer_fuzzy_find, {
+ desc = "Find string in current buffer.",
})
- map('n', '<leader>i', telebuilt.help_tags, {
- desc = 'find help tags.',
+ map("n", "<leader>i", telebuilt.help_tags, {
+ desc = "find help tags.",
})
-- find over specific directories
- map('n', '<leader>tc', function()
- require('telescope.builtin').find_files {
+ map("n", "<leader>tc", function()
+ require("telescope.builtin").find_files {
cwd = vim.fn.stdpath("config")
}
end, { desc = "find config files" })
- map('n', '<leader>tp', function()
- require('telescope.builtin').find_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 = "find files in plugin directory" })
diff --git a/lua/conf/plugins/todo-comments.lua b/lua/conf/plugins/todo-comments.lua
index ebf724d..24eccd0 100644
--- a/lua/conf/plugins/todo-comments.lua
+++ b/lua/conf/plugins/todo-comments.lua
@@ -1,8 +1,8 @@
-return { 'folke/todo-comments.nvim',
- requires = 'nvim-lua/plenary.nvim',
+return { "folke/todo-comments.nvim",
+ requires = "nvim-lua/plenary.nvim",
disable = not vim.fn.has("nvim-0.8.0"),
function()
- require('todo-comments').setup {
+ require("todo-comments").setup {
keywords = {
FIX = {
icon = "# ",
diff --git a/lua/conf/plugins/treesitter.lua b/lua/conf/plugins/treesitter.lua
index b18ae49..d9607e3 100644
--- a/lua/conf/plugins/treesitter.lua
+++ b/lua/conf/plugins/treesitter.lua
@@ -7,13 +7,13 @@ table.contains = function(self, string)
return false
end
-return { 'nvim-treesitter/nvim-treesitter',
+return { "nvim-treesitter/nvim-treesitter",
disable = not vim.fn.has("nvim-0.10.0"),
config = function()
vim.cmd("TSUpdate")
end,
function()
- require('nvim-treesitter.configs').setup {
+ require("nvim-treesitter.configs").setup {
-- good default parsers
ensure_installed = { "c", "lua", "vim", "vimdoc", "markdown",
"markdown_inline", "java", "bash", "css", "html", "luadoc",
@@ -25,7 +25,7 @@ return { 'nvim-treesitter/nvim-treesitter',
enable = true,
disable = function(lang, _)
- -- disable indenting in php (it's more broken with than without)
+ -- disable indenting in php (it"s more broken with than without)
return table.contains(({
"php"
}), lang)
@@ -39,7 +39,7 @@ return { 'nvim-treesitter/nvim-treesitter',
additional_vim_regex_highlighting = true,
disable = function(lang, buf)
- -- disable in some files where vim's builtin highlighting is better
+ -- disable in some files where vim"s builtin highlighting is better
if table.contains(({
"diff", "tex"
}), lang) then
diff --git a/lua/conf/plugins/treesj.lua b/lua/conf/plugins/treesj.lua
index 4b3bae1..424c677 100644
--- a/lua/conf/plugins/treesj.lua
+++ b/lua/conf/plugins/treesj.lua
@@ -1,14 +1,14 @@
-local misc = require('core.misc')
+local misc = require("core.misc")
local map = misc.map
-return { 'Wansmer/treesj',
+return { "Wansmer/treesj",
disable = not vim.fn.has("nvim-0.9.0"),
- requires = 'nvim-treesitter/nvim-treesitter',
+ requires = "nvim-treesitter/nvim-treesitter",
function()
- require('treesj').setup {
+ require("treesj").setup {
use_default_keymaps = false,
}
- map('n', '<leader>j', require('treesj').toggle, { desc = 'fold code' })
+ map("n", "<leader>j", require("treesj").toggle, { desc = "fold code" })
end
}
diff --git a/lua/conf/plugins/ts-autotag.lua b/lua/conf/plugins/ts-autotag.lua
index 915ddad..5391d90 100644
--- a/lua/conf/plugins/ts-autotag.lua
+++ b/lua/conf/plugins/ts-autotag.lua
@@ -1,11 +1,8 @@
-return { 'windwp/nvim-ts-autotag',
- requires = {
- 'nvim-telescope/telescope.nvim',
- 'nvim-treesitter/nvim-treesitter'
- },
+return { "windwp/nvim-ts-autotag",
+ requires = "nvim-treesitter/nvim-treesitter",
disable = not vim.fn.has("nvim-0.9.5"),
function()
- require('nvim-ts-autotag').setup {}
+ require("nvim-ts-autotag").setup {}
end
}
diff --git a/lua/conf/plugins/undotree.lua b/lua/conf/plugins/undotree.lua
index 199ca06..fa57def 100644
--- a/lua/conf/plugins/undotree.lua
+++ b/lua/conf/plugins/undotree.lua
@@ -1,7 +1,7 @@
-local misc = require('core.misc')
+local misc = require("core.misc")
local map = misc.map
-return { 'mbbill/undotree',
+return { "mbbill/undotree",
function()
if vim.g.loaded_undotree then
vim.g.undotree_DiffAutoOpen = 0
diff --git a/lua/conf/plugins/vimtex.lua b/lua/conf/plugins/vimtex.lua
index c6514c2..660efda 100644
--- a/lua/conf/plugins/vimtex.lua
+++ b/lua/conf/plugins/vimtex.lua
@@ -1,4 +1,4 @@
-return { 'lervag/vimtex',
+return { "lervag/vimtex",
setup = function()
vim.g.vimtex_view_method = "zathura"
end