feat: cleanup

This commit is contained in:
max_richter 2022-09-26 00:49:11 +02:00
parent d7f36e407c
commit 5bb81b0903
8 changed files with 156 additions and 127 deletions

View File

@ -9,7 +9,7 @@ require("core.keymappings")
require("configs.autocomplete") require("configs.autocomplete")
require("configs.dashboard") require("configs.dashboard")
require("configs.dap") -- require("configs.dap")
require("configs.command-center") require("configs.command-center")
require("configs.notify") require("configs.notify")
require("configs.lsp") require("configs.lsp")

View File

@ -5,12 +5,7 @@ command_center.add({
{ {
description = "Show Sessions", description = "Show Sessions",
cmd = ":lua require('session-lens').search_session()<CR>", cmd = ":lua require('session-lens').search_session()<CR>",
keybindings = { "n", "<leader><C-o>", noremap } keybindings = { "n", "<leader><C-o>", noremap },
},
{
description = "ZenMode",
cmd = "<CMD>ZenMode<CR>",
keybindings = { "n", "z", noremap }
}, },
{ {
description = "Search inside current buffer", description = "Search inside current buffer",
@ -27,6 +22,6 @@ command_center.add({
}, },
{ {
description = "(TS) Organize Imports", description = "(TS) Organize Imports",
cmd = "<CMD>OrganizeImports<CR>" cmd = "<CMD>OrganizeImports<CR>",
}, },
}) })

View File

@ -2,65 +2,64 @@ local telescope = require("telescope")
local trouble = require("trouble.providers.telescope") local trouble = require("trouble.providers.telescope")
telescope.setup({ telescope.setup({
defaults = {}, defaults = {},
}) })
local default = { local default = {
defaults = { defaults = {
vimgrep_arguments = { vimgrep_arguments = {
"rg", "rg",
"--color=never", "--color=never",
"--no-heading", "--no-heading",
"--with-filename", "--with-filename",
"--line-number", "--line-number",
"--column", "--column",
"--smart-case", "--smart-case",
"--ignore-file", "--ignore-file",
"workerMain.js", "workerMain.js",
}, },
prompt_prefix = "", prompt_prefix = "",
selection_caret = " ", selection_caret = " ",
entry_prefix = " ", entry_prefix = " ",
initial_mode = "insert", initial_mode = "insert",
selection_strategy = "reset", selection_strategy = "reset",
sorting_strategy = "ascending", sorting_strategy = "ascending",
layout_strategy = "horizontal", layout_strategy = "horizontal",
layout_config = { layout_config = {
horizontal = { horizontal = {
prompt_position = "top", prompt_position = "top",
preview_width = 0.55, preview_width = 0.55,
results_width = 0.8, results_width = 0.8,
}, },
vertical = { vertical = {
mirror = false, mirror = false,
}, },
width = 0.87, width = 0.87,
height = 0.80, height = 0.80,
preview_cutoff = 120, preview_cutoff = 120,
}, },
file_sorter = require("telescope.sorters").get_fuzzy_file, file_sorter = require("telescope.sorters").get_fuzzy_file,
file_ignore_patterns = { "node_modules" }, file_ignore_patterns = { "node_modules" },
generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter,
path_display = { "truncate" }, path_display = { "truncate" },
winblend = 0, winblend = 0,
border = {}, border = {},
mappings = { mappings = {
i = { ["<c-t>"] = trouble.open_with_trouble }, i = { ["<c-t>"] = trouble.open_with_trouble },
n = { ["<c-t>"] = trouble.open_with_trouble }, n = { ["<c-t>"] = trouble.open_with_trouble },
}, },
borderchars = { "", "", "", "", "", "", "", "" }, borderchars = { "", "", "", "", "", "", "", "" },
color_devicons = true, color_devicons = true,
use_less = true, use_less = true,
set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil, set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil,
file_previewer = require("telescope.previewers").vim_buffer_cat.new, file_previewer = require("telescope.previewers").vim_buffer_cat.new,
grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new, grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new,
qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new, qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new,
}, },
} }
telescope.setup(default) telescope.setup(default)
-- telescope.load_extension("themes"); -- telescope.load_extension("themes");
-- --
telescope.load_extension("harpoon") telescope.load_extension("harpoon")
telescope.load_extension("session-lens")
telescope.load_extension("command_center") telescope.load_extension("command_center")
telescope.load_extension("notify") telescope.load_extension("notify")

View File

@ -3,6 +3,13 @@ local map = vim.keymap.set
local g = vim.g local g = vim.g
local saga = require("lspsaga") local saga = require("lspsaga")
local truezen = require("true-zen")
truezen.setup({
integrations = {
tmux = true, -- hide tmux status bar in (minimalist, ataraxis)
lualine = true, -- hide nvim-lualine (ataraxis)
},
})
saga.init_lsp_saga() saga.init_lsp_saga()
local options = { noremap = true, silent = true } local options = { noremap = true, silent = true }
@ -85,6 +92,7 @@ map("v", "<A-j>", ":m '>+1<CR>gv=gv", options)
map("v", "<A-k>", ":m '<-2<CR>gv=gv", options) map("v", "<A-k>", ":m '<-2<CR>gv=gv", options)
map("n", "<A-S-k>", "YP", options) map("n", "<A-S-k>", "YP", options)
map("n", "<A-S-j>", "Yp", options) map("n", "<A-S-j>", "Yp", options)
map({ "v", "n" }, "z", truezen.ataraxis, options)
-- Faster git merge -- Faster git merge
map("n", "<Leader>gd", ":Gvdiffsplit!<CR>", options) map("n", "<Leader>gd", ":Gvdiffsplit!<CR>", options)

View File

@ -45,7 +45,7 @@ set.smartcase = true -- turns on case sensitive search when letters are capitali
set.termguicolors = true -- set term gui colors (most terminals support this) set.termguicolors = true -- set term gui colors (most terminals support this)
set.laststatus = 3 -- Always display the status line set.laststatus = 3 -- Always display the status line
set.title = true -- Show current txt that you editing set.title = true -- Show current txt that you editing
set.relativenumber = false -- Vims absolute, relative and hybrid line numbers set.relativenumber = true -- Vims absolute, relative and hybrid line numbers
set.cursorline = false -- Enable highlighting of the current line set.cursorline = false -- Enable highlighting of the current line
set.synmaxcol = 128 set.synmaxcol = 128
vim.cmd("syntax sync minlines=256") vim.cmd("syntax sync minlines=256")

View File

@ -26,24 +26,20 @@ return packer.startup(function(use)
-- Theming Section -- Theming Section
use("rktjmp/fwatch.nvim") -- Used to check dark/light theme use("rktjmp/fwatch.nvim") -- Used to check dark/light theme
use("EdenEast/nightfox.nvim") -- use("EdenEast/nightfox.nvim")
use({ "catppuccin/nvim", as = "catppuccin" }) -- use({ "catppuccin/nvim", as = "catppuccin" })
use("nvim-lualine/lualine.nvim") use("nvim-lualine/lualine.nvim")
use("sam4llis/nvim-tundra")
-- Layout Plugins -- Layout Plugins
use("dstein64/nvim-scrollview") -- ScrollBars use("dstein64/nvim-scrollview") -- ScrollBars
use("akinsho/nvim-toggleterm.lua") use("akinsho/nvim-toggleterm.lua")
use({
"folke/zen-mode.nvim",
config = function()
require("zen-mode").setup({})
end,
})
use("rcarriga/nvim-notify") use("rcarriga/nvim-notify")
use("kyazdani42/nvim-web-devicons") use("kyazdani42/nvim-web-devicons")
use("kyazdani42/nvim-tree.lua") use("kyazdani42/nvim-tree.lua")
use("nvim-lua/popup.nvim") use("nvim-lua/popup.nvim")
use("goolord/alpha-nvim") use("goolord/alpha-nvim") -- startup screen
use("Pocco81/true-zen.nvim")
use({ use({
"terrortylor/nvim-comment", "terrortylor/nvim-comment",
config = function() config = function()
@ -67,6 +63,7 @@ return packer.startup(function(use)
require("trouble").setup({}) require("trouble").setup({})
end, end,
}) })
use("onsails/lspkind.nvim")
use({ use({
"https://git.sr.ht/~whynothugo/lsp_lines.nvim", "https://git.sr.ht/~whynothugo/lsp_lines.nvim",
config = function() config = function()
@ -78,7 +75,6 @@ return packer.startup(function(use)
use("tpope/vim-surround") use("tpope/vim-surround")
use("neovim/nvim-lspconfig") use("neovim/nvim-lspconfig")
use("hrsh7th/nvim-cmp") use("hrsh7th/nvim-cmp")
use("onsails/lspkind.nvim")
use({ use({
"windwp/nvim-autopairs", "windwp/nvim-autopairs",
config = function() config = function()
@ -87,7 +83,7 @@ return packer.startup(function(use)
}) })
use("hrsh7th/cmp-nvim-lsp") use("hrsh7th/cmp-nvim-lsp")
use("hrsh7th/cmp-path") use("hrsh7th/cmp-path")
use("hrsh7th/cmp-calc") -- use("hrsh7th/cmp-calc")
use("hrsh7th/cmp-buffer") use("hrsh7th/cmp-buffer")
use("hrsh7th/cmp-cmdline") use("hrsh7th/cmp-cmdline")
use("rafamadriz/friendly-snippets") use("rafamadriz/friendly-snippets")
@ -100,26 +96,14 @@ return packer.startup(function(use)
use("MunifTanjim/prettier.nvim") use("MunifTanjim/prettier.nvim")
use({ "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" }) use({ "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" })
-- Dap Debugger -- Dap Debugger -- Have not yet been able to set this up
use({ "mfussenegger/nvim-dap" }) -- use({ "mfussenegger/nvim-dap" })
use({ "rcarriga/nvim-dap-ui" }) -- use({ "rcarriga/nvim-dap-ui" })
-- FIle Navigation -- FIle Navigation
use({ "ThePrimeagen/harpoon" }) use({ "ThePrimeagen/harpoon" })
-- More IDE like features -- More IDE like features
use({
"rmagatti/session-lens",
requires = { "rmagatti/auto-session", "nvim-telescope/telescope.nvim" },
config = function()
require("session-lens").setup({ path_display = { "shorten" } })
end,
})
use({
"edluffy/hologram.nvim",
config = function() end,
})
use({ use({
"nvim-neotest/neotest", "nvim-neotest/neotest",

View File

@ -0,0 +1,48 @@
-- Enable Theming / Syntax
vim.g.catppuccin_flavour = "mocha" -- latte, frappe, macchiato, mocha
local cat = require("catppuccin")
cat.setup({
transparent_background = true,
compile = {
enabled = true,
path = vim.fn.stdpath("cache") .. "/catppuccin",
},
styles = {
comments = { "italic" },
strings = { "italic" },
},
integrations = {
gitsigns = true,
telescope = true,
treesitter = true,
cmp = true,
nvimtree = {
enabled = true,
show_root = false,
},
dap = {
enabled = true,
enable_ui = true,
},
native_lsp = {
enabled = true,
},
ts_rainbow = true,
indent_blankline = {
enabled = true,
colored_indent_levels = false,
},
},
})
require("nightfox").setup({
options = {
transparent = true,
},
})
vim.cmd("colorscheme catppuccin")
require("utils.theme-reloader")
require("configs.lualine")

View File

@ -1,48 +1,43 @@
-- Enable Theming / Syntax require("nvim-tundra").setup({
vim.g.catppuccin_flavour = "mocha" -- latte, frappe, macchiato, mocha
local cat = require("catppuccin")
cat.setup({
transparent_background = true, transparent_background = true,
compile = { editor = {
enabled = true, search = {},
path = vim.fn.stdpath("cache") .. "/catppuccin", substitute = {},
}, },
styles = { syntax = {
comments = { "italic" }, booleans = { bold = true, italic = true },
strings = { "italic" }, comments = { bold = true, italic = true },
conditionals = {},
constants = { bold = true },
functions = {},
keywords = {},
loops = {},
numbers = { bold = true },
operators = { bold = true },
punctuation = {},
strings = {},
types = { italic = true },
}, },
integrations = { diagnostics = {
gitsigns = true, errors = {},
telescope = true, warnings = {},
information = {},
hints = {},
},
plugins = {
lsp = true,
treesitter = true, treesitter = true,
cmp = true, cmp = true,
nvimtree = { context = true,
enabled = true, dbui = true,
show_root = false, gitsigns = true,
}, telescope = true,
dap = { },
enabled = true, overwrite = {
enable_ui = true, colors = {},
}, highlights = {},
native_lsp = {
enabled = true,
},
ts_rainbow = true,
indent_blankline = {
enabled = true,
colored_indent_levels = false,
},
}, },
}) })
require("nightfox").setup({ vim.opt.background = "dark"
options = { vim.cmd("colorscheme tundra")
transparent = true,
},
})
vim.cmd("colorscheme catppuccin")
require("utils.theme-reloader")
require("configs.lualine")