Remove separate config files by merging with plugin definition

Add noice.nvim for fancier ui
This commit is contained in:
Evie Litherland-Smith 2023-05-11 10:44:22 +01:00
parent be5bdb332c
commit 6b90efb5bb
48 changed files with 469 additions and 564 deletions

View file

@ -13,7 +13,67 @@ if not vim.loop.fs_stat(lazypath) then
}
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup(require "config.lazy")
require("lazy").setup {
root = vim.fn.stdpath "data" .. "/lazy",
spec = "plugins",
lockfile = vim.fn.stdpath "data" .. "/lazy-lock.json",
dev = { path = "~/Projects/lua/nvim" },
install = { colorscheme = { "catppuccin" } },
ui = {
border = "rounded",
icons = { lazy = " " },
},
diff = { cmd = "diffview.nvim" },
checker = { enabled = true, frequency = 3600 },
performance = {
rtp = {
disabled_plugins = {
"gzip",
"matchit",
"matchparen",
"netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
}
-- Set vim options
require "config"
vim.opt.laststatus = 3
vim.opt.showtabline = 1
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.listchars = { lead = ".", trail = ".", tab = ">-" }
vim.opt.list = true
vim.opt.splitbelow = true
vim.opt.splitright = true
-- Global
vim.g.loaded_ruby_provider = 0
vim.g.loaded_perl_provider = 0
-- Common keymaps
vim.keymap.set("i", "jk", "<esc>")
vim.keymap.set("n", "<leader>l", "<cmd>Lazy<CR>")
-- neovide
if vim.g.neovide then
vim.opt.winblend = 50
vim.opt.pumblend = 50
vim.g.neovide_padding_top = 5
vim.g.neovide_padding_bottom = 5
vim.g.neovide_padding_left = 5
vim.g.neovide_padding_right = 5
vim.g.neovide_floating_blur_amount_x = 2.0
vim.g.neovide_floating_blur_amount_y = 2.0
vim.g.neovide_hide_mouse_when_typing = true
vim.g.neovide_remember_window_size = false
end

View file

@ -1,41 +0,0 @@
local M = {
flavour = "macchiato",
term_colors = true,
transparent_background = true,
integrations = {
barbar = true,
barbecue = {
dim_dirname = true,
},
dashboard = true,
gitsigns = true,
hop = true,
indent_blankline = {
enabled = true,
colored_indent_levels = true,
},
cmp = true,
mason = true,
native_lsp = {
enabled = true,
},
neogit = true,
notify = true,
nvimtree = true,
navic = {
enabled = false,
custom_bg = "NONE",
},
treesitter = true,
treesitter_context = true,
telescope = true,
lsp_trouble = true,
which_key = true,
},
}
if vim.g.neovide then
M.transparent_background = false
end
return M

View file

@ -1,58 +0,0 @@
return {
theme = "hyper",
config = {
week_header = {
enable = true,
},
shortcut = {
{ icon = "", desc = "Lazy", group = "@property", action = "Lazy", key = "l" },
{
icon = "",
icon_hl = "@variable",
desc = "Files",
group = "Files",
action = "Telescope find_files",
key = "f",
},
{
icon = "",
icon_hl = "@variable",
desc = "Projects",
group = "Files",
action = "Telescope projects",
key = "p",
},
{
icon = "",
icon_hl = "@variable",
desc = "Terminal",
group = "Files",
action = "ToggleTerm",
key = "t",
},
{
icon = "",
desc = "Neotree",
group = "Files",
action = "Neotree float reveal reveal_force_cwd",
key = "n",
},
{
icon = "",
icon_hl = "@variable",
desc = "Neogit",
group = "Label",
action = "Neogit",
key = "g",
},
{
icon = "",
icon_hl = "@variable",
desc = "Git commit",
group = "Label",
action = "Neogit commit",
key = "c",
},
},
},
}

View file

@ -1,6 +0,0 @@
return {
enhanced_diff_hl = true,
file_panel = {
listing_style = "list",
},
}

View file

@ -1,2 +0,0 @@
local components = require("ui.feline_components").get()
return { components = components }

View file

@ -1,45 +0,0 @@
return {
signcolumn = true,
numhl = true,
linehl = false,
current_line_blame = true,
word_diff = false,
on_attach = function(bufnr)
local gs = package.loaded.gitsigns
local function map(mode, l, r, opts)
opts = opts or {}
opts.buffer = bufnr
vim.keymap.set(mode, l, r, opts)
end
-- Navigation
map("n", "]c", function()
if vim.wo.diff then return "]c" end
vim.schedule(function() gs.next_hunk() end)
return "<Ignore>"
end, { expr = true })
map("n", "[c", function()
if vim.wo.diff then return "[c" end
vim.schedule(function() gs.prev_hunk() end)
return "<Ignore>"
end, { expr = true })
-- Actions
map({ "n", "v" }, "<leader>hs", ":Gitsigns stage_hunk<CR>")
map({ "n", "v" }, "<leader>hr", ":Gitsigns reset_hunk<CR>")
map("n", "<leader>hS", gs.stage_buffer)
map("n", "<leader>hu", gs.undo_stage_hunk)
map("n", "<leader>hR", gs.reset_buffer)
map("n", "<leader>hp", gs.preview_hunk)
map("n", "<leader>hb", function() gs.blame_line { full = true } end)
map("n", "<leader>tb", gs.toggle_current_line_blame)
map("n", "<leader>hd", gs.diffthis)
map("n", "<leader>hD", function() gs.diffthis "~" end)
map("n", "<leader>td", gs.toggle_deleted)
-- Text object
map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>")
end,
}

View file

@ -1,4 +0,0 @@
return {
show_current_context = true,
show_current_context_start = false,
}

View file

@ -1,25 +0,0 @@
-- Opt
vim.opt.laststatus = 3
vim.opt.cmdheight = 0
vim.opt.showtabline = 1
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.listchars = { lead = ".", trail = ".", tab = ">-" }
vim.opt.list = true
vim.opt.splitbelow = true
vim.opt.splitright = true
if vim.g.neovide then
require "config.neovide"
end
-- Global
-- vim.g.python3_host_prog = vim.fn.stdpath "config" .. "/.venv/bin/python"
vim.g.loaded_ruby_provider = 0
vim.g.loaded_perl_provider = 0
-- Keymaps
vim.keymap.set("i", "jk", "<esc>")
vim.keymap.set("n", "<leader>l", "<cmd>Lazy<CR>")

View file

@ -1,49 +0,0 @@
return {
root = vim.fn.stdpath "data" .. "/lazy",
spec = "plugins",
lockfile = vim.fn.stdpath "data" .. "/lazy-lock.json",
dev = {
path = "~/Projects/lua/nvim",
},
install = {
colorscheme = { "catppuccin" },
},
ui = {
border = "rounded",
icons = {
cmd = "",
config = "",
event = "",
ft = "",
init = "",
keys = "",
plugin = "",
runtime = "",
source = "",
start = "",
task = "",
lazy = " ",
},
},
diff = {
cmd = "diffview.nvim",
},
checker = {
enabled = true,
frequency = 3600,
},
performance = {
rtp = {
disabled_plugins = {
"gzip",
"matchit",
"matchparen",
"netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
}

View file

@ -1,49 +0,0 @@
local lsp_progress = function()
local Lsp = vim.lsp.util.get_progress_messages()[1]
if Lsp then
local msg = Lsp.message or ""
local percentage = Lsp.percentage
if not percentage then return "" end
local title = Lsp.title or ""
local spinners = { "", "", "" }
local success_icon = { "", "", "" }
local ms = vim.loop.hrtime() / 1000000
local frame = math.floor(ms / 120) % #spinners
if percentage >= 70 then
return string.format(" %%<%s %s %s (%s%%%%) ", success_icon[frame + 1], title, msg, percentage)
end
return string.format(" %%<%s %s %s (%s%%%%) ", spinners[frame + 1], title, msg, percentage)
end
return ""
end
return {
options = {
theme = "catppuccin",
component_separators = "|",
section_separators = { left = "", right = "" },
globalstatus = true,
},
sections = {
lualine_a = { "mode" },
lualine_b = { "filename", { "branch", icon = "󰊢" }, "diff" },
lualine_c = { lsp_progress, "diagnostics" },
lualine_x = {},
lualine_y = { "searchcount", "progress", "selectioncount" },
lualine_z = { "location" },
},
tabline = {
lualine_a = {},
lualine_b = { "filetype", "fileformat", "encoding" },
lualine_c = { "require('nvim-navic').get_location()" },
lualine_x = { { "windows", use_mode_colors = true } },
lualine_y = {},
lualine_z = {},
},
winbar = {},
extensions = { "aerial", "fzf", "lazy", "neo-tree", "toggleterm", "trouble" },
}

View file

@ -1,10 +0,0 @@
return {
disable_builtin_notifications = true,
kind = "floating",
commit_popup = { kind = "floating" },
preview_buffer = { kind = "floating" },
popup = { kind = "floating" },
integrations = {
diffview = true,
},
}

View file

@ -1,29 +0,0 @@
return {
close_if_last_window = true,
use_popups_for_input = false,
filesystem = {
window = {
mappings = {
["Z"] = "expand_all_nodes",
["<tab>"] = "toggle_node",
},
},
filtered_items = {
hide_dotfiles = false,
},
group_empty_dirs = true,
hijack_netrw_behavior = "open_current",
},
buffers = {
bind_to_cwd = true,
follow_current_file = true,
group_empty_dirs = true,
},
git_status = {
group_empty_dirs = true,
},
source_selector = {
winbar = true,
statusline = false,
},
}

View file

@ -1,13 +0,0 @@
vim.opt.winblend = 50
vim.opt.pumblend = 50
vim.g.neovide_padding_top = 5
vim.g.neovide_padding_bottom = 5
vim.g.neovide_padding_left = 5
vim.g.neovide_padding_right = 5
vim.g.neovide_floating_blur_amount_x = 2.0
vim.g.neovide_floating_blur_amount_y = 2.0
vim.g.neovide_hide_mouse_when_typing = true
vim.g.neovide_remember_window_size = false

View file

@ -1,5 +0,0 @@
return {
background_colour = "#000000",
fps = 60,
render = "default", -- "minimal", "simple"
}

View file

@ -1,5 +0,0 @@
return {
disable_in_macro = true,
disable_in_visualblock = true,
check_ts = true,
}

View file

@ -1,4 +0,0 @@
return {
icons = require("config.nvim-navic").icons,
window = { border = "rounded" },
}

View file

@ -1,32 +0,0 @@
return {
safe_output = true,
click = true,
icons = {
File = "",
Module = "",
Namespace = "",
Package = "",
Class = "",
Method = "",
Property = "",
Field = "",
Constructor = "",
Enum = "",
Interface = "",
Function = "",
Variable = "",
Constant = "",
String = "",
Number = "",
Boolean = "",
Array = "",
Object = "",
Key = "",
Null = "",
EnumMember = "",
Struct = "",
Event = "",
Operator = "",
TypeParameter = "",
},
}

View file

@ -1,6 +0,0 @@
return {
termOpts = {
direction = "horizontal",
keep_one = true,
},
}

View file

@ -1,5 +0,0 @@
return {
ignore_lsp = { "efm", "null-ls" },
show_hidden = true,
silent_chdir = true,
}

View file

@ -1,18 +0,0 @@
local trouble = require "trouble.providers.telescope"
return {
defaults = {
layout_strategy = "flex",
mappings = {
i = { ["<c-t>"] = trouble.open_with_trouble },
n = { ["<c-t>"] = trouble.open_with_trouble },
},
winblend = vim.o.winblend,
},
extensions = {
fzf = {
fuzzy = true, -- false will only do exact matching
override_generic_sorter = true, -- override the generic sorter
override_file_sorter = true, -- override the file sorter
},
},
}

View file

@ -1,32 +0,0 @@
return {
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "gnn",
node_incremental = "gnr",
scope_incremental = "gnc",
node_decremental = "gnm",
},
},
indent = {
enable = true,
},
refactor = {
smart_rename = {
enable = true,
keymaps = {
smart_rename = "grr",
},
},
navigation = {
enable = true,
keymaps = {
goto_definition_lsp_fallback = "gnd",
},
},
},
}

View file

@ -1,7 +0,0 @@
return {
mode = "workspace_diagnostics",
auto_open = false,
auto_close = false,
auto_preview = true,
auto_jump = { "lsp_definitions", "lsp_references", "lsp_implementations" },
}

View file

@ -1,4 +0,0 @@
return {
context = 10,
treesitter = true,
}

View file

@ -1,23 +0,0 @@
return {
window = {
options = {
signcolumn = "no", -- disable signcolumn
number = false, -- disable number column
relativenumber = false, -- disable relative numbers
cursorline = false, -- disable cursorline
cursorcolumn = false, -- disable cursor column
foldcolumn = "0", -- disable fold column
list = false, -- disable whitespace characters
},
},
plugins = {
options = {
enabled = true,
},
twilight = { enabled = true },
gitsigns = { enabled = true },
tmux = { enabled = true },
},
on_open = function(win) vim.wo.scrolloff = 999 end,
on_close = function(win) vim.wo.scrolloff = 0 end,
}

View file

@ -1,3 +1,41 @@
local config = {
flavour = "macchiato",
term_colors = true,
transparent_background = true,
integrations = {
barbar = true,
barbecue = {
dim_dirname = true,
},
dashboard = true,
gitsigns = true,
hop = true,
indent_blankline = {
enabled = true,
colored_indent_levels = true,
},
cmp = true,
mason = true,
native_lsp = {
enabled = true,
},
neogit = true,
notify = true,
nvimtree = true,
navic = {
enabled = false,
custom_bg = "NONE",
},
treesitter = true,
treesitter_context = true,
telescope = true,
lsp_trouble = true,
which_key = true,
},
}
if vim.g.neovide then config.transparent_background = false end
return {
"catppuccin/nvim",
name = "catppuccin",
@ -8,7 +46,7 @@ return {
require "ui.fillchars"
end,
config = function()
require("catppuccin").setup(require "config.catppuccin")
require("catppuccin").setup(config)
vim.cmd.colorscheme "catppuccin"
end,
}

View file

@ -0,0 +1,7 @@
return {
"numToStr/Comment.nvim",
keys = { "gcc", "gcb" },
event = { "BufReadPre" },
config = true,
opts = { ignore = "^$" },
}

View file

@ -5,5 +5,11 @@ return {
"DiffviewFileHistory",
"DiffviewOpen",
},
config = function() require("diffview").setup(require "config.diffview") end,
config = true,
opts = {
enhanced_diff_hl = true,
file_panel = {
listing_style = "list",
},
},
}

View file

@ -1 +1 @@
return { "stevearc/dressing.nvim" }
return { "stevearc/dressing.nvim", event = "VeryLazy" }

View file

@ -1,5 +1,50 @@
return {
"lewis6991/gitsigns.nvim",
event = { "BufReadPre", "BufNewFile" },
config = function() require("gitsigns").setup(require "config.gitsigns") end,
config = true,
opts = {
signcolumn = true,
numhl = true,
linehl = false,
current_line_blame = true,
word_diff = false,
on_attach = function(bufnr)
local gs = package.loaded.gitsigns
local function map(mode, l, r, opts)
opts = opts or {}
opts.buffer = bufnr
vim.keymap.set(mode, l, r, opts)
end
-- Navigation
map("n", "]c", function()
if vim.wo.diff then return "]c" end
vim.schedule(function() gs.next_hunk() end)
return "<Ignore>"
end, { expr = true })
map("n", "[c", function()
if vim.wo.diff then return "[c" end
vim.schedule(function() gs.prev_hunk() end)
return "<Ignore>"
end, { expr = true })
-- Actions
map({ "n", "v" }, "<leader>hs", ":Gitsigns stage_hunk<CR>")
map({ "n", "v" }, "<leader>hr", ":Gitsigns reset_hunk<CR>")
map("n", "<leader>hS", gs.stage_buffer)
map("n", "<leader>hu", gs.undo_stage_hunk)
map("n", "<leader>hR", gs.reset_buffer)
map("n", "<leader>hp", gs.preview_hunk)
map("n", "<leader>hb", function() gs.blame_line { full = true } end)
map("n", "<leader>tb", gs.toggle_current_line_blame)
map("n", "<leader>hd", gs.diffthis)
map("n", "<leader>hD", function() gs.diffthis "~" end)
map("n", "<leader>td", gs.toggle_deleted)
-- Text object
map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>")
end,
},
}

View file

@ -1,5 +1,9 @@
return {
"lukas-reineke/indent-blankline.nvim",
event = { "BufReadPre", "BufNewFile" },
config = function() require("indent_blankline").setup(require "config.indent_blankline") end,
config = true,
opts = {
show_current_context = true,
show_current_context_start = false,
},
}

View file

@ -1,43 +1,25 @@
return {
{
"neovim/nvim-lspconfig",
event = { "BufEnter" },
cmd = {
"LspLog",
"LspStop",
"LspStart",
"LspRestart",
"LspInfo",
},
dependencies = {
{ "hrsh7th/nvim-cmp" },
{ "rafamadriz/friendly-snippets" },
{ "windwp/nvim-autopairs" },
{ "jose-elias-alvarez/null-ls.nvim", lazy = true },
{ "mfussenegger/nvim-dap", lazy = true },
{ "folke/neodev.nvim", dependencies = { "hrsh7th/nvim-cmp" }, lazy = true },
{ "SmiteshP/nvim-navic" },
{ "SmiteshP/nvim-navbuddy" },
},
config = function()
require "lsp.config"
require "lsp.cmp"
end,
"neovim/nvim-lspconfig",
event = { "BufReadPre", "BufNewFile", "BufEnter" },
cmd = {
"LspLog",
"LspStop",
"LspStart",
"LspRestart",
"LspInfo",
},
{
"hrsh7th/nvim-cmp",
dependencies = {
{ "hrsh7th/cmp-nvim-lsp" },
{ "hrsh7th/cmp-buffer" },
{ "hrsh7th/cmp-path" },
{ "hrsh7th/cmp-cmdline" },
{ "f3fora/cmp-spell" },
{ "petertriho/cmp-git" },
{ "Dosx001/cmp-commit" },
{ "kdheepak/cmp-latex-symbols" },
{ "L3MON4D3/LuaSnip" },
{ "saadparwaiz1/cmp_luasnip" },
},
cmd = "CmpStatus",
dependencies = {
{ "hrsh7th/nvim-cmp" },
{ "rafamadriz/friendly-snippets" },
{ "windwp/nvim-autopairs" },
{ "jose-elias-alvarez/null-ls.nvim", lazy = true },
{ "mfussenegger/nvim-dap", lazy = true },
{ "folke/neodev.nvim", dependencies = { "hrsh7th/nvim-cmp" }, lazy = true },
{ "SmiteshP/nvim-navic" },
{ "SmiteshP/nvim-navbuddy" },
},
config = function()
require "lsp.config"
require "lsp.cmp"
end,
}

View file

@ -2,5 +2,31 @@ return {
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
event = { "BufEnter" },
config = function() require("lualine").setup(require "config.lualine") end,
config = true,
opts = {
options = {
theme = "catppuccin",
component_separators = "|",
section_separators = { left = "", right = "" },
globalstatus = true,
},
sections = {
lualine_a = { "mode" },
lualine_b = { "filename", { "branch", icon = "󰊢" }, "diff" },
lualine_c = { "diagnostics" },
lualine_x = { "filetype", "fileformat", "encoding" },
lualine_y = { "progress" },
lualine_z = { "selectioncount", "location" },
},
tabline = {
lualine_a = {},
lualine_b = {},
lualine_c = { "require('nvim-navic').get_location()" },
lualine_x = { "windows" },
lualine_y = {},
lualine_z = {},
},
winbar = {},
extensions = { "aerial", "fzf", "lazy", "neo-tree", "toggleterm", "trouble" },
},
}

View file

@ -12,5 +12,14 @@ return {
vim.keymap.set("n", "<leader>gP", "<cmd>Neogit push<CR>")
end,
config = true,
opts = require "config.neogit",
opts = {
disable_builtin_notifications = true,
kind = "floating",
commit_popup = { kind = "floating" },
preview_buffer = { kind = "floating" },
popup = { kind = "floating" },
integrations = {
diffview = true,
},
},
}

View file

@ -17,5 +17,33 @@ return {
vim.keymap.set("n", "<leader>ns", "<cmd>Neotree float git_status<cr>")
end,
config = true,
opts = require "config.neotree",
opts = {
close_if_last_window = true,
use_popups_for_input = false,
filesystem = {
window = {
mappings = {
["Z"] = "expand_all_nodes",
["<tab>"] = "toggle_node",
},
},
filtered_items = {
hide_dotfiles = false,
},
group_empty_dirs = true,
hijack_netrw_behavior = "open_current",
},
buffers = {
bind_to_cwd = true,
follow_current_file = true,
group_empty_dirs = true,
},
git_status = {
group_empty_dirs = true,
},
source_selector = {
winbar = true,
statusline = false,
},
},
}

View file

@ -0,0 +1,27 @@
return {
"folke/noice.nvim",
dependencies = {
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
},
config = true,
opts = {
lsp = {
progress = { enabled = true, view = "virtualtext" },
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true,
},
},
-- you can enable a preset for easier configuration
presets = {
bottom_search = false, -- use a classic bottom cmdline for search
command_palette = true, -- position the cmdline and popupmenu together
long_message_to_split = false, -- long messages will be sent to a splitnoice
inc_rename = true, -- enables an input dialog for inc-rename.nvim
lsp_doc_border = true, -- add a border to hover docs and signature help
},
},
}

View file

@ -1,7 +1,9 @@
return {
"rcarriga/nvim-notify",
config = function()
require("notify").setup(require "config.notify")
vim.notify = require "notify"
end,
config = true,
opts = {
background_colour = "#000000",
fps = 60,
render = "default", -- "minimal", "simple"
},
}

View file

@ -0,0 +1,15 @@
return {
"hrsh7th/nvim-cmp",
dependencies = {
{ "hrsh7th/cmp-nvim-lsp" },
{ "hrsh7th/cmp-buffer" },
{ "hrsh7th/cmp-path" },
{ "hrsh7th/cmp-cmdline" },
{ "f3fora/cmp-spell" },
{ "petertriho/cmp-git" },
{ "Dosx001/cmp-commit" },
{ "kdheepak/cmp-latex-symbols" },
{ "L3MON4D3/LuaSnip" },
{ "saadparwaiz1/cmp_luasnip" },
},
}

View file

@ -5,5 +5,10 @@ return {
"nvim-treesitter/nvim-treesitter",
"hrsh7th/nvim-cmp",
},
config = function() require("nvim-autopairs").setup(require "config.nvim-autopairs") end,
config = true,
opts = {
disable_in_macro = true,
disable_in_visualblock = true,
check_ts = true,
},
}

View file

@ -4,5 +4,8 @@ return {
cmd = { "Navbuddy" },
init = function() vim.keymap.set("n", "<leader>na", "<cmd>Navbuddy<cr>") end,
config = true,
opts = require "config.nvim-navbuddy",
opts = {
icons = require "ui.navic_icons",
window = { border = "rounded" },
},
}

View file

@ -3,5 +3,9 @@ return {
dependencies = "neovim/nvim-lspconfig",
lazy = true,
config = true,
opts = require "config.nvim-navic",
opts = {
safe_output = true,
click = true,
icons = require "ui.navic_icons",
},
}

View file

@ -19,5 +19,10 @@ return {
vim.keymap.set("n", "<leader>ti", "<cmd>TestInfo<cr>")
end,
config = true,
otps = require "config.nvim_test",
otps = {
termOpts = {
direction = "horizontal",
keep_one = true,
},
},
}

View file

@ -1,5 +1,11 @@
return {
"ahmedkhalf/project.nvim",
name = "project_nvim",
event = { "BufEnter" },
config = function() require("project_nvim").setup(require "config.project") end,
config = true,
opts = {
ignore_lsp = { "efm", "null-ls" },
show_hidden = true,
silent_chdir = true,
},
}

View file

@ -1,29 +1,6 @@
return {
"nvim-telescope/telescope.nvim",
branch = "0.1.x",
cmd = "Telescope",
init = function()
vim.keymap.set("n", "<leader>;", "<cmd>Telescope builtin<cr>")
vim.keymap.set("n", "<leader>ff", "<cmd>Telescope find_files<cr>")
vim.keymap.set("n", "<leader>fg", "<cmd>Telescope live_grep<cr>")
vim.keymap.set("n", "<leader>fb", "<cmd>Telescope buffers<cr>")
vim.keymap.set("n", "<leader>fl", "<cmd>Telescope lsp_document_symbols<cr>")
vim.keymap.set("n", "<leader>fe", "<cmd>Telescope diagnostics<cr>")
vim.keymap.set("n", "<leader>fs", "<cmd>Telescope treesitter<cr>")
vim.keymap.set("n", "<leader>fz", "<cmd>Telescope current_buffer_fuzzy_find<cr>")
vim.keymap.set("n", "<leader>fp", "<cmd>Telescope projects<cr>")
end,
config = function()
require("telescope").setup(require "config.telescope")
require("telescope").load_extension "fzf"
require("telescope").load_extension "lazy"
require("telescope").load_extension "luasnip"
require("telescope").load_extension "git_diffs"
require("telescope").load_extension "command_center"
require("telescope").load_extension "http"
require("telescope").load_extension "advanced_git_search"
require("telescope").load_extension "projects"
end,
dependencies = {
{
"nvim-lua/plenary.nvim",
@ -39,4 +16,44 @@ return {
"aaronhallaert/advanced-git-search.nvim",
},
},
cmd = "Telescope",
init = function()
vim.keymap.set("n", "<leader>;", "<cmd>Telescope builtin<cr>")
vim.keymap.set("n", "<leader>ff", "<cmd>Telescope find_files<cr>")
vim.keymap.set("n", "<leader>fg", "<cmd>Telescope live_grep<cr>")
vim.keymap.set("n", "<leader>fb", "<cmd>Telescope buffers<cr>")
vim.keymap.set("n", "<leader>fl", "<cmd>Telescope lsp_document_symbols<cr>")
vim.keymap.set("n", "<leader>fe", "<cmd>Telescope diagnostics<cr>")
vim.keymap.set("n", "<leader>fs", "<cmd>Telescope treesitter<cr>")
vim.keymap.set("n", "<leader>fz", "<cmd>Telescope current_buffer_fuzzy_find<cr>")
vim.keymap.set("n", "<leader>fp", "<cmd>Telescope projects<cr>")
end,
config = function()
local trouble = require "trouble.providers.telescope"
require("telescope").setup {
defaults = {
layout_strategy = "flex",
mappings = {
i = { ["<c-t>"] = trouble.open_with_trouble },
n = { ["<c-t>"] = trouble.open_with_trouble },
},
winblend = vim.o.winblend,
},
extensions = {
fzf = {
fuzzy = true, -- false will only do exact matching
override_generic_sorter = true, -- override the generic sorter
override_file_sorter = true, -- override the file sorter
},
},
}
require("telescope").load_extension "fzf"
require("telescope").load_extension "lazy"
require("telescope").load_extension "luasnip"
require("telescope").load_extension "git_diffs"
require("telescope").load_extension "command_center"
require("telescope").load_extension "http"
require("telescope").load_extension "advanced_git_search"
require("telescope").load_extension "projects"
end,
}

View file

@ -1,6 +1,7 @@
return {
"nvim-treesitter/nvim-treesitter",
event = { "BufReadPre", "BufNewFile" },
dependencies = { "nvim-treesitter/nvim-treesitter-refactor" },
cmd = {
"TSToggle",
"TSBufEnable",
@ -9,8 +10,39 @@ return {
"TSUpdate",
"TSEnable",
},
config = function() require("nvim-treesitter.configs").setup(require "config.treesitter") end,
dependencies = {
"nvim-treesitter/nvim-treesitter-refactor",
config = true,
opts = {
ensure_installed = { "vim", "regex", "lua", "bash", "markdown", "markdown_inline"},
auto_install = false,
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "gnn",
node_incremental = "gnr",
scope_incremental = "gnc",
node_decremental = "gnm",
},
},
indent = {
enable = true,
},
refactor = {
smart_rename = {
enable = true,
keymaps = {
smart_rename = "grr",
},
},
navigation = {
enable = true,
keymaps = {
goto_definition_lsp_fallback = "gnd",
},
},
},
},
}

View file

@ -10,5 +10,11 @@ return {
vim.keymap.set("n", "<leader>xl", "<cmd>TroubleToggle loclist<cr>")
end,
config = true,
opts = require "config.trouble",
opts = {
mode = "workspace_diagnostics",
auto_open = false,
auto_close = false,
auto_preview = true,
auto_jump = { "lsp_definitions", "lsp_references", "lsp_implementations" },
},
}

View file

@ -0,0 +1,7 @@
return {
"folke/twilight.nvim",
dependencies = { "nvim-treesitter" },
cmd = "Twilight",
config = true,
opts = { context = 10, treesitter = true },
}

View file

@ -1,15 +1,30 @@
return {
"folke/zen-mode.nvim",
dependencies = { "folke/twilight.nvim" },
cmd = { "ZenMode" },
init = function() vim.keymap.set("n", "<leader>z", "<cmd>ZenMode<CR>") end,
config = true,
opts = require "config.zen_mode",
dependencies = {
"folke/twilight.nvim",
cmd = "Twilight",
config = function() require("twilight").setup(require "config.twilight") end,
dependencies = {
"nvim-treesitter",
opts = {
window = {
options = {
signcolumn = "no", -- disable signcolumn
number = false, -- disable number column
relativenumber = false, -- disable relative numbers
cursorline = false, -- disable cursorline
cursorcolumn = false, -- disable cursor column
foldcolumn = "0", -- disable fold column
list = false, -- disable whitespace characters
},
},
plugins = {
options = {
enabled = true,
},
twilight = { enabled = true },
gitsigns = { enabled = true },
tmux = { enabled = true },
},
on_open = function(win) vim.wo.scrolloff = 999 end,
on_close = function(win) vim.wo.scrolloff = 0 end,
},
}

View file

@ -0,0 +1,28 @@
return {
File = "",
Module = "",
Namespace = "",
Package = "",
Class = "",
Method = "",
Property = "",
Field = "",
Constructor = "",
Enum = "",
Interface = "",
Function = "",
Variable = "",
Constant = "",
String = "",
Number = "",
Boolean = "",
Array = "",
Object = "",
Key = "",
Null = "",
EnumMember = "",
Struct = "",
Event = "",
Operator = "",
TypeParameter = "",
}