feat: change to lazyvim

This commit is contained in:
Fabio Lenherr / DashieTM 2023-02-23 00:52:02 +01:00
parent defb419723
commit 3906d422e8
38 changed files with 892 additions and 1541 deletions

View file

@ -0,0 +1,3 @@
-- Autocmds are automatically loaded on the VeryLazy event
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
-- Add any additional autocmds here

View file

@ -0,0 +1,92 @@
-- maps are automatically loaded on the VeryLazy event
-- Default maps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/maps.lua
-- Add any additional maps here
local Util = require("lazyvim.util")
local function map(mode, lhs, rhs, opts)
local keys = require("lazy.core.handler").handlers.keys
---@cast keys LazyKeysHandler
-- do not create the map if a lazy keys handler exists
if not keys.active[keys.parse({ lhs, mode = mode }).id] then
opts = opts or {}
opts.silent = opts.silent ~= false
vim.keymap.set(mode, lhs, rhs, opts)
end
end
local opts = { noremap = true, silent = true }
local term_opts = { silent = true }
-- debug
map("n", "<F5>", ':lua require("dap").toggle_breakpoint()<CR>', opts)
map("n", "<F6>", ':lua require("dap").step_over()<CR>', opts)
map("n", "<F7>", ':lua require("dap").step_into()<CR>', opts)
map("n", "<F8>", ':lua require("dapui").toggle()<CR> :lua require("dap").continue()<CR> ', opts)
map("n", "<F9>", ':lua require("dap").continue()<CR>', opts)
map("n", "<F10>", ':lua require("dap").close()<CR> :lua require("dapui").toggle()<CR>', opts)
-- file tree
map("n", "f", ":Neotree action=focus toggle=true<CR>", opts)
-- toggle terminal
map("n", "<C-d>", ":lua require('toggleterm').toggle(1)<CR>", opts)
-- tab switching
map("n", "<F1>", ":BufferPrev<CR>", opts)
map("n", "<F2>", ":BufferNext<CR>", opts)
-- formatting
map("n", "<F4>", ":lua vim.lsp.buf.format { async = true }<CR>", opts)
map("n", "<leader>a", ":Telescope lsp_definitions<CR>", opts)
map("n", "<leader>s", ":Telescope lsp_references<CR>", opts)
map("n", "<leader>d", ":Telescope lsp_type_definitions<CR>", opts)
map("n", "<leader>f", ":Telescope lsp_implementations<CR>", opts)
map("n", "<leader>q", ":lua vim.lsp.buf.code_action()<CR>", opts)
map("n", "<leader>w", ":lua vim.lsp.buf.signature_help()<CR>", opts)
map("n", "<leader>e", ":lua vim.lsp.buf.hover()<CR>", opts)
map("n", "<leader>r", ":lua vim.lsp.buf.rename()<CR>", opts)
map("n", "<leader>gq", ":lua require('telescope.builtin').git_commits()<CR>", opts)
map("n", "<leader>gw", ":lua require('telescope.builtin').git_bcommits()<CR>", opts)
map("n", "<leader>ge", ":lua require('telescope.builtin').git_branches()<CR>", opts)
map("n", "<leader>gr", ":lua require('telescope.builtin').git_status()<CR>", opts)
map("n", "<leader>ga", ":lua require('telescope.builtin').git_stash()<CR>", opts)
-- window switching
function _G.set_terminal_maps()
local opts = { buffer = 0 }
vim.keymap.set("t", "<esc>", [[<C-\><C-n>]], opts)
vim.keymap.set("t", "jk", [[<C-\><C-n>]], opts)
vim.keymap.set("t", "<A-h>", [[<Cmd>wincmd h<CR>]], opts)
vim.keymap.set("t", "<A-j>", [[<Cmd>wincmd j<CR>]], opts)
vim.keymap.set("t", "<A-k>", [[<Cmd>wincmd k<CR>]], opts)
vim.keymap.set("t", "<A-l>", [[<Cmd>wincmd l<CR>]], opts)
end
-- if you only want these mappings for toggle term use term://*toggleterm#* instead
vim.cmd("autocmd! TermOpen term://* lua set_terminal_maps()")
map("n", "<A-h>", ":wincmd h<CR>", opts)
map("n", "<A-j>", ":wincmd j<CR>", opts)
map("n", "<A-K>", ":wincmd k<CR>", opts)
map("n", "<A-l>", ":wincmd l<CR>", opts)
-- harpoon man
map("n", "<C-1>", ":lua require('harpoon.ui').nav_file(1)<CR>", opts)
map("n", "<C-2>", ":lua require('harpoon.ui').nav_file(2)<CR>", opts)
map("n", "<C-3>", ":lua require('harpoon.ui').nav_file(3)<CR>", opts)
map("n", "fma", ":lua require('harpoon.mark').add_file()<CR>", opts)
map("n", "fmd", ":lua require('harpoon.mark').remove_file()<CR>", opts)
-- telescope
map("n", "fb", ":Telescope file_browser<CR>", {})
map("n", "fc", ":Cheatsheet<CR>", {})
map("n", "ff", ":lua require('telescope.builtin').find_files()<CR>", {})
map("n", "fg", ":lua require('telescope.builtin').live_grep()<CR>", {})
map("n", "fh", ":lua require('telescope.builtin').help_tags()<CR>", {})
map("n", "fp", ":lua require'telescope'.extensions.project.project{}<CR>", { noremap = true, silent = true })
map("n", "fm", ":Telescope harpoon marks<CR>", { noremap = true, silent = true })
vim.keymap.set("n", "<leader>z", ":lua require('telescope').extensions.zoxide.list{}<CR>")
-- trouble
map("n", "<C-f>", "<cmd>TroubleToggle<CR>", term_opts)

46
nvim/lua/config/lazy.lua Normal file
View file

@ -0,0 +1,46 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
-- bootstrap lazy.nvim
-- stylua: ignore
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
require("lazy").setup({
spec = {
-- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- import any extras modules here
-- { import = "lazyvim.plugins.extras.lang.typescript" },
-- { import = "lazyvim.plugins.extras.lang.json" },
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
-- import/override with your plugins
{ import = "plugins" },
},
defaults = {
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
lazy = false,
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
-- have outdated releases, which may break your Neovim install.
version = false, -- always use the latest git commit
-- version = "*", -- try installing the latest stable version for plugins that support semver
},
install = { colorscheme = { "tokyonight", "habamax" } },
checker = { enabled = true }, -- automatically check for plugin updates
performance = {
rtp = {
-- disable some rtp plugins
disabled_plugins = {
"gzip",
-- "matchit",
-- "matchparen",
-- "netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
})

View file

@ -0,0 +1,20 @@
-- Options are automatically loaded before lazy.nvim startup
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
-- Add any additional options here
local options = {
clipboard = "unnamedplus",
mouse = "n",
fileencoding = "utf-8",
number = true,
showmode = true,
termguicolors = true,
spelllang = "en_us",
shell = "/usr/bin/zsh",
autochdir = true,
}
vim.g.mkdp_browser = "/usr/bin/firefox"
vim.g.mkdp_auto_start = 1
for k, v in pairs(options) do
vim.opt[k] = v
end

137
nvim/lua/plugins/dap.lua Normal file
View file

@ -0,0 +1,137 @@
return {
{
"mfussenegger/nvim-dap",
dependencies = {
"rcarriga/nvim-dap-ui",
"theHamsta/nvim-dap-virtual-text",
"jayp0521/mason-nvim-dap.nvim",
},
config = function()
local dap = require("dap")
dap.adapters.lldb = {
type = "executable",
command = "/usr/bin/lldb-vscode",
name = "lldb",
}
local rust_dap = vim.fn.getcwd()
local filename = ""
for w in rust_dap:gmatch("([^/]+)") do
filename = w
end
dap.configurations.rust = {
{
type = "lldb",
request = "launch",
program = function()
return rust_dap .. "/target/debug/" .. filename
end,
--program = '${fileDirname}/${fileBasenameNoExtension}',
cwd = "${workspaceFolder}",
stopOnEntry = true,
terminal = "integrated",
},
}
dap.configurations.cpp = {
{
name = "debug cpp",
type = "lldb",
request = "launch",
program = function()
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/build/", "file")
end,
cwd = "${workspaceFolder}",
stopOnEntry = true,
terminal = "integrated",
},
}
dap.configurations.c = dap.configurations.cpp
require("dapui").setup({
icons = { expanded = "", collapsed = "", current_frame = "" },
mappings = {
-- Use a table to apply multiple mappings
expand = { "<CR>", "<2-LeftMouse>" },
open = "o",
remove = "d",
edit = "e",
repl = "r",
toggle = "t",
},
-- Expand lines larger than the window
-- Requires >= 0.7
expand_lines = vim.fn.has("nvim-0.7") == 1,
-- Layouts define sections of the screen to place windows.
-- The position can be "left", "right", "top" or "bottom".
-- The size specifies the height/width depending on position. It can be an Int
-- or a Float. Integer specifies height/width directly (i.e. 20 lines/columns) while
-- Float value specifies percentage (i.e. 0.3 - 30% of available lines/columns)
-- Elements are the elements shown in the layout (in order).
-- Layouts are opened in order so that earlier layouts take priority in window sizing.
layouts = {
{
elements = {
-- Elements can be strings or table with id and size keys.
{ id = "scopes", size = 0.25 },
"breakpoints",
"stacks",
"watches",
},
size = 40, -- 40 columns
position = "left",
},
{
elements = {
"repl",
"console",
},
size = 0.25, -- 25% of total lines
position = "bottom",
},
},
controls = {
-- Requires Neovim nightly (or 0.8 when released)
enabled = true,
-- Display controls in this element
element = "repl",
icons = {
pause = "",
play = "",
step_into = "",
step_over = "",
step_out = "",
step_back = "",
run_last = "",
terminate = "",
},
},
floating = {
max_height = nil, -- These can be integers or a float between 0 and 1.
max_width = nil, -- Floats will be treated as percentage of your screen.
border = "single", -- Border style. Can be "single", "double" or "rounded"
mappings = {
close = { "q", "<Esc>" },
},
},
windows = { indent = 1 },
render = {
max_type_length = nil, -- Can be integer or nil.
max_value_lines = 100, -- Can be integer or nil.
},
})
require("mason-nvim-dap").setup({
ensure_installed = {
"bash-debug-adapter",
"firefox-debug-adapter",
"js-debug-adapter",
"node-debug2-adapter",
},
})
require("nvim-dap-virtual-text").setup()
end,
},
}

View file

@ -0,0 +1,73 @@
return {
{
"goolord/alpha-nvim",
event = "VimEnter",
opts = function()
local status_ok, alpha = pcall(require, "alpha")
if not status_ok then
return
end
local dashboard = require("alpha.themes.dashboard")
dashboard.section.header.val = {
[[ _______ ___ _______. __ __ __ _______ ]],
[[| \ / \ / || | | | | | | ____|]],
[[| .--. | / ^ \ | (----`| |__| | | | | |__ ]],
[[| | | | / /_\ \ \ \ | __ | | | | __| ]],
[[| '--' | / _____ \ .----) | | | | | | | | |____ ]],
[[|_______/ /__/ \__\ |_______/ |__| |__| |__| |_______|]],
}
dashboard.section.buttons.val = {
dashboard.button("f", " Find file", ":lua require('telescope.builtin').find_files()<CR>"),
dashboard.button(
"b",
" Open File Browser",
":lua require('telescope').extensions.file_browser.file_browser{}<CR>"
),
dashboard.button("e", " New file", ":ene <BAR> startinsert <CR>"),
dashboard.button("p", " Find project", ":lua require('telescope').extensions.project.project{}<CR>"),
dashboard.button("r", " Recently used files", ":lua require('telescope.builtin').oldfiles() <CR>"),
dashboard.button("t", " Zoxide", ":lua require('telescope').extensions.zoxide.list{}<CR>"),
dashboard.button("c", " Configuration", ":e ~/.config/nvim/init.lua <CR>"),
dashboard.button("q", " Quit Neovim", ":qa<CR>"),
}
local function footer()
return "dashie@dashie.org"
end
dashboard.section.footer.val = footer()
dashboard.section.footer.opts.hl = "Type"
dashboard.section.header.opts.hl = "Include"
dashboard.section.buttons.opts.hl = "Keyword"
dashboard.opts.opts.noautocmd = true
alpha.setup(dashboard.opts)
end,
config = function(_, dashboard)
-- close Lazy and re-open when the dashboard is ready
if vim.o.filetype == "lazy" then
vim.cmd.close()
vim.api.nvim_create_autocmd("User", {
pattern = "AlphaReady",
callback = function()
require("lazy").show()
end,
})
end
require("alpha").setup(dashboard.opts)
vim.api.nvim_create_autocmd("User", {
pattern = "LazyVimStarted",
callback = function()
local stats = require("lazy").stats()
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
dashboard.section.footer.val = "⚡ Neovim loaded " .. stats.count .. " plugins in " .. ms .. "ms"
pcall(vim.cmd.AlphaRedraw)
end,
})
end,
},
}

145
nvim/lua/plugins/lsp.lua Normal file
View file

@ -0,0 +1,145 @@
return {
{
"neovim/nvim-lspconfig",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
{ "folke/neoconf.nvim", cmd = "Neoconf", config = true },
{ "folke/neodev.nvim", opts = { experimental = { pathStrict = true } } },
"mason.nvim",
"williamboman/mason-lspconfig.nvim",
"lvimuser/lsp-inlayhints.nvim",
{
"hrsh7th/cmp-nvim-lsp",
cond = function()
return require("lazyvim.util").has("nvim-cmp")
end,
},
},
---@class PluginLspOpts
opts = {
-- options for vim.diagnostic.config()
diagnostics = {
underline = true,
update_in_insert = false,
virtual_text = { spacing = 4, prefix = "" },
severity_sort = true,
},
-- Automatically format on save
autoformat = true,
-- options for vim.lsp.buf.format
-- `bufnr` and `filter` is handled by the LazyVim formatter,
-- but can be also overridden when specified
format = {
formatting_options = nil,
timeout_ms = nil,
},
-- LSP Server Settings
---@type lspconfig.options
servers = {
jsonls = {},
lua_ls = {
-- mason = false, -- set to false if you don't want this server to be installed with mason
settings = {
Lua = {
workspace = {
checkThirdParty = false,
},
completion = {
callSnippet = "Replace",
},
},
},
},
},
-- you can do any additional lsp server setup here
-- return true if you don't want this server to be setup with lspconfig
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
setup = {
-- example to setup with typescript.nvim
-- tsserver = function(_, opts)
-- require("typescript").setup({ server = opts })
-- return true
-- end,
-- Specify * to use this function as a fallback for any server
-- ["*"] = function(server, opts) end,
},
},
---@param opts PluginLspOpts
config = function(plugin, opts)
-- setup autoformat
require("lazyvim.plugins.lsp.format").autoformat = opts.autoformat
-- setup formatting and keymaps
require("lazyvim.util").on_attach(function(client, buffer)
require("lazyvim.plugins.lsp.format").on_attach(client, buffer)
require("lazyvim.plugins.lsp.keymaps").on_attach(client, buffer)
end)
-- diagnostics
for name, icon in pairs(require("lazyvim.config").icons.diagnostics) do
name = "DiagnosticSign" .. name
vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" })
end
vim.diagnostic.config(opts.diagnostics)
require("lsp-inlayhints").setup({})
local servers = opts.servers
local capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
local on_attach = function(client, bufnr)
vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc")
local optslsp = { noremap = false, silent = true, buffer = bufnr }
require("lsp-inlayhints").on_attach(client, bufnr)
end
local function setup(server)
local server_opts = vim.tbl_deep_extend("force", {
capabilities = vim.deepcopy(capabilities),
on_attach = on_attach,
vim.lsp.diagnostic.on_publish_diagnostics,
{
-- Disable virtual_text
virtual_text = true,
},
}, servers[server] or {})
if opts.setup[server] then
if opts.setup[server](server, server_opts) then
return
end
elseif opts.setup["*"] then
if opts.setup["*"](server, server_opts) then
return
end
end
require("lspconfig")[server].setup(server_opts)
end
-- temp fix for lspconfig rename
-- https://github.com/neovim/nvim-lspconfig/pull/2439
local mappings = require("mason-lspconfig.mappings.server")
if not mappings.lspconfig_to_package.lua_ls then
mappings.lspconfig_to_package.lua_ls = "lua-language-server"
mappings.package_to_lspconfig["lua-language-server"] = "lua_ls"
end
local mlsp = require("mason-lspconfig")
local available = mlsp.get_available_servers()
local ensure_installed = {} ---@type string[]
for server, server_opts in pairs(servers) do
if server_opts then
server_opts = server_opts == true and {} or server_opts
-- run manual setup if mason=false or if this is a server that cannot be installed with mason-lspconfig
if server_opts.mason == false or not vim.tbl_contains(available, server) then
setup(server)
else
ensure_installed[#ensure_installed + 1] = server
end
end
end
require("mason-lspconfig").setup({ ensure_installed = ensure_installed })
require("mason-lspconfig").setup_handlers({ setup })
vim.cmd([[highlight LspInlayHint guibg=#192330]])
end,
},
}

View file

@ -0,0 +1,78 @@
return {
{
"LazyVim/LazyVim",
opts = {
colorscheme = "tokyonight-night",
},
},
{
"akinsho/toggleterm.nvim",
},
{
"brenoprata10/nvim-highlight-colors",
config = function(_, _)
require("nvim-highlight-colors").setup()
vim.cmd(":hi clear CursorLine")
vim.cmd(":hi clear CursorLineFold")
vim.cmd(":hi clear CursorLineSign")
end,
},
{
"gpanders/editorconfig.nvim",
},
{
"lvimuser/lsp-inlayhints.nvim",
},
{
"ThePrimeagen/harpoon",
config = function()
require("telescope").load_extension("harpoon")
end,
},
{
"iamcco/markdown-preview.nvim",
},
{
"nvim-telescope/telescope-project.nvim",
},
{
"nvim-telescope/telescope-file-browser.nvim",
config = function()
require("telescope").load_extension("file_browser")
end,
},
{
"jvgrootveld/telescope-zoxide",
config = function()
local z_utils = require("telescope._extensions.zoxide.utils")
local t = require("telescope")
-- Configure the extension
t.setup({
extensions = {
zoxide = {
prompt_title = "[ Queries ]",
mappings = {
default = {
after_action = function(selection)
print("Update to (" .. selection.z_score .. ") " .. selection.path)
end,
},
["<C-s>"] = {
before_action = function(selection)
print("before C-s")
end,
action = function(selection)
vim.cmd("edit " .. selection.path)
end,
},
["<C-q>"] = { action = z_utils.create_basic_command("split") },
},
},
},
})
-- Load the extension
t.load_extension("zoxide")
end,
},
}

View file

@ -1,6 +0,0 @@
{
"trailingComma": "all",
"tabWidth": 4,
"semi": true,
"singleQuote": true
}

View file

@ -1,34 +0,0 @@
vim.cmd('let g:vimtex_view_general_viewer = "evince"')
vim.cmd('let g:vimtex_compiler_method = "latexmk"')
-- colorscheme
local options = {
transparent = false,
}
local palettes = {
nightfox = {
bg1 = "#1A1B27",
},
}
require("nightfox").setup({
palettes = palettes,
options = options,
})
vim.cmd("colorscheme nightfox")
vim.cmd([[highlight TabLineSel guifg=#192330 guibg=#192330]])
vim.cmd([[highlight BufferCurrent guifg=#FFFFFF guibg=#192330]])
vim.cmd([[highlight BufferCurrentIndex guifg=#FFFFFF guibg=#192330]])
vim.cmd([[highlight BufferCurrentMod guifg=#dbc074 guibg=#192330]])
vim.cmd([[highlight BufferCurrentSign guifg=#719cd6 guibg=#192330]])
vim.cmd([[highlight BufferCurrentTarget guifg=#c94f6d guibg=#192330]])
vim.cmd([[highlight BufferInactive guifg=#888888 guibg=#131a24]])
vim.cmd([[highlight BufferInactiveMod guifg=#dbc074 guibg=#131a24]])
vim.cmd([[highlight BufferInactiveSign guifg=#719cd6 guibg=#131a24]])
vim.cmd([[highlight LspInlayHint guibg=#192330]])
vim.cmd(":syntax off")
vim.cmd([[highlight CursorLine guibg=#1A1B27]])
vim.cmd([[highlight CursorLineSign guibg=#1A1B27]])
vim.cmd([[highlight CursorLineFold guibg=#1A1B27]])

View file

@ -1,42 +0,0 @@
-- Set barbar's options
require("bufferline").setup({
animation = true,
auto_hide = false,
tabpages = true,
closable = true,
clickable = true,
exclude_name = { "package.json" },
icons = true,
icon_custom_colors = false,
icon_separator_active = "",
icon_separator_inactive = "",
icon_close_tab = "",
icon_close_tab_modified = "",
icon_pinned = "",
insert_at_end = false,
maximum_padding = 1,
minimum_padding = 1,
maximum_length = 30,
semantic_letters = true,
letters = "asdfjkl;ghnmxcvbziowerutyqpASDFJKLGHNMXCVBZIOWERUTYQP",
no_name_title = nil,
})
local nvim_tree_events = require("nvim-tree.events")
local bufferline_api = require("bufferline.api")
local function get_tree_size()
return require("nvim-tree.view").View.width
end
nvim_tree_events.subscribe("TreeOpen", function()
bufferline_api.set_offset(0)
end)
nvim_tree_events.subscribe("Resize", function()
bufferline_api.set_offset(0)
end)
nvim_tree_events.subscribe("TreeClose", function()
bufferline_api.set_offset(0)
end)

View file

@ -1,151 +0,0 @@
local cmp_status_ok, cmp = pcall(require, "cmp")
if not cmp_status_ok then
return
end
local snip_status_ok, luasnip = pcall(require, "luasnip")
if not snip_status_ok then
return
end
require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/snippets" })
luasnip.config.set_config({
history = true,
delete_check_events = "TextChanged",
updateevents = "TextChanged,TextChangedI",
enable_autosnippets = true,
ext_opts = {
[require("luasnip.util.types").choiceNode] = {
active = {
virt_text = { {
Snippet = "",
"Snippet",
} },
},
},
},
})
require("luasnip/loaders/from_vscode").lazy_load()
local check_backspace = function()
local col = vim.fn.col(".") - 1
return col == 0 or vim.fn.getline("."):sub(col, col):match("%s")
end
--   פּ ﯟ   some other good icons
local kind_icons = {
Text = "",
Method = "m",
Function = "",
Constructor = "",
Field = "",
Variable = "",
Class = "",
Interface = "",
Module = "",
Property = "",
Unit = "",
Value = "",
Enum = "",
Keyword = "",
Snippet = "",
Color = "",
File = "",
Reference = "",
Folder = "",
EnumMember = "",
Constant = "",
Struct = "",
Event = "",
Operator = "",
TypeParameter = "",
}
-- find more here: https://www.nerdfonts.com/cheat-sheet
cmp.setup({
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body) -- For `luasnip` users.
end,
},
mapping = {
["<C-b>"] = cmp.mapping.scroll_docs(-1),
["<C-f>"] = cmp.mapping.scroll_docs(1),
["<C-e>"] = cmp.mapping({
i = cmp.mapping.abort(),
c = cmp.mapping.close(),
}),
["<CR>"] = cmp.mapping.confirm({ select = false }),
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end, {
"i",
"s",
}),
["<C-j>"] = cmp.mapping(function(fallback)
if luasnip.expandable() then
luasnip.expand()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end, {
"i",
"s",
}),
["<C-k>"] = cmp.mapping(function(fallback)
if luasnip.expand_or_jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, {
"i",
"s",
}),
},
view = {
{ entries = "native" },
},
formatting = {
fields = { "kind", "abbr", "menu" },
format = function(entry, vim_item)
vim_item.kind = string.format("%s", kind_icons[vim_item.kind])
vim_item.menu = ({
nvim_lsp = "[LSP]",
luasnip = "[Snippet]",
buffer = "[Buffer]",
path = "[Path]",
})[entry.source.name]
return vim_item
end,
},
sources = {
{ name = "nvim_lsp" },
{ name = "luasnip" },
{ name = "path" },
{ name = "buffer" },
},
window = {
documentation = {
border = { "", "", "", "", "", "", "", "" },
},
},
experimental = {
ghost_text = true,
},
})

View file

@ -1,123 +0,0 @@
local dap = require("dap")
dap.adapters.lldb = {
type = 'executable',
command = '/usr/bin/lldb-vscode',
name = "lldb"
}
local rust_dap = vim.fn.getcwd()
local filename = ""
for w in rust_dap:gmatch("([^/]+)") do filename = w end
dap.configurations.rust = {
{
type = "lldb",
request = "launch",
program = function()
return rust_dap .. "/target/debug/" .. filename
end,
--program = '${fileDirname}/${fileBasenameNoExtension}',
cwd = "${workspaceFolder}",
stopOnEntry = true,
terminal = "integrated",
},
}
dap.configurations.cpp = {
{
name = "debug cpp",
type = "lldb",
request = "launch",
program = function()
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/build/", "file")
end,
cwd = "${workspaceFolder}",
stopOnEntry = true,
terminal = "integrated",
},
}
dap.configurations.c = dap.configurations.cpp
require("dapui").setup({
icons = { expanded = "", collapsed = "", current_frame = "" },
mappings = {
-- Use a table to apply multiple mappings
expand = { "<CR>", "<2-LeftMouse>" },
open = "o",
remove = "d",
edit = "e",
repl = "r",
toggle = "t",
},
-- Expand lines larger than the window
-- Requires >= 0.7
expand_lines = vim.fn.has("nvim-0.7") == 1,
-- Layouts define sections of the screen to place windows.
-- The position can be "left", "right", "top" or "bottom".
-- The size specifies the height/width depending on position. It can be an Int
-- or a Float. Integer specifies height/width directly (i.e. 20 lines/columns) while
-- Float value specifies percentage (i.e. 0.3 - 30% of available lines/columns)
-- Elements are the elements shown in the layout (in order).
-- Layouts are opened in order so that earlier layouts take priority in window sizing.
layouts = {
{
elements = {
-- Elements can be strings or table with id and size keys.
{ id = "scopes", size = 0.25 },
"breakpoints",
"stacks",
"watches",
},
size = 40, -- 40 columns
position = "left",
},
{
elements = {
"repl",
"console",
},
size = 0.25, -- 25% of total lines
position = "bottom",
},
},
controls = {
-- Requires Neovim nightly (or 0.8 when released)
enabled = true,
-- Display controls in this element
element = "repl",
icons = {
pause = "",
play = "",
step_into = "",
step_over = "",
step_out = "",
step_back = "",
run_last = "",
terminate = "",
},
},
floating = {
max_height = nil, -- These can be integers or a float between 0 and 1.
max_width = nil, -- Floats will be treated as percentage of your screen.
border = "single", -- Border style. Can be "single", "double" or "rounded"
mappings = {
close = { "q", "<Esc>" },
},
},
windows = { indent = 1 },
render = {
max_type_length = nil, -- Can be integer or nil.
max_value_lines = 100, -- Can be integer or nil.
},
})
require("mason-nvim-dap").setup({
ensure_installed = {
"bash-debug-adapter",
"firefox-debug-adapter",
"js-debug-adapter",
"node-debug2-adapter",
},
})
require("nvim-dap-virtual-text").setup()

View file

@ -1,37 +0,0 @@
local status_ok, alpha = pcall(require, "alpha")
if not status_ok then
return
end
local dashboard = require("alpha.themes.dashboard")
dashboard.section.header.val = {
[[ _______ ___ _______. __ __ __ _______ ]],
[[| \ / \ / || | | | | | | ____|]],
[[| .--. | / ^ \ | (----`| |__| | | | | |__ ]],
[[| | | | / /_\ \ \ \ | __ | | | | __| ]],
[[| '--' | / _____ \ .----) | | | | | | | | |____ ]],
[[|_______/ /__/ \__\ |_______/ |__| |__| |__| |_______|]]
}
dashboard.section.buttons.val = {
dashboard.button("f", " Find file", ":Telescope find_files <CR>"),
dashboard.button("b", " Open File Browser", ":Telescope file_browser<CR>"),
dashboard.button("e", " New file", ":ene <BAR> startinsert <CR>"),
dashboard.button("p", " Find project", ":Telescope project <CR>"),
dashboard.button("r", " Recently used files", ":Telescope oldfiles <CR>"),
dashboard.button("t", " Zoxide", ":Telescope zoxide list <CR>"),
dashboard.button("c", " Configuration", ":e ~/.config/nvim/init.lua <CR>"),
dashboard.button("q", " Quit Neovim", ":qa<CR>"),
}
local function footer()
return "dashie@dashie.org"
end
dashboard.section.footer.val = footer()
dashboard.section.footer.opts.hl = "Type"
dashboard.section.header.opts.hl = "Include"
dashboard.section.buttons.opts.hl = "Keyword"
dashboard.opts.opts.noautocmd = true
alpha.setup(dashboard.opts)

View file

@ -1,22 +0,0 @@
local status_ok, _ = pcall(require, "nvim-web-devicons")
if not status_ok then
return
end
require 'nvim-web-devicons'.setup {
-- your personnal icons can go here (to override)
-- you can specify color or cterm_color instead of specifying both of them
-- DevIcon will be appended to `name`
override = {
zsh = {
icon = "",
color = "#428850",
cterm_color = "65",
name = "Zsh"
}
};
default = true;
}
require 'nvim-web-devicons'.get_icons()

View file

@ -1,11 +0,0 @@
local status_ok, indent_blankline = pcall(require, "indent_blankline")
if not status_ok then
return
end
vim.opt.list = true
require("indent_blankline").setup {
space_char_blankline = " ",
show_current_context = true,
show_current_context_start = true,
}

View file

@ -1,85 +0,0 @@
local opts = { noremap = true, silent = true }
local term_opts = { silent = true }
local keymap = vim.api.nvim_set_keymap
-- debug
keymap("n", "<F5>", ':lua require("dap").toggle_breakpoint()<CR>', opts)
keymap("n", "<F6>", ':lua require("dap").step_over()<CR>', opts)
keymap("n", "<F7>", ':lua require("dap").step_into()<CR>', opts)
keymap("n", "<F8>", ':lua require("dapui").toggle()<CR> :lua require("dap").continue()<CR> ', opts)
keymap("n", "<F9>", ':lua require("dap").continue()<CR>', opts)
keymap("n", "<F10>", ':lua require("dap").close()<CR> :lua require("dapui").toggle()<CR>', opts)
-- file tree
keymap("n", "f", ':lua require("nvim-tree").toggle()<CR>', opts)
-- toggle terminal
keymap('n', '<C-d>', ':ToggleTerm ZSH<CR>', opts)
-- tab switching
keymap("n", "<F1>", ":BufferPrev<CR>", opts)
keymap("n", "<F2>", ":BufferNext<CR>", opts)
-- formatting
keymap("n", "<F4>", ":lua vim.lsp.buf.format { async = true }<CR>", opts)
keymap("n", "<leader>a", ":Telescope lsp_definitions<CR>", opts)
keymap("n", "<leader>s", ":Telescope lsp_references<CR>", opts)
keymap("n", "<leader>d", ":Telescope lsp_type_definitions<CR>", opts)
keymap("n", "<leader>f", ":Telescope lsp_implementations<CR>", opts)
keymap("n", "<leader>q", ":lua vim.lsp.buf.code_action()<CR>", opts)
keymap("n", "<leader>w", ":lua vim.lsp.buf.signature_help()<CR>", opts)
keymap("n", "<leader>e", ":lua vim.lsp.buf.hover()<CR>", opts)
keymap("n", "<leader>r", ":lua vim.lsp.buf.rename()<CR>", opts)
keymap("n", "<leader>gq", ":lua require('telescope.builtin').git_commits()<CR>", opts)
keymap("n", "<leader>gw", ":lua require('telescope.builtin').git_bcommits()<CR>", opts)
keymap("n", "<leader>ge", ":lua require('telescope.builtin').git_branches()<CR>", opts)
keymap("n", "<leader>gr", ":lua require('telescope.builtin').git_status()<CR>", opts)
keymap("n", "<leader>ga", ":lua require('telescope.builtin').git_stash()<CR>", opts)
-- window switching
function _G.set_terminal_keymaps()
local opts = { buffer = 0 }
vim.keymap.set('t', '<esc>', [[<C-\><C-n>]], opts)
vim.keymap.set('t', 'jk', [[<C-\><C-n>]], opts)
vim.keymap.set('t', '<A-h>', [[<Cmd>wincmd h<CR>]], opts)
vim.keymap.set('t', '<A-j>', [[<Cmd>wincmd j<CR>]], opts)
vim.keymap.set('t', '<A-k>', [[<Cmd>wincmd k<CR>]], opts)
vim.keymap.set('t', '<A-l>', [[<Cmd>wincmd l<CR>]], opts)
end
-- if you only want these mappings for toggle term use term://*toggleterm#* instead
vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()')
keymap("n", "<A-h>", ":wincmd h<CR>", opts)
keymap("n", "<A-j>", ":wincmd j<CR>", opts)
keymap("n", "<A-K>", ":wincmd k<CR>", opts)
keymap("n", "<A-l>", ":wincmd l<CR>", opts)
-- harpoon man
keymap("n", "<C-1>", ":lua require('harpoon.ui').nav_file(1)<CR>", opts)
keymap("n", "<C-2>", ":lua require('harpoon.ui').nav_file(2)<CR>", opts)
keymap("n", "<C-3>", ":lua require('harpoon.ui').nav_file(3)<CR>", opts)
keymap("n", "fma", ":lua require('harpoon.mark').add_file()<CR>", opts)
keymap("n", "fmd", ":lua require('harpoon.mark').remove_file()<CR>", opts)
-- telescope
keymap("n", "fb", ":Telescope file_browser<CR>", {})
keymap("n", "fc", ":Cheatsheet<CR>", {})
keymap("n", "ff", ":lua require('telescope.builtin').find_files()<CR>", {})
keymap("n", "fg", ":lua require('telescope.builtin').live_grep()<CR>", {})
keymap("n", "fh", ":lua require('telescope.builtin').help_tags()<CR>", {})
keymap("n", "fp", ":lua require'telescope'.extensions.project.project{}<CR>", { noremap = true, silent = true })
keymap("n", "fm", ":Telescope harpoon marks<CR>", { noremap = true, silent = true })
vim.keymap.set("n", "<leader>z", ":lua require('telescope').extensions.zoxide.list{}<CR>")
-- trouble
keymap("n", "<C-f>", "<cmd>TroubleToggle<CR>", term_opts)
require("trouble").setup({
action_keys = {
--remove the fucking stupid keymap amk
open_tab = {},
},
})

View file

@ -1,110 +0,0 @@
local status_ok, _ = pcall(require, "lspconfig")
if not status_ok then
return
end
require("mason").setup({
ui = {
icons = {
package_installed = "",
package_pending = "",
package_uninstalled = "",
},
},
})
require("mason-lspconfig").setup({
ensure_installed = {
"cssls", -- css
"html", -- html
"clangd", -- cpp / c
"lua_ls", -- lua
"pyright", -- python
"cmake", -- cmake
"bashls", -- shell
"ansiblels", -- ansible
"marksman", -- markdown
"asm_lsp", -- assembly
"tsserver", -- js and ts
"ltex", -- latex
"jdtls", -- jafuck
"gopls", -- yet another gargabe collector
"sqls", -- sql
"taplo", -- toml
"lemminx", -- xml
"yamlls", -- yaml
"bashls", -- shell
},
automatic_installation = true,
})
local capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
capabilities.textDocument.completion.completionItem.snippetSupport = true
-- LSP
require("lsp-inlayhints").setup {}
local on_attach = function(client, bufnr)
vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc")
local optslsp = { noremap = false, silent = true, buffer = bufnr }
-- require("lsp-format").on_attach(client)
require("lsp-inlayhints").on_attach(client, bufnr)
end
require("rust-tools").setup({
server = {
root_dir = require('lspconfig').util.find_git_ancestor,
},
})
require("mason-lspconfig").setup_handlers({
function(server_name) -- default handler (optional)
require("lspconfig")[server_name].setup({
capabilities = capabilities,
on_attach = on_attach,
vim.lsp.diagnostic.on_publish_diagnostics, {
-- Disable virtual_text
virtual_text = true,
}
})
end,
['tsserver'] = function()
require('lspconfig').tsserver.setup {
settings = {
typescript = {
inlayHints = {
includeInlayParameterNameHints = 'all',
includeInlayParameterNameHintsWhenArgumentMatchesName = true,
includeInlayFunctionParameterTypeHints = true,
includeInlayVariableTypeHints = true,
includeInlayPropertyDeclarationTypeHints = true,
includeInlayFunctionLikeReturnTypeHints = true,
includeInlayEnumMemberValueHints = true,
}
},
javascript = {
inlayHints = {
includeInlayParameterNameHints = 'all',
includeInlayParameterNameHintsWhenArgumentMatchesName = true,
includeInlayFunctionParameterTypeHints = true,
includeInlayVariableTypeHints = true,
includeInlayPropertyDeclarationTypeHints = true,
includeInlayFunctionLikeReturnTypeHints = true,
includeInlayEnumMemberValueHints = true,
}
}
},
capabilities = capabilities,
on_attach = on_attach,
vim.lsp.diagnostic.on_publish_diagnostics, {
virtual_text = true,
}
}
end,
})
-- special server setups
require("clangd_extensions").setup(
-- brudi no troll plox
)

View file

@ -1,262 +0,0 @@
-- following options are the default
-- each of these are documented in `:help nvim-tree.OPTION_NAME`
local status_ok, nvim_tree = pcall(require, "nvim-tree")
if not status_ok then
return
end
local config_status_ok, nvim_tree_config = pcall(require, "nvim-tree.config")
if not config_status_ok then
return
end
nvim_tree.setup { -- BEGIN_DEFAULT_OPTS
auto_reload_on_write = true,
create_in_closed_folder = false,
disable_netrw = false,
hijack_cursor = false,
hijack_netrw = true,
hijack_unnamed_buffer_when_opening = false,
open_on_setup = false,
open_on_setup_file = false,
open_on_tab = false,
sort_by = "name",
root_dirs = {},
prefer_startup_root = false,
sync_root_with_cwd = true,
reload_on_bufenter = false,
respect_buf_cwd = true,
on_attach = "disable", -- function(bufnr). If nil, will use the deprecated mapping strategy
remove_keymaps = false, -- boolean (disable totally or not) or list of key (lhs)
view = {
adaptive_size = false,
centralize_selection = false,
width = 30,
hide_root_folder = false,
side = "right",
preserve_window_proportions = false,
number = false,
relativenumber = false,
signcolumn = "yes",
-- @deprecated
mappings = {
custom_only = false,
list = {
-- user mappings go here
},
},
float = {
enable = false,
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",
root_folder_modifier = ":~",
indent_width = 2,
indent_markers = {
enable = false,
inline_arrows = true,
icons = {
corner = "",
edge = "",
item = "",
bottom = "",
none = " ",
},
},
icons = {
webdev_colors = true,
git_placement = "before",
padding = " ",
symlink_arrow = "",
show = {
file = true,
folder = true,
folder_arrow = true,
git = true,
},
glyphs = {
default = "",
symlink = "",
bookmark = "",
folder = {
arrow_closed = "",
arrow_open = "",
default = "",
open = "",
empty = "",
empty_open = "",
symlink = "",
symlink_open = "",
},
git = {
unstaged = "",
staged = "",
unmerged = "",
renamed = "",
untracked = "",
deleted = "",
ignored = "",
},
},
},
special_files = { "cargo.toml", "makefile", "readme.md", "readme.md" },
symlink_destination = true,
},
hijack_directories = {
enable = true,
auto_open = true,
},
update_focused_file = {
enable = true,
-- update_cwd = true,
update_root = false,
ignore_list = {},
},
ignore_ft_on_setup = {},
system_open = {
cmd = "",
args = {},
},
diagnostics = {
enable = false,
show_on_dirs = false,
debounce_delay = 50,
icons = {
hint = "",
info = "",
warning = "",
error = "",
},
},
filters = {
dotfiles = false,
custom = {},
exclude = {},
},
filesystem_watchers = {
enable = true,
debounce_delay = 50,
},
git = {
enable = true,
ignore = true,
show_on_dirs = true,
timeout = 400,
},
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,
chars = "abcdefghijklmnopqrstuvwxyz1234567890",
exclude = {
filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame" },
buftype = { "nofile", "terminal", "help" },
},
},
},
remove_file = {
close_window = true,
},
},
trash = {
cmd = "gio trash",
require_confirm = true,
},
live_filter = {
prefix = "[FILTER]: ",
always_show_folders = true,
},
log = {
enable = false,
truncate = false,
types = {
all = false,
config = false,
copy_paste = false,
dev = false,
diagnostics = false,
git = false,
profile = false,
watcher = false,
},
},
}
-- nvim-tree is also there in modified buffers so this function filter it out
local modifiedBufs = function(bufs)
local t = 0
for k, v in pairs(bufs) do
if v.name:match("NvimTree_") == nil then
t = t + 1
end
end
return t
end
vim.api.nvim_create_autocmd("BufEnter", {
nested = true,
callback = function()
if #vim.api.nvim_list_wins() == 1 and
vim.api.nvim_buf_get_name(0):match("NvimTree_") ~= nil and
modifiedBufs(vim.fn.getbufinfo({ bufmodified = 1 })) == 0 then
vim.cmd "quit"
end
end
})
local function open_nvim_tree(data)
-- buffer is a directory
local directory = vim.fn.isdirectory(data.file) == 1
if not directory then
return
end
-- change to the directory
if directory then
vim.cmd.cd(data.file)
end
-- open the tree
require("nvim-tree.api").tree.open()
end
vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })

View file

@ -1,23 +0,0 @@
local options = {
clipboard = "unnamedplus",
mouse = "n",
fileencoding = "utf-8",
number = true,
showmode = true,
termguicolors = true,
spelllang = "en_us",
shell = "/usr/bin/zsh",
autochdir = true,
cursorline = true,
}
vim.g.mkdp_browser = '/usr/bin/firefox'
vim.g.mkdp_auto_start = 1
-- space leader
vim.g.mapleader = " "
vim.keymap.set("n", "<Space>", "<Nop>", { silent = true, noremap = false })
for k, v in pairs(options) do
vim.opt[k] = v
end

View file

@ -1,36 +0,0 @@
-- Setup nvim-cmp.
local status_ok, npairs = pcall(require, "nvim-autopairs")
if not status_ok then
return
end
local Rule = require('nvim-autopairs.rule')
npairs.setup({
check_ts = true,
ts_config = {
lua = { "string", "source" },
javascript = { "string", "template_string" },
java = false,
},
disable_filetype = { "TelescopePrompt", "spectre_panel" },
fast_wrap = {
map = "<M-e>",
chars = { "{", "[", "(", "<", '"', "'" },
pattern = string.gsub([[ [%'%"%)%>%]%)%}%,] ]], "%s+", ""),
offset = 0, -- Offset from pattern match
end_key = "$",
keys = "qwertyuiopzxcvbnmasdfghjkl",
check_comma = true,
highlight = "PmenuSel",
highlight_grey = "LineNr",
},
})
npairs.add_rule(Rule("<", ">"))
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
local cmp_status_ok, cmp = pcall(require, "cmp")
if not cmp_status_ok then
return
end
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done({ map_char = { tex = "" } }))

View file

@ -1,60 +0,0 @@
local Plug = vim.fn["plug#"]
vim.call("plug#begin", "~/.config/nvim/plugged")
Plug("nvim-lua/popup.nvim") -- An implementation of the Popup API from vim in Neovim
Plug("nvim-lua/plenary.nvim") -- Useful lua functions used ny lots of plugins
Plug("EdenEast/nightfox.nvim") -- dark theme
Plug("kyazdani42/nvim-web-devicons") -- icons
Plug("feline-nvim/feline.nvim") -- bottom bar
Plug("lewis6991/gitsigns.nvim") -- git signs on the bar and on the left
Plug("nvim-lua/plenary.nvim") -- library, don't delete
Plug("williamboman/mason.nvim") -- lsp and dap
Plug("williamboman/mason-lspconfig.nvim") -- lsp to mason bridge
Plug("neovim/nvim-lspconfig") -- nvim lsp
Plug("mfussenegger/nvim-dap") -- debugging capabilities
Plug("rcarriga/nvim-dap-ui") -- debug ui
Plug("theHamsta/nvim-dap-virtual-text") -- more debug ui
Plug("jayp0521/mason-nvim-dap.nvim") -- debug mason bridge
Plug("nvim-treesitter/nvim-treesitter",
{ ["do"] = vim.fn[":TSUpdate"] }) -- syntax colors
Plug("hrsh7th/nvim-cmp") -- completions
Plug("hrsh7th/cmp-nvim-lsp") -- lsp integration with completions
Plug("hrsh7th/cmp-path") -- path completion
Plug("hrsh7th/cmp-cmdline") -- command completion
Plug("saadparwaiz1/cmp_luasnip") -- snip completion
Plug("L3MON4D3/LuaSnip") -- snippet plugin
Plug("kyazdani42/nvim-tree.lua") -- file viewer on the right
Plug("windwp/nvim-autopairs") -- autopairs
Plug("romgrk/barbar.nvim") -- bar on the top
Plug("numToStr/Comment.nvim") -- fast comments
Plug("lukas-reineke/indent-blankline.nvim") -- indicators for indentation (needs config)
Plug("lewis6991/impatient.nvim") -- speedup startup
Plug("goolord/alpha-nvim") -- dashboard
Plug("lervag/vimtex") -- latex plugin
Plug("weilbith/nvim-code-action-menu") -- code action menu
Plug("rafamadriz/friendly-snippets") -- some provided snippets
Plug("p00f/nvim-ts-rainbow") -- colors brackets
Plug("nvim-telescope/telescope.nvim") -- file/text search
Plug("nvim-telescope/telescope-ui-select.nvim") -- telescope ui
Plug("nvim-telescope/telescope-file-browser.nvim") -- telescope file browser
Plug("nvim-telescope/telescope-fzy-native.nvim") -- telescope fuzzy search
Plug('nvim-telescope/telescope-project.nvim') -- telescope projects
Plug('nvim-telescope/telescope-symbols.nvim') -- symbol picker
Plug('nvim-telescope/telescope-file-browser.nvim') -- telescope file browser
Plug('nvim-telescope/telescope-dap.nvim') -- dap UI for telescope
Plug('benfowler/telescope-luasnip.nvim') -- telescope luasnip integration
Plug('jvgrootveld/telescope-zoxide') -- zoxide integration
Plug('sudormrfbin/cheatsheet.nvim') -- cheatsheet for keymaps
Plug('ThePrimeagen/harpoon') -- harpoonman
Plug 'folke/trouble.nvim' -- provides warning/error explanation tab
Plug('akinsho/toggleterm.nvim',{ ["tag"] = "*" }) -- better terminal integration
Plug("iamcco/markdown-preview.nvim", -- markdown preview
{ ["do"] = "cd app && yarn install" })
Plug('p00f/clangd_extensions.nvim') -- clangd_extensions
-- Plug('kdarkhan/rust-tools.nvim') -- rust extensions
Plug('simrat39/rust-tools.nvim')
Plug('lvimuser/lsp-inlayhints.nvim') -- inlay hints
Plug('preservim/tagbar') -- tags on the right
Plug('ggandor/leap.nvim') -- special movement
Plug('brenoprata10/nvim-highlight-colors') -- colors
vim.call("plug#end")

View file

@ -1,25 +0,0 @@
local tele_status_ok, telescope = pcall(require, "telescope")
if not tele_status_ok then
return
end
telescope.load_extension("project")
require('telescope').setup {
extensions = {
project = {
base_dirs = {
'~/dev/src',
{ '~/dev/src2' },
{ '~/dev/src3', max_depth = 4 },
{ path = '~/dev/src4' },
{ path = '~/dev/src5', max_depth = 2 },
},
hidden_files = true, -- default: false
theme = "dropdown",
order_by = "asc",
search_by = "title",
sync_with_nvim_tree = true, -- default false
}
}
}

View file

@ -1,9 +0,0 @@
require("nvim-treesitter.configs").setup {
highlight = {
},
rainbow = {
enable = true,
extended_mode = true,
max_file_lines = nil,
}
}

View file

@ -1,34 +0,0 @@
local t = require("telescope")
local z_utils = require("telescope._extensions.zoxide.utils")
-- Configure the extension
t.setup({
extensions = {
zoxide = {
prompt_title = "[ Queries ]",
mappings = {
default = {
after_action = function(selection)
print("Update to (" .. selection.z_score .. ") " .. selection.path)
end
},
["<C-s>"] = {
before_action = function(selection) print("before C-s") end,
action = function(selection)
vim.cmd("edit " .. selection.path)
end
},
["<C-q>"] = { action = z_utils.create_basic_command("split") },
},
},
},
})
-- Load the extension
t.load_extension('zoxide')
-- Add a mapping
require("telescope").load_extension("fzy_native")
require("telescope").load_extension "file_browser"
require('telescope').load_extension('dap')
require("telescope").load_extension('harpoon')

View file

@ -1,13 +0,0 @@
local status_ok, _ = pcall(require, "nvim-treesitter.configs")
if not status_ok then
return
end
require("nvim-treesitter.configs").setup({
ensure_installed = "all",
ignore_install = { "markdown_inline" },
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
})

View file

@ -1,4 +0,0 @@
vim.cmd("let g:vimtex_quickfix_mode=0")
vim.cmd("let g:vimtex_view_general_viewer = 'evince'")
vim.cmd("let g:vimtex_compiler_method = 'latexmk'")
vim.cmd("let g:vimtex_compiler_latexmk = {'options': ['-pdf', '-shell-escape', '-file-line-error', '--extra-mem-bot=10000000', '-synctex=1', '-interaction=nonstopmode',],}")