make config more lightweight

This commit is contained in:
davidon-top 2023-09-19 18:57:21 +02:00
parent c0ea7b465b
commit 9d922f8de5
16 changed files with 79 additions and 515 deletions

View file

@ -9,3 +9,27 @@ vim.cmd[[
highlight CursorColumn guibg=none ctermbg=none
highlight link CursorColumn CursorLine
]]
-- fixmap
vim.cmd[[
map <Space>m\ <nop>
map <Space>m/ <nop>
map <Space>mA <nop>
map <Space>mgS <nop>
map <Space>tt <nop>
map <Space>tm <nop>
]]
vim.opt.nu = true
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.cursorline = true
vim.opt.cursorcolumn = true
vim.cmd[[
highlight CursorColumn guibg=none ctermbg=none
highlight link CursorColumn CursorLine
]]

View file

@ -1,43 +0,0 @@
-- local db = require('dashboard')
--
local header = {"",
" /$$ /$$ /$$ /$$ /$$ ",
"| $$$ | $$ | $$ | $$|__/ ",
"| $$$$| $$ /$$$$$$ /$$$$$$ | $$ | $$ /$$ /$$$$$$/$$$$ ",
"| $$ $$ $$ /$$__ $$ /$$__ $$| $$ / $$/| $$| $$_ $$_ $$",
"| $$ $$$$| $$$$$$$$| $$ \\ $$ \\ $$ $$/ | $$| $$ \\ $$ \\ $$",
"| $$\\ $$$| $$_____/| $$ | $$ \\ $$$/ | $$| $$ | $$ | $$",
"| $$ \\ $$| $$$$$$$| $$$$$$/ \\ $/ | $$| $$ | $$ | $$",
"|__/ \\__/ \\_______/ \\______/ \\_/ |__/|__/ |__/ |__/",
"",
"",
"",
"",
"",
"",
"",
}
-- db.custom_header = header
-- db.custom_center = {
-- {
-- icon = ' ',
-- desc ='File Browser ',
-- action = 'Telescope file_browser',
-- shortcut = 'SPC e e'
-- },
-- }
local dashboard = require("alpha.themes.dashboard")
dashboard.section.header.val = header
dashboard.section.buttons.val = {
dashboard.button("op", "Open Project", ":OP<cr>"),
dashboard.button("oc", "Open Config", ":Config<cr>"),
}
-- dashboard.section.footer.opts.hl = "Constant"
-- dashboard.section.header.opts.hl = "Include"
-- dashboard.section.buttons.opts.hl = "Function"
-- dashboard.section.buttons.opts.hl_shortcut = "Type"
dashboard.opts.opts.noautocmd = true
require("alpha").setup(dashboard.opts)

View file

@ -1,22 +0,0 @@
vim.cmd[[
map <Space>m\ <nop>
map <Space>m/ <nop>
map <Space>mA <nop>
map <Space>mgS <nop>
map <Space>tt <nop>
map <Space>tm <nop>
]]
vim.opt.nu = true
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.cursorline = true
vim.opt.cursorcolumn = true
vim.cmd[[
highlight CursorColumn guibg=none ctermbg=none
highlight link CursorColumn CursorLine
]]

View file

@ -118,11 +118,6 @@ mason_lspconfig.setup_handlers {
end,
}
require("lspconfig").nimls.setup{
cmd = {"nimlsp", "--log", "/tmp/nimlsp.log"},
on_attach = on_attach,
}
require("lspconfig").zls.setup{
cmd = {"zls"},
on_attach = on_attach,
@ -186,7 +181,6 @@ cmp.setup {
end, { 'i', 's' }),
},
sources = {
{ name = "otter" },
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = "crates" },
@ -204,20 +198,3 @@ vim.diagnostic.config({
update_in_insert = true,
virtual_text = true,
})
require("cmp").config.formatting = {
format = require("tailwindcss-colorizer-cmp").formatter,
behavior = cmp.SelectBehavior.Select,
}
-- require('tabnine').setup({
-- disable_auto_comment=true,
-- accept_keymap="<Tab>",
-- dismiss_keymap = "<C-]>",
-- debounce_ms = 300,
-- suggestion_color = {gui = "#808080", cterm = 244},
-- execlude_filetypes = {"TelescopePrompt"}
-- })
require("aerial").setup({})

View file

@ -3,8 +3,4 @@ require("neo-tree").setup({
winbar = true,
statusline = false,
},
})
vim.keymap.set("n", "<C-\\>", vim.cmd.ToggleTerm)
vim.keymap.set("t", "<C-\\>", vim.cmd.ToggleTerm)
})

View file

@ -1,22 +0,0 @@
--require("presence"):setup({
-- auto_update = true, -- Update activity based on autocmd events (if `false`, map or manually execute `:lua package.loaded.presence:update()`)
-- neovim_image_text = "The best PDE, Personalized Development Enviroment", -- Text displayed when hovered over the Neovim image
-- main_image = "neovim", -- Main image display (either "neovim" or "file")
-- client_id = "793271441293967371", -- Use your own Discord application client id (not recommended)
-- log_level = nil, -- Log messages at or above this level (one of the following: "debug", "info", "warn", "error")
-- debounce_timeout = 15, -- Number of seconds to debounce events (or calls to `:lua package.loaded.presence:update(<filename>, true)`)
-- enable_line_number = false, -- Displays the current line number instead of the current project
-- blacklist = {}, -- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace matches
-- buttons = true, -- Configure Rich Presence button(s), either a boolean to enable/disable, a static table (`{{ label = "<label>", url = "<url>" }, ...}`, or a function(buffer: string, repo_url: string|nil): table)
-- file_assets = {}, -- Custom file asset definitions keyed by file names and extensions (see default config at `lua/presence/file_assets.lua` for reference)
-- show_time = true, -- Show the timer
--
-- -- Rich Presence text options
-- editing_text = "Editing %s", -- Format string rendered when an editable file is loaded in the buffer (either string or function(filename: string): string)
-- file_explorer_text = "Browsing %s", -- Format string rendered when browsing a file explorer (either string or function(file_explorer_name: string): string)
-- git_commit_text = "Committing changes", -- Format string rendered when committing changes in git (either string or function(filename: string): string)
-- plugin_manager_text = "Managing plugins", -- Format string rendered when managing plugins (either string or function(plugin_manager_name: string): string)
-- reading_text = "Reading %s", -- Format string rendered when a read-only or unmodifiable file is loaded in the buffer (either string or function(filename: string): string)
-- workspace_text = "Working on %s", -- Format string rendered when in a git repository (either string or function(project_name: string|nil, filename: string): string)
-- line_number_text = "Line %s out of %s", -- Format string rendered when `enable_line_number` is set to true (either string or function(line_number: number, line_count: number): string)
--})

View file

@ -5,7 +5,7 @@ local colors = {
bright_bg = utils.get_highlight("Folded").bg,
bright_fg = utils.get_highlight("Folded").fg,
red = utils.get_highlight("DiagnosticError").fg,
dark_red = utils.get_highlight("diffDelete").bg,
dark_red = utils.get_highlight("DiffDelete").bg,
green = utils.get_highlight("String").fg,
blue = utils.get_highlight("Function").fg,
gray = utils.get_highlight("NonText").fg,
@ -16,9 +16,9 @@ local colors = {
diag_error = utils.get_highlight("DiagnosticError").fg,
diag_hint = utils.get_highlight("DiagnosticHint").fg,
diag_info = utils.get_highlight("DiagnosticInfo").fg,
git_del = utils.get_highlight("diffRemoved").fg,
git_add = utils.get_highlight("diffAdded").fg,
git_change = utils.get_highlight("diffChanged").fg,
git_del = utils.get_highlight("DiffRemoved").fg,
git_add = utils.get_highlight("DiffAdd").fg,
git_change = utils.get_highlight("DiffChanged").fg,
}
require("heirline").load_colors(colors)
@ -437,21 +437,21 @@ local Git = {
local count = self.status_dict.added or 0
return count > 0 and ("+" .. count)
end,
hl = { fg = "git_add" },
hl = { fg = "green" },
},
{
provider = function(self)
local count = self.status_dict.removed or 0
return count > 0 and ("-" .. count)
end,
hl = { fg = "git_del" },
hl = { fg = "red" },
},
{
provider = function(self)
local count = self.status_dict.changed or 0
return count > 0 and ("~" .. count)
end,
hl = { fg = "git_change" },
hl = { fg = "blue" },
},
{
condition = function(self)

View file

@ -1,29 +0,0 @@
-- require("bufferline").setup {
-- animation = true,
-- auto_hide = true,
-- tabpages = true,
-- closable = true,
-- clickable = true,
-- separator_style = "slant",
-- numbers = "buffer_id",
-- }
--
-- -- file sidebars
-- 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(get_tree_size())
-- end)
--
-- nvim_tree_events.subscribe("Resize", function()
-- bufferline_api.set_offset(get_tree_size())
-- end)
--
-- nvim_tree_events.subscribe("TreeClose", function()
-- bufferline_api.set_offset(0)
-- end)

View file

@ -2,7 +2,7 @@ require "telescope".setup {
extensions = {
workspaces = {
keep_insert = true,
}
}
},
pickers = {
colorscheme = {
@ -13,6 +13,4 @@ require "telescope".setup {
pcall(require("telescope").load_extension, "fzf")
require("telescope").load_extension("dap")
require('telescope').load_extension('projects')
require("telescope").load_extension("workspaces")
require("telescope").load_extension("harpoon")

View file

@ -17,8 +17,17 @@ require"nvim-treesitter.configs".setup {
node_decremental = "grm",
},
},
rainbow = {
enable = true,
-- list of languages you want to disable the plugin for
disable = {},
-- Which query to use for finding delimiters
query = 'rainbow-parens',
-- Highlight the entire buffer all at once
strategy = require('ts-rainbow').strategy.global,
},
}
vim.wo.foldmethod = "expr"
vim.wo.foldmethod = "manual"
vim.wo.foldexpr = "nvim_treesitter#foldexpr()"
vim.o.foldlevelstart = 99 -- do not close folds when a buffer is opened