fix config, use symlink
This commit is contained in:
+48
-2
@@ -1,4 +1,50 @@
|
||||
require("mimu.packer")
|
||||
require("mimu.remap")
|
||||
require("mimu.set")
|
||||
require("mimu.remap")
|
||||
require("mimu.lazy")
|
||||
|
||||
local augroup = vim.api.nvim_create_augroup
|
||||
local MimuGroup = augroup("mimu", {})
|
||||
|
||||
local autocmd = vim.api.nvim_create_autocmd
|
||||
|
||||
vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]]
|
||||
|
||||
autocmd("LspAttach", {
|
||||
group = MimuGroup,
|
||||
callback = function(e)
|
||||
local opts = { buffer = e.buf }
|
||||
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
|
||||
vim.keymap.set("n", "gr", function() vim.lsp.buf.references() end, opts)
|
||||
vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts)
|
||||
vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts)
|
||||
vim.keymap.set("n", "<leader>vd", function() vim.lsp.diagnostic.open_float() end, opts)
|
||||
-- vim.keymap.set("n", "[d", function() vim.lsp.diagnostic.goto_next() end, opts)
|
||||
-- vim.keymap.set("n", "]d", function() vim.lsp.diagnostic.goto_prev() end, opts)
|
||||
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
|
||||
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts)
|
||||
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
|
||||
end
|
||||
})
|
||||
|
||||
autocmd("BufWritePre", {
|
||||
pattern = "*.go",
|
||||
callback = function()
|
||||
local params = vim.lsp.util.make_range_params()
|
||||
params.context = { only = { "source.organizeImports" } }
|
||||
-- buf_request_sync defaults to a 1000ms timeout. Depending on your
|
||||
-- machine and codebase, you may want longer. Add an additional
|
||||
-- argument after params if you find that you have to write the file
|
||||
-- twice for changes to be saved.
|
||||
-- E.g., vim.lsp.buf_request_sync(0, "textDocument/codeAction", params, 3000)
|
||||
local result = vim.lsp.buf_request_sync(0, "textDocument/codeAction", params)
|
||||
for cid, res in pairs(result or {}) do
|
||||
for _, r in pairs(res.result or {}) do
|
||||
if r.edit then
|
||||
local enc = (vim.lsp.get_client_by_id(cid) or {}).offset_encoding or "utf-16"
|
||||
vim.lsp.util.apply_workspace_edit(r.edit, enc)
|
||||
end
|
||||
end
|
||||
end
|
||||
vim.lsp.buf.format({ async = false })
|
||||
end
|
||||
})
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = "mimu.plugins",
|
||||
change_detection = { notify = false },
|
||||
})
|
||||
@@ -1,90 +0,0 @@
|
||||
-- This file can be loaded by calling `lua require('plugins')` from your init.vim
|
||||
|
||||
-- Only required if you have packer configured as `opt`
|
||||
vim.cmd [[packadd packer.nvim]]
|
||||
|
||||
return require('packer').startup(function(use)
|
||||
-- Packer can manage itself
|
||||
use 'wbthomason/packer.nvim'
|
||||
|
||||
-- telescope
|
||||
use {
|
||||
'nvim-telescope/telescope.nvim', tag = '0.1.1',
|
||||
-- or , branch = '0.1.x',
|
||||
requires = { { 'nvim-lua/plenary.nvim' } }
|
||||
}
|
||||
|
||||
-- theme
|
||||
use({
|
||||
'ramojus/mellifluous.nvim',
|
||||
requires = { 'rktjmp/lush.nvim' },
|
||||
config = function()
|
||||
require 'mellifluous'.setup({
|
||||
styles = {
|
||||
comments = '',
|
||||
},
|
||||
}) -- optional, see configuration section.
|
||||
vim.cmd('colorscheme mellifluous')
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
-- treesitter
|
||||
use('nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' })
|
||||
|
||||
-- nvim-tree
|
||||
use {
|
||||
'nvim-tree/nvim-tree.lua',
|
||||
config = function()
|
||||
require("nvim-tree").setup {}
|
||||
end
|
||||
}
|
||||
|
||||
-- harpoon
|
||||
use("theprimeagen/harpoon")
|
||||
|
||||
-- null-ls, depends on plenary
|
||||
use("nvim-lua/plenary.nvim")
|
||||
use("jose-elias-alvarez/null-ls.nvim")
|
||||
|
||||
-- git / vim-fugitive
|
||||
use("tpope/vim-fugitive")
|
||||
use {
|
||||
'lewis6991/gitsigns.nvim',
|
||||
config = function()
|
||||
require('gitsigns').setup({
|
||||
current_line_blame = true,
|
||||
})
|
||||
end
|
||||
}
|
||||
|
||||
-- lualine
|
||||
use { 'nvim-lualine/lualine.nvim' }
|
||||
|
||||
-- Comment
|
||||
use { 'numToStr/Comment.nvim' }
|
||||
|
||||
-- LSP
|
||||
use {
|
||||
'VonHeikemen/lsp-zero.nvim',
|
||||
branch = 'v1.x',
|
||||
requires = {
|
||||
-- LSP Support
|
||||
{ 'neovim/nvim-lspconfig' }, -- Required
|
||||
{ 'williamboman/mason.nvim' }, -- Optional
|
||||
{ 'williamboman/mason-lspconfig.nvim' }, -- Optional
|
||||
|
||||
-- Autocompletion
|
||||
{ 'hrsh7th/nvim-cmp' }, -- Required
|
||||
{ 'hrsh7th/cmp-nvim-lsp' }, -- Required
|
||||
{ 'hrsh7th/cmp-buffer' }, -- Optional
|
||||
{ 'hrsh7th/cmp-path' }, -- Optional
|
||||
{ 'saadparwaiz1/cmp_luasnip' }, -- Optional
|
||||
{ 'hrsh7th/cmp-nvim-lua' }, -- Optional
|
||||
|
||||
-- Snippets
|
||||
{ 'L3MON4D3/LuaSnip' }, -- Required
|
||||
{ 'rafamadriz/friendly-snippets' }, -- Optional
|
||||
}
|
||||
}
|
||||
end)
|
||||
@@ -1,141 +0,0 @@
|
||||
local fzf_make_cmd = "make"
|
||||
if vim.loop.os_uname().machine == "arm64" then
|
||||
fzf_make_cmd = " arch -arm64 make"
|
||||
end
|
||||
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
return require("lazy").setup({
|
||||
defaults = {
|
||||
lazy = true,
|
||||
},
|
||||
|
||||
-- telescope
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
tag = "0.1.1",
|
||||
opts = {
|
||||
defaults = {
|
||||
file_ignore_patterns = {
|
||||
".git/worktrees",
|
||||
".git/COMMIT_EDITMSG",
|
||||
},
|
||||
},
|
||||
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
|
||||
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
|
||||
},
|
||||
},
|
||||
},
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
{ "nvim-telescope/telescope-fzf-native.nvim", build = fzf_make_cmd }, -- Fzf native
|
||||
},
|
||||
},
|
||||
|
||||
-- theme
|
||||
{
|
||||
"ramojus/mellifluous.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
dependencies = { "rktjmp/lush.nvim" },
|
||||
config = function()
|
||||
require("mellifluous").setup({
|
||||
styles = {
|
||||
comments = "",
|
||||
},
|
||||
}) -- optional, see configuration section.
|
||||
vim.cmd("colorscheme mellifluous")
|
||||
end,
|
||||
},
|
||||
|
||||
-- treesitter
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
build = function()
|
||||
require("nvim-treesitter.install").update({ with_sync = true })
|
||||
end,
|
||||
},
|
||||
|
||||
-- nvim-tree
|
||||
{
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons", -- optional
|
||||
},
|
||||
config = function()
|
||||
require("nvim-tree").setup({})
|
||||
end,
|
||||
},
|
||||
|
||||
-- harpoon
|
||||
{
|
||||
"theprimeagen/harpoon",
|
||||
event = "BufRead",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
},
|
||||
|
||||
-- undotree
|
||||
"mbbill/undotree",
|
||||
|
||||
-- git / vim-fugitive
|
||||
{
|
||||
"tpope/vim-fugitive",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = {
|
||||
"lewis6991/gitsigns.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("gitsigns").setup({
|
||||
current_line_blame = true,
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- lualine
|
||||
"nvim-lualine/lualine.nvim",
|
||||
|
||||
-- Comment
|
||||
{ "numToStr/Comment.nvim", event = "BufRead" },
|
||||
|
||||
-- LSP
|
||||
{
|
||||
"VonHeikemen/lsp-zero.nvim",
|
||||
branch = "v1.x",
|
||||
dependencies = {
|
||||
-- LSP Support
|
||||
{ "neovim/nvim-lspconfig" }, -- Required
|
||||
{ "williamboman/mason.nvim" }, -- Optional
|
||||
{ "williamboman/mason-lspconfig.nvim" }, -- Optional
|
||||
|
||||
-- Autocompletion
|
||||
{ "hrsh7th/nvim-cmp" }, -- Required
|
||||
{ "hrsh7th/cmp-nvim-lsp" }, -- Required
|
||||
{ "hrsh7th/cmp-buffer" }, -- Optional
|
||||
{ "hrsh7th/cmp-path" }, -- Optional
|
||||
{ "saadparwaiz1/cmp_luasnip" }, -- Optional
|
||||
{ "hrsh7th/cmp-nvim-lua" }, -- Optional
|
||||
|
||||
-- Snippets
|
||||
{ "L3MON4D3/LuaSnip" }, -- Required
|
||||
{ "rafamadriz/friendly-snippets" }, -- Optional
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,38 @@
|
||||
return {
|
||||
-- Color scheme
|
||||
{
|
||||
"rktjmp/lush.nvim",
|
||||
name = "lush",
|
||||
priority = 1000,
|
||||
},
|
||||
|
||||
{
|
||||
"ramojus/mellifluous.nvim",
|
||||
dependencies = {
|
||||
"lush"
|
||||
},
|
||||
config = function()
|
||||
vim.cmd("colorscheme mellifluous")
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"nvim-lua/plenary.nvim",
|
||||
name = "plenary"
|
||||
},
|
||||
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
name = "gitsigns",
|
||||
},
|
||||
|
||||
-- Comment
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
event = "BufRead",
|
||||
config = function()
|
||||
require("Comment").setup()
|
||||
end
|
||||
},
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
return {
|
||||
"tpope/vim-fugitive",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = {
|
||||
"gitsigns"
|
||||
},
|
||||
config = function()
|
||||
vim.keymap.set("n", "<leader>gs", vim.cmd.Git);
|
||||
|
||||
require("gitsigns").setup({
|
||||
current_line_blame = true,
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
return {
|
||||
"theprimeagen/harpoon",
|
||||
event = "BufRead",
|
||||
dependencies = {
|
||||
"plenary",
|
||||
},
|
||||
|
||||
config = function()
|
||||
local mark = require("harpoon.mark")
|
||||
local ui = require("harpoon.ui")
|
||||
|
||||
vim.keymap.set("n", "<leader>a", mark.add_file)
|
||||
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
|
||||
|
||||
vim.keymap.set("n", "<C-h>", function() ui.nav_file(1) end)
|
||||
vim.keymap.set("n", "<C-t>", function() ui.nav_file(2) end)
|
||||
vim.keymap.set("n", "<C-n>", function() ui.nav_file(3) end)
|
||||
vim.keymap.set("n", "<C-s>", function() ui.nav_file(4) end)
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"hrsh7th/nvim-cmp",
|
||||
"j-hui/fidget.nvim",
|
||||
"L3MON4D3/LuaSnip",
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
},
|
||||
|
||||
config = function()
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
local lspconfig = require("lspconfig")
|
||||
local configs = require("lspconfig.configs")
|
||||
|
||||
-- elixir config
|
||||
local lexical_config = {
|
||||
filetypes = { "elixir", "eelixir", "heex" },
|
||||
cmd = { "/home/mimu/.local/share/nvim/mason/packages/lexical/libexec/lexical/bin/start_lexical.sh" },
|
||||
settings = {},
|
||||
}
|
||||
|
||||
if not configs.lexical then
|
||||
configs.lexical = {
|
||||
default_config = {
|
||||
filetypes = lexical_config.filetypes,
|
||||
cmd = lexical_config.cmd,
|
||||
root_dir = function(fname)
|
||||
return lspconfig.util.root_pattern("mix.exs", ".git")(fname) or vim.loop.os_homedir()
|
||||
end,
|
||||
-- optional settings
|
||||
settings = lexical_config.settings,
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
lspconfig.lexical.setup({})
|
||||
|
||||
require("fidget").setup()
|
||||
require("mason").setup()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = {
|
||||
"lua_ls",
|
||||
"rust_analyzer",
|
||||
"clangd",
|
||||
"gopls",
|
||||
"lexical",
|
||||
"tsserver",
|
||||
"intelephense",
|
||||
},
|
||||
handlers = {
|
||||
function(server_name) -- default handler (optional)
|
||||
require("lspconfig")[server_name].setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
end,
|
||||
|
||||
["intelephense"] = function()
|
||||
lspconfig.intelephense.setup {
|
||||
root_dir = function(fname)
|
||||
return lspconfig.util.find_git_ancestor(fname) or
|
||||
lspconfig.util.root_pattern("composer.json", ".git")(fname) or
|
||||
lspconfig.util.path.dirname(fname)
|
||||
end
|
||||
}
|
||||
end,
|
||||
|
||||
["gopls"] = function()
|
||||
lspconfig.gopls.setup {
|
||||
settings = {
|
||||
gopls = {
|
||||
analyses = {
|
||||
unusedparams = true,
|
||||
},
|
||||
staticcheck = true,
|
||||
gofumpt = true,
|
||||
}
|
||||
}
|
||||
}
|
||||
end,
|
||||
|
||||
["lua_ls"] = function()
|
||||
lspconfig.lua_ls.setup {
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { "vim" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end,
|
||||
}
|
||||
})
|
||||
|
||||
local cmp = require("cmp")
|
||||
local cmp_select = { behaviour = cmp.SelectBehavior.Select }
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
-- REQUIRED - you must specify a snippet engine
|
||||
expand = function(args)
|
||||
require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-p"] = cmp.mapping.select_prev_item(cmp_select),
|
||||
["<C-n"] = cmp.mapping.select_next_item(cmp_select),
|
||||
["<C-y"] = cmp.mapping.confirm({ select = true }),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
["<C-Space"] = cmp.mapping.complete(),
|
||||
|
||||
-- Tab
|
||||
["<Tab>"] = function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end,
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
}, {
|
||||
{ name = "buffer" },
|
||||
})
|
||||
})
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_text = true,
|
||||
update_on_insert = true,
|
||||
float = {
|
||||
focusable = false,
|
||||
style = "minimal",
|
||||
border = "rounded",
|
||||
source = "always",
|
||||
header = "",
|
||||
prefix = "",
|
||||
},
|
||||
})
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
return {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
config = function()
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
icons_enabled = false,
|
||||
theme = "onedark",
|
||||
component_separators = "|",
|
||||
section_separators = "",
|
||||
}
|
||||
});
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,243 @@
|
||||
return {
|
||||
{
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
config = function()
|
||||
-- disable netrw at the very start of your init.lua (strongly advised)
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
|
||||
require("nvim-tree").setup({
|
||||
auto_reload_on_write = true,
|
||||
disable_netrw = false,
|
||||
hijack_cursor = false,
|
||||
hijack_netrw = true,
|
||||
hijack_unnamed_buffer_when_opening = false,
|
||||
sort_by = "name",
|
||||
root_dirs = {},
|
||||
prefer_startup_root = false,
|
||||
sync_root_with_cwd = false,
|
||||
reload_on_bufenter = false,
|
||||
respect_buf_cwd = true,
|
||||
on_attach = "default",
|
||||
select_prompts = false,
|
||||
view = {
|
||||
centralize_selection = false,
|
||||
cursorline = true,
|
||||
debounce_delay = 15,
|
||||
width = 30,
|
||||
side = "left",
|
||||
preserve_window_proportions = false,
|
||||
number = false,
|
||||
relativenumber = false,
|
||||
signcolumn = "yes",
|
||||
float = {
|
||||
enable = false,
|
||||
quit_on_focus_loss = true,
|
||||
open_win_config = {
|
||||
relative = "editor",
|
||||
border = "rounded",
|
||||
width = 30,
|
||||
height = 30,
|
||||
row = 1,
|
||||
col = 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
renderer = {
|
||||
add_trailing = false,
|
||||
group_empty = true,
|
||||
highlight_git = false,
|
||||
full_name = false,
|
||||
highlight_opened_files = "none",
|
||||
highlight_modified = "none",
|
||||
root_folder_label = ":~:s?$?/..?",
|
||||
indent_width = 2,
|
||||
indent_markers = {
|
||||
enable = false,
|
||||
inline_arrows = true,
|
||||
icons = {
|
||||
corner = "└",
|
||||
edge = "│",
|
||||
item = "│",
|
||||
bottom = "─",
|
||||
none = " ",
|
||||
},
|
||||
},
|
||||
icons = {
|
||||
webdev_colors = false,
|
||||
git_placement = "before",
|
||||
modified_placement = "after",
|
||||
padding = " ",
|
||||
symlink_arrow = " ➛ ",
|
||||
show = {
|
||||
file = false,
|
||||
folder = false,
|
||||
folder_arrow = false,
|
||||
git = false,
|
||||
modified = false,
|
||||
},
|
||||
glyphs = {
|
||||
default = " ",
|
||||
symlink = " ",
|
||||
bookmark = " ",
|
||||
modified = "●",
|
||||
folder = {
|
||||
arrow_closed = " ",
|
||||
arrow_open = " ",
|
||||
default = " ",
|
||||
open = " ",
|
||||
empty = " ",
|
||||
empty_open = " ",
|
||||
symlink = " ",
|
||||
symlink_open = " ",
|
||||
},
|
||||
git = {
|
||||
unstaged = "✗",
|
||||
staged = "✓",
|
||||
unmerged = "",
|
||||
renamed = "➜",
|
||||
untracked = "★",
|
||||
deleted = "",
|
||||
ignored = "◌",
|
||||
},
|
||||
},
|
||||
},
|
||||
special_files = {},
|
||||
symlink_destination = true,
|
||||
},
|
||||
hijack_directories = {
|
||||
enable = true,
|
||||
auto_open = true,
|
||||
},
|
||||
update_focused_file = {
|
||||
enable = false,
|
||||
update_root = false,
|
||||
ignore_list = {},
|
||||
},
|
||||
system_open = {
|
||||
cmd = "",
|
||||
args = {},
|
||||
},
|
||||
diagnostics = {
|
||||
enable = false,
|
||||
show_on_dirs = false,
|
||||
show_on_open_dirs = true,
|
||||
debounce_delay = 50,
|
||||
severity = {
|
||||
min = vim.diagnostic.severity.HINT,
|
||||
max = vim.diagnostic.severity.ERROR,
|
||||
},
|
||||
icons = {
|
||||
hint = "",
|
||||
info = "",
|
||||
warning = "",
|
||||
error = "",
|
||||
},
|
||||
},
|
||||
filters = {
|
||||
dotfiles = false,
|
||||
git_clean = false,
|
||||
no_buffer = false,
|
||||
custom = {},
|
||||
exclude = {},
|
||||
},
|
||||
filesystem_watchers = {
|
||||
enable = true,
|
||||
debounce_delay = 50,
|
||||
ignore_dirs = {},
|
||||
},
|
||||
git = {
|
||||
enable = false,
|
||||
ignore = true,
|
||||
show_on_dirs = true,
|
||||
show_on_open_dirs = true,
|
||||
timeout = 400,
|
||||
},
|
||||
modified = {
|
||||
enable = false,
|
||||
show_on_dirs = true,
|
||||
show_on_open_dirs = true,
|
||||
},
|
||||
actions = {
|
||||
use_system_clipboard = true,
|
||||
change_dir = {
|
||||
enable = true,
|
||||
global = false,
|
||||
restrict_above_cwd = false,
|
||||
},
|
||||
expand_all = {
|
||||
max_folder_discovery = 300,
|
||||
exclude = {},
|
||||
},
|
||||
file_popup = {
|
||||
open_win_config = {
|
||||
col = 1,
|
||||
row = 1,
|
||||
relative = "cursor",
|
||||
border = "shadow",
|
||||
style = "minimal",
|
||||
},
|
||||
},
|
||||
open_file = {
|
||||
quit_on_open = false,
|
||||
resize_window = true,
|
||||
window_picker = {
|
||||
enable = true,
|
||||
picker = "default",
|
||||
chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",
|
||||
exclude = {
|
||||
filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame" },
|
||||
buftype = { "nofile", "terminal", "help" },
|
||||
},
|
||||
},
|
||||
},
|
||||
remove_file = {
|
||||
close_window = true,
|
||||
},
|
||||
},
|
||||
trash = {
|
||||
cmd = "gio trash",
|
||||
},
|
||||
live_filter = {
|
||||
prefix = "[FILTER]: ",
|
||||
always_show_folders = true,
|
||||
},
|
||||
tab = {
|
||||
sync = {
|
||||
open = false,
|
||||
close = false,
|
||||
ignore = {},
|
||||
},
|
||||
},
|
||||
notify = {
|
||||
threshold = vim.log.levels.INFO,
|
||||
},
|
||||
ui = {
|
||||
confirm = {
|
||||
remove = true,
|
||||
trash = true,
|
||||
},
|
||||
},
|
||||
experimental = {
|
||||
git = {
|
||||
async = true,
|
||||
},
|
||||
},
|
||||
log = {
|
||||
enable = false,
|
||||
truncate = false,
|
||||
types = {
|
||||
all = false,
|
||||
config = false,
|
||||
copy_paste = false,
|
||||
dev = false,
|
||||
diagnostics = false,
|
||||
git = false,
|
||||
profile = false,
|
||||
watcher = false,
|
||||
},
|
||||
},
|
||||
})
|
||||
end
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
dependencies = {
|
||||
"plenary"
|
||||
},
|
||||
|
||||
config = function()
|
||||
local builtin = require("telescope.builtin")
|
||||
vim.keymap.set("n", "<leader>pf", builtin.find_files, {})
|
||||
vim.keymap.set("n", "<C-p>", builtin.git_files, {})
|
||||
vim.keymap.set("n", "<leader>pb", builtin.buffers, {})
|
||||
vim.keymap.set("n", "<leader>pd", builtin.diagnostics, {})
|
||||
vim.keymap.set("n", "<leader>ps", function()
|
||||
builtin.grep_string({ search = vim.fn.input("Grep > ") })
|
||||
end)
|
||||
end
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
build = function()
|
||||
require("nvim-treesitter.install").update({ with_sync = true })
|
||||
end,
|
||||
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
-- A list of parser names, or "all" (the four listed parsers should always be installed)
|
||||
ensure_installed = { "javascript", "typescript", "c", "lua", "vim", "rust", "go" },
|
||||
|
||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||
sync_install = false,
|
||||
|
||||
-- Automatically install missing parsers when entering buffer
|
||||
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
||||
auto_install = true,
|
||||
|
||||
highlight = {
|
||||
-- `false` will disable the whole extension
|
||||
enable = true,
|
||||
|
||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||
-- Instead of true it can also be a list of languages
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
})
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
return {
|
||||
"folke/trouble.nvim",
|
||||
config = function()
|
||||
require("trouble").setup({
|
||||
icons = false,
|
||||
fold_open = "v", -- icon used for open folds
|
||||
fold_closed = ">", -- icon used for closed folds
|
||||
indent_lines = false, -- add an indent guide below the fold icons
|
||||
signs = {
|
||||
-- icons / text used for a diagnostic
|
||||
error = "error",
|
||||
warning = "warn",
|
||||
hint = "hint",
|
||||
information = "info"
|
||||
},
|
||||
use_diagnostic_signs = false -- enabling this will use the signs defined in your lsp client
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>tt", function()
|
||||
require("trouble").toggle()
|
||||
end)
|
||||
|
||||
vim.keymap.set("n", "<leader>[d", function()
|
||||
require("trouble").next({skip_groups = true, jump = true})
|
||||
end)
|
||||
|
||||
vim.keymap.set("n", "<leader>]d", function()
|
||||
require("trouble").previous({skip_groups = true, jump = true})
|
||||
end)
|
||||
end
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
vim.cmd [[autocmd BufWritePre <buffer> lua vim.lsp.buf.format()]]
|
||||
|
||||
vim.opt.nu = true
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.softtabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = true
|
||||
|
||||
-- highlight search
|
||||
|
||||
Reference in New Issue
Block a user