require "nvchad.mappings" require "nvchad.options" require("oil").setup({ default_file_explorer = true, }) local alpha = function() return string.format("%x", math.floor(255 * vim.g.transparency or 0.8)) end vim.g.neovide_opacity = 0.0 vim.g.transparency = 1.0 vim.g.neovide_background_color = "#0f1117" .. alpha() vim.g.neovide_scale_factor = 0.8 vim.g.neovide_scroll_animation_length = 0.1 vim.g.neovide_cursor_animation_length = 0.09 vim.api.nvim_create_autocmd('FileType', { callback = function(ev) local lang = vim.treesitter.language.get_lang(ev.match) local available_langs = require('nvim-treesitter').get_available() local is_available = vim.tbl_contains(available_langs, lang) if is_available then local installed_langs = require('nvim-treesitter').get_installed() local installed = vim.tbl_contains(installed_langs, lang) if not installed then require('nvim-treesitter').install(lang):wait() end vim.treesitter.start() require('nvim-treesitter').indentexpr() end end, }) require('boole').setup({ mappings = { -- increment = '', decrement = '' }, allow_caps_additions = { {'enable', 'disable'}, {'true', 'false'} } }) require('neoscroll').setup({ mappings = { -- Keys to be mapped to their corresponding default scrolling animation '', '', '', '', '', '', 'zt', 'zz', 'zb', }, hide_cursor = true, -- Hide cursor while scrolling stop_eof = true, -- Stop at when scrolling downwards respect_scrolloff = false, -- Stop scrolling when the cursor reaches the scrolloff margin of the file cursor_scrolls_alone = true, -- The cursor will keep on scrolling even if the window cannot scroll further duration_multiplier = 1.0, -- Global duration multiplier easing = 'linear', -- Default easing function pre_hook = nil, -- Function to run before the scrolling animation starts post_hook = nil, -- Function to run after the scrolling animation ends performance_mode = false, -- Disable "Performance Mode" on all buffers. ignored_events = { -- Events ignored while scrolling 'WinScrolled', 'CursorMoved' }, })