Lazy rewrite with additional configuration
This commit is contained in:
56
lua/confformat.lua
Normal file
56
lua/confformat.lua
Normal file
@@ -0,0 +1,56 @@
|
||||
-- Utilities for creating configurations
|
||||
local util = require("formatter.util")
|
||||
|
||||
-- Provides the Format, FormatWrite, FormatLock, and FormatWriteLock commands
|
||||
require("formatter").setup({
|
||||
-- Enable or disable logging
|
||||
logging = true,
|
||||
-- Set the log level
|
||||
log_level = vim.log.levels.WARN,
|
||||
-- All formatter configurations are opt-in
|
||||
filetype = {
|
||||
-- Formatter configurations for filetype "lua" go here
|
||||
-- and will be executed in order
|
||||
lua = {
|
||||
-- "formatter.filetypes.lua" defines default configurations for the
|
||||
-- "lua" filetype
|
||||
require("formatter.filetypes.lua").stylua,
|
||||
},
|
||||
|
||||
c = {
|
||||
require("formatter.filetypes.c").clangformat,
|
||||
},
|
||||
|
||||
cpp = {
|
||||
require("formatter.filetypes.cpp").clangformat,
|
||||
},
|
||||
|
||||
html = {
|
||||
require("formatter.filetypes.html").htmlbeautifier,
|
||||
},
|
||||
|
||||
latex = {
|
||||
require("formatter.filetypes.latex").latexindent,
|
||||
},
|
||||
|
||||
markdown = {
|
||||
require("formatter.filetypes.markdown").prettier,
|
||||
},
|
||||
|
||||
tex = {
|
||||
require("formatter.filetypes.latex").latexindent,
|
||||
},
|
||||
|
||||
rust = {
|
||||
require("formatter.filetypes.rust").rustfmt,
|
||||
},
|
||||
|
||||
-- Use the special "*" filetype for defining formatter configurations on
|
||||
-- any filetype
|
||||
["*"] = {
|
||||
-- "formatter.filetypes.any" defines default configurations for any
|
||||
-- filetype
|
||||
require("formatter.filetypes.any").remove_trailing_whitespace,
|
||||
},
|
||||
},
|
||||
})
|
||||
69
lua/plugconfig.lua
Normal file
69
lua/plugconfig.lua
Normal file
@@ -0,0 +1,69 @@
|
||||
-- UltiSnips Configuration
|
||||
vim.g.UltiSnipsExpandTrigger = "<tab>"
|
||||
vim.g.UltiSnipsJumpForwardTrigger = "<c-l>"
|
||||
vim.g.UltiSnipsJumpBackwardTrigger = "<c-h>"
|
||||
vim.g.UltiSnipsEditSplit = "vertical"
|
||||
vim.g.UltiSnipsSnippetDirectories = { "~/.config/nvim/UltiSnips" }
|
||||
|
||||
-- NERDTree Config
|
||||
vim.g.NERDTreeShowHidden = 1
|
||||
|
||||
-- Lexima
|
||||
vim.g.lexima_enable_basic_rules = 1
|
||||
vim.g.lexima_enable_newline_rules = 1
|
||||
|
||||
-- Telescope snippet
|
||||
local builtin = require("telescope.builtin")
|
||||
vim.keymap.set("n", "<leader>ff", builtin.find_files, {})
|
||||
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {})
|
||||
vim.keymap.set("n", "<c-f>", builtin.current_buffer_fuzzy_find, {})
|
||||
vim.keymap.set("n", "<leader>fh", builtin.help_tags, {})
|
||||
vim.keymap.set("n", "<leader>fc", builtin.commands, {})
|
||||
|
||||
-- Telescope + Ultisnips
|
||||
require("telescope").load_extension("ultisnips")
|
||||
vim.keymap.set("n", "<leader>fs", require("telescope").extensions.ultisnips.ultisnips, {})
|
||||
|
||||
-- NERDTree Config
|
||||
vim.g.NERDTreeDirArrowExpandable = "▸"
|
||||
vim.g.NERDTreeDirArrowCollapsible = "▾"
|
||||
|
||||
-- Git-Blame configuration
|
||||
vim.g.gitblame_message_template = " => <author> • <date> • <summary>"
|
||||
vim.g.gitblame_date_format = "%r"
|
||||
|
||||
-- Intendation basics
|
||||
require("ibl").setup()
|
||||
|
||||
-- Code completion
|
||||
require("code-completion")
|
||||
|
||||
-- Mason setup
|
||||
require("mason").setup(require("mason").setup({
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = "✓",
|
||||
package_pending = "➜",
|
||||
package_uninstalled = "✗",
|
||||
},
|
||||
},
|
||||
}))
|
||||
|
||||
require("mason-lspconfig").setup({
|
||||
-- ensure_installed = { "clangd", "cmake", "jdtls", "texlab", "pylsp" },
|
||||
})
|
||||
|
||||
require("mason-lspconfig").setup_handlers({
|
||||
function(clangd)
|
||||
require("lspconfig")[clangd].setup({})
|
||||
end,
|
||||
["als"] = function()
|
||||
require("lspconfig").als.setup({
|
||||
settings = {
|
||||
ada = {
|
||||
projectFile = "default.gpr",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
})
|
||||
122
lua/plugins.lua
122
lua/plugins.lua
@@ -1,73 +1,57 @@
|
||||
return require("packer").startup(function(use)
|
||||
-- Configurations will go here soon
|
||||
use("wbthomason/packer.nvim")
|
||||
use("preservim/nerdtree")
|
||||
use("Xuyuanp/nerdtree-git-plugin")
|
||||
use("tpope/vim-surround")
|
||||
use("SirVer/ultisnips")
|
||||
use("powerline/powerline")
|
||||
use("vim-airline/vim-airline")
|
||||
use("vim-airline/vim-airline-themes")
|
||||
use({
|
||||
return {
|
||||
"preservim/nerdtree",
|
||||
"Xuyuanp/nerdtree-git-plugin",
|
||||
"SirVer/UltiSnips",
|
||||
"tpope/vim-surround",
|
||||
"vim-airline/vim-airline",
|
||||
"vim-airline/vim-airline-themes",
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
run = function()
|
||||
local ts_update = require("nvim-treesitter.install").update({ with_sync = true })
|
||||
ts_update()
|
||||
end,
|
||||
})
|
||||
use({ "junegunn/fzf", run = ":call fzf#install()" })
|
||||
use("junegunn/fzf.vim")
|
||||
use("williamboman/mason.nvim")
|
||||
use("williamboman/mason-lspconfig.nvim")
|
||||
use("neovim/nvim-lspconfig")
|
||||
use("mfussenegger/nvim-dap")
|
||||
use("f-person/git-blame.nvim")
|
||||
use("mfussenegger/nvim-lint")
|
||||
use("p00f/nvim-ts-rainbow")
|
||||
use("cohama/lexima.vim")
|
||||
use("hrsh7th/nvim-cmp")
|
||||
use("hrsh7th/cmp-nvim-lsp")
|
||||
use("hrsh7th/cmp-nvim-lua")
|
||||
use("hrsh7th/cmp-nvim-lsp-signature-help")
|
||||
use("hrsh7th/cmp-path")
|
||||
use("hrsh7th/cmp-buffer")
|
||||
use("hrsh7th/cmp-calc")
|
||||
use("hrsh7th/cmp-cmdline")
|
||||
use("dmitmel/cmp-cmdline-history")
|
||||
use("amarakon/nvim-cmp-lua-latex-symbols")
|
||||
use("prabirshrestha/async.vim")
|
||||
use("prabirshrestha/vim-lsp")
|
||||
use("nvim-tree/nvim-web-devicons")
|
||||
use("mg979/vim-visual-multi")
|
||||
use({ "romgrk/barbar.nvim", wants = "nvim-web-devicons" })
|
||||
use({ "petertriho/cmp-git", requires = "nvim-lua/plenary.nvim" })
|
||||
use("quangnguyen30192/cmp-nvim-ultisnips")
|
||||
use("ryanoasis/vim-devicons")
|
||||
use("mhartington/formatter.nvim")
|
||||
use("tzachar/highlight-undo.nvim")
|
||||
use("folke/tokyonight.nvim")
|
||||
use("patstockwell/vim-monokai-tasty")
|
||||
use("yannickreiss/nvim-doxyscan")
|
||||
use("tpope/vim-speeddating")
|
||||
use("jaredgorski/SpaceCamp")
|
||||
use("projekt0n/github-nvim-theme")
|
||||
use({
|
||||
"nvimdev/dashboard-nvim",
|
||||
event = "VimEnter",
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
require("dashboard").setup({
|
||||
theme = "hyper", -- alt = 'doom'
|
||||
config = {
|
||||
week_header = {
|
||||
enable = true,
|
||||
},
|
||||
},
|
||||
local configs = require("nvim-treesitter.configs")
|
||||
|
||||
configs.setup({
|
||||
-- ensure_installed = { "c", "vim", "ada", "html", "python" },
|
||||
sync_install = false,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
})
|
||||
end,
|
||||
requires = { "nvim-tree/nvim-web-devicons" },
|
||||
})
|
||||
use("hiroakis/cyberspace.vim") -- I'm feeling cyber
|
||||
use("f3fora/cmp-spell")
|
||||
use({ "nvim-telescope/telescope-fzf-native.nvim", run = "make" })
|
||||
use({ "tzachar/cmp-fuzzy-buffer", requires = { "hrsh7th/nvim-cmp", "tzachar/fuzzy.nvim" } })
|
||||
end)
|
||||
},
|
||||
"f-person/git-blame.nvim",
|
||||
"p00f/nvim-ts-rainbow",
|
||||
"cohama/lexima.vim",
|
||||
"ryanoasis/vim-devicons",
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
tag = "0.1.5",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
},
|
||||
"fhill2/telescope-ultisnips.nvim",
|
||||
"hiroakis/cyberspace.vim",
|
||||
"tpope/vim-speeddating",
|
||||
"yannickreiss/nvim-doxyscan",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
{ "romgrk/barbar.nvim", wants = "nvim-web-devicons" },
|
||||
{ "lukas-reineke/indent-blankline.nvim", main = "ibl", opts = {} },
|
||||
"dstein64/vim-startuptime",
|
||||
"folke/tokyonight.nvim",
|
||||
"patstockwell/vim-monokai-tasty",
|
||||
"hrsh7th/nvim-cmp",
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-nvim-lua",
|
||||
"hrsh7th/cmp-nvim-lsp-signature-help",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-calc",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"dmitmel/cmp-cmdline-history",
|
||||
"amarakon/nvim-cmp-lua-latex-symbols",
|
||||
{ "petertriho/cmp-git", requires = "nvim-lua/plenary.nvim" },
|
||||
"williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
"neovim/nvim-lspconfig",
|
||||
"mfussenegger/nvim-dap",
|
||||
"mhartington/formatter.nvim",
|
||||
}
|
||||
|
||||
15
lua/vanilla.lua
Normal file
15
lua/vanilla.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
vim.opt.number = true
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.showmatch = true
|
||||
vim.opt.cursorline = true
|
||||
vim.opt.hlsearch = true
|
||||
vim.opt.encoding = "UTF-8"
|
||||
vim.g.tex_flavor = "latex"
|
||||
vim.opt.conceallevel = 2
|
||||
vim.opt.guifont = "DroidSansMono Nerd Font 11"
|
||||
vim.g.mapleader = ","
|
||||
|
||||
-- set color scheme
|
||||
vim.opt.termguicolors = true
|
||||
Reference in New Issue
Block a user