diff options
| author | omagdy7 <omar.professional8777@gmail.com> | 2022-10-23 12:57:32 +0200 |
|---|---|---|
| committer | omagdy7 <omar.professional8777@gmail.com> | 2022-10-23 12:57:32 +0200 |
| commit | b62e938bf36f8a567c7cf4ee2e94daeb1336056b (patch) | |
| tree | d77cfe81d139aea1643a03490a06c6d23845f4e8 /nvim | |
| parent | 2c2765f1c7b7b9a266fd64f60a4ba80002b5ef12 (diff) | |
| download | dotfiles-b62e938bf36f8a567c7cf4ee2e94daeb1336056b.tar.xz dotfiles-b62e938bf36f8a567c7cf4ee2e94daeb1336056b.zip | |
Modified some config file nvim/awesome/kitty
Diffstat (limited to 'nvim')
| -rw-r--r-- | nvim/.config/nvim/init.lua | 29 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/user/bufferline.lua | 6 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/user/colorscheme.lua | 2 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/user/lsp/handlers.lua | 2 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/user/nvim-tree.lua | 62 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/user/options.lua | 8 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/user/plugins.lua | 12 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/user/whichkey.lua | 2 | ||||
| -rw-r--r-- | nvim/.config/nvim/plugin/packer_compiled.lua | 65 |
9 files changed, 117 insertions, 71 deletions
diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index e723a7e..e98fbc5 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -1,24 +1,10 @@ -vim.g.material_style = "deep ocean" --- vim.g.material_style = "palenight" --- vim.g.material_style = "darker" ---[[ vim.g.tokyonight_style = "night" ]] ---[[ vim.g.tokyonight_italic_functions = true ]] ---[[ vim.g.tokyonight_italic_keywords = true ]] ---[[ vim.g.tokyonight_italic_variables = true ]] ---[[ vim.g.tokyonight_italic_comments = true ]] ---[[ vim.g.tokyonight_transparent_sidebar = true; ]] ---[[ vim.g.tokyonight_transparent_float = true; ]] ---[[ vim.g.tokyonight_terminal_colors = true ]] ---[[ vim.g.airline_theme = "tokyonight" ]] ---vim.g.tokyonight_colors = { hint = "orange", error = "#ff0000" } ---[[ vim.g.tokyonight_transparent = true ]] - --- require('onedark').setup { --- style = 'deep' --- } - --require'lspconfig'.gdscript.setup{ - --capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()) - --} +--[[ vim.g.material_style = "palenight" ]] + + +require('onedark').setup { + style = 'deep', + transparent = true, +} require('material').setup{ disable = { @@ -30,6 +16,7 @@ require("nvim-treesitter.configs").setup { yati = { enable = true }, } + require "user.options" require "user.keymaps" require "user.plugins" diff --git a/nvim/.config/nvim/lua/user/bufferline.lua b/nvim/.config/nvim/lua/user/bufferline.lua index f18db79..e346fbc 100644 --- a/nvim/.config/nvim/lua/user/bufferline.lua +++ b/nvim/.config/nvim/lua/user/bufferline.lua @@ -13,7 +13,11 @@ bufferline.setup { -- NOTE: this plugin is designed with this icon in mind, -- and so changing this is NOT recommended, this is intended -- as an escape hatch for people who cannot bear it for whatever reason - indicator_icon = "▎", + indicator = { + icon = '| ', + style = 'icon' + }, + -- buffer_close_icon = "", buffer_close_icon = '', modified_icon = "●", diff --git a/nvim/.config/nvim/lua/user/colorscheme.lua b/nvim/.config/nvim/lua/user/colorscheme.lua index cc3c6e2..37ab651 100644 --- a/nvim/.config/nvim/lua/user/colorscheme.lua +++ b/nvim/.config/nvim/lua/user/colorscheme.lua @@ -1,6 +1,6 @@ vim.cmd [[ try - colorscheme material + colorscheme onedark catch /^Vim\%((\a\+)\)\=:E185/ colorscheme default set background=background diff --git a/nvim/.config/nvim/lua/user/lsp/handlers.lua b/nvim/.config/nvim/lua/user/lsp/handlers.lua index a630cb6..dda229d 100644 --- a/nvim/.config/nvim/lua/user/lsp/handlers.lua +++ b/nvim/.config/nvim/lua/user/lsp/handlers.lua @@ -46,7 +46,7 @@ end local function lsp_highlight_document(client) -- Set autocommands conditional on server_capabilities - if client.resolved_capabilities.document_highlight then + if client.server_capabilities.document_highlight then vim.api.nvim_exec( [[ augroup lsp_document_highlight diff --git a/nvim/.config/nvim/lua/user/nvim-tree.lua b/nvim/.config/nvim/lua/user/nvim-tree.lua index 31b1b83..876c16b 100644 --- a/nvim/.config/nvim/lua/user/nvim-tree.lua +++ b/nvim/.config/nvim/lua/user/nvim-tree.lua @@ -1,25 +1,25 @@ -- following options are the default -- each of these are documented in `:help nvim-tree.OPTION_NAME` -vim.g.nvim_tree_icons = { - default = "", - symlink = "", - git = { - unstaged = "", - staged = "S", - unmerged = "", - renamed = "➜", - deleted = "", - untracked = "U", - ignored = "◌", - }, - folder = { - default = "", - open = "", - empty = "", - empty_open = "", - symlink = "", - }, -} +--[[ vim.g.nvim_tree_icons = { ]] +--[[ default = "", ]] +--[[ symlink = "", ]] +--[[ git = { ]] +--[[ unstaged = "", ]] +--[[ staged = "S", ]] +--[[ unmerged = "", ]] +--[[ renamed = "➜", ]] +--[[ deleted = "", ]] +--[[ untracked = "U", ]] +--[[ ignored = "◌", ]] +--[[ }, ]] +--[[ folder = { ]] +--[[ default = "", ]] +--[[ open = "", ]] +--[[ empty = "", ]] +--[[ empty_open = "", ]] +--[[ symlink = "", ]] +--[[ }, ]] +--[[ } ]] local status_ok, nvim_tree = pcall(require, "nvim-tree") if not status_ok then @@ -34,6 +34,26 @@ end local tree_cb = nvim_tree_config.nvim_tree_callback nvim_tree.setup { + --[[ icons = { ]] + --[[ default = "", ]] + --[[ symlink = "", ]] + --[[ git = { ]] + --[[ unstaged = "", ]] + --[[ staged = "S", ]] + --[[ unmerged = "", ]] + --[[ renamed = "➜", ]] + --[[ deleted = "", ]] + --[[ untracked = "U", ]] + --[[ ignored = "◌", ]] + --[[ }, ]] + --[[ folder = { ]] + --[[ default = "", ]] + --[[ open = "", ]] + --[[ empty = "", ]] + --[[ empty_open = "", ]] + --[[ symlink = "", ]] + --[[ }, ]] + --[[ }, ]] disable_netrw = true, hijack_netrw = true, open_on_setup = false, @@ -79,7 +99,7 @@ nvim_tree.setup { }, view = { width = 30, - height = 30, + --[[ height = 30, ]] hide_root_folder = true, side = "left", -- auto_resize = true, diff --git a/nvim/.config/nvim/lua/user/options.lua b/nvim/.config/nvim/lua/user/options.lua index b96e57f..1ad2efa 100644 --- a/nvim/.config/nvim/lua/user/options.lua +++ b/nvim/.config/nvim/lua/user/options.lua @@ -26,13 +26,13 @@ local options = { tabstop = 2, -- insert 2 spaces for a tab cursorline = true, -- highlight the current line number = true, -- set numbered lines - relativenumber = true, -- set relative numbered lines + relativenumber = true, -- set relative numbered lines numberwidth = 4, -- set number column width to 2 {default 4} signcolumn = "yes", -- always show the sign column, otherwise it would shift the text each time - wrap = false, -- display lines as one long line + wrap = true, -- display lines as one long line scrolloff = 8, -- is one of my fav sidescrolloff = 8, - guifont = "monospace:h17", -- the font used in graphical neovim applications + guifont = "JetBrainsMonoExtraBold Nerd Font:h14", -- the font used in graphical neovim applications } vim.opt.shortmess:append "c" @@ -41,6 +41,8 @@ for k, v in pairs(options) do vim.opt[k] = v end +vim.o.ch = 0 + vim.cmd "set whichwrap+=<,>,[,],h,l" vim.cmd [[set iskeyword+=-]] vim.cmd [[set formatoptions-=cro]] -- TODO: this doesn't seem to work diff --git a/nvim/.config/nvim/lua/user/plugins.lua b/nvim/.config/nvim/lua/user/plugins.lua index 79739d2..f646ba5 100644 --- a/nvim/.config/nvim/lua/user/plugins.lua +++ b/nvim/.config/nvim/lua/user/plugins.lua @@ -58,16 +58,22 @@ return packer.startup(function(use) use "goolord/alpha-nvim" use "antoinemadec/FixCursorHold.nvim" -- This is needed to fix lsp doc highlight use "folke/which-key.nvim" - use "nvim-lua/plenary.nvim" use "szw/vim-maximizer" use "folke/trouble.nvim" + -- Show colors in terminal with hexcodes or rgb + use 'norcalli/nvim-colorizer.lua' + -- fix indentation use({ "yioneko/nvim-yati", requires = "nvim-treesitter/nvim-treesitter" }) -- Surround use "tpope/vim-surround" + --Debugging + use 'mfussenegger/nvim-dap' + use 'rcarriga/nvim-dap-ui' + -- Colorschemes -- use "lunarvim/colorschemes" -- A bunch of colorschemes you can try out use 'crusoexia/vim-monokai' @@ -77,9 +83,9 @@ return packer.startup(function(use) use "drewtempelmeyer/palenight.vim" use 'Mofiqul/dracula.nvim' use 'tanvirtin/monokai.nvim' - use 'eddyekofo94/gruvbox-flat.nvim' use 'kyazdani42/nvim-palenight.lua' use 'navarasu/onedark.nvim' + use 'ellisonleao/gruvbox.nvim' -- cmp plugins use "hrsh7th/nvim-cmp" -- The completion plugin @@ -132,7 +138,7 @@ return packer.startup(function(use) cancel = "<C-q>", }, }, - runner_ui = { + popup_ui = { total_width = 0.8, total_height = 0.8, selector_width = 0.3, diff --git a/nvim/.config/nvim/lua/user/whichkey.lua b/nvim/.config/nvim/lua/user/whichkey.lua index e8a0d8b..fd9a32f 100644 --- a/nvim/.config/nvim/lua/user/whichkey.lua +++ b/nvim/.config/nvim/lua/user/whichkey.lua @@ -180,7 +180,7 @@ local mappings = { p = { "<cmd>lua _PYTHON_TOGGLE()<cr>", "Python" }, f = { "<cmd>ToggleTerm direction=float<cr>", "Float" }, h = { "<cmd>ToggleTerm size=10 direction=horizontal<cr>", "Horizontal" }, - v = { "<cmd>ToggleTerm size=80 direction=vertical<cr>", "Vertical" }, + v = { "<cmd>ToggleTerm size=50 direction=vertical<cr>", "Vertical" }, }, } diff --git a/nvim/.config/nvim/plugin/packer_compiled.lua b/nvim/.config/nvim/plugin/packer_compiled.lua index 93c9334..beda03e 100644 --- a/nvim/.config/nvim/plugin/packer_compiled.lua +++ b/nvim/.config/nvim/plugin/packer_compiled.lua @@ -9,23 +9,26 @@ vim.api.nvim_command('packadd packer.nvim') local no_errors, error_msg = pcall(function() - local time - local profile_info - local should_profile = false - if should_profile then - local hrtime = vim.loop.hrtime - profile_info = {} - time = function(chunk, start) - if start then - profile_info[chunk] = hrtime() - else - profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 - end +_G._packer = _G._packer or {} +_G._packer.inside_compile = true + +local time +local profile_info +local should_profile = false +if should_profile then + local hrtime = vim.loop.hrtime + profile_info = {} + time = function(chunk, start) + if start then + profile_info[chunk] = hrtime() + else + profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 end - else - time = function(chunk, start) end end - +else + time = function(chunk, start) end +end + local function save_profiles(threshold) local sorted_times = {} for chunk_name, time_taken in pairs(profile_info) do @@ -38,8 +41,10 @@ local function save_profiles(threshold) results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms' end end + if threshold then + table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)') + end - _G._packer = _G._packer or {} _G._packer.profile_output = results end @@ -145,10 +150,10 @@ _G.packer_plugins = { path = "/home/pengu/.local/share/nvim/site/pack/packer/start/gitsigns.nvim", url = "https://github.com/lewis6991/gitsigns.nvim" }, - ["gruvbox-flat.nvim"] = { + ["gruvbox.nvim"] = { loaded = true, - path = "/home/pengu/.local/share/nvim/site/pack/packer/start/gruvbox-flat.nvim", - url = "https://github.com/eddyekofo94/gruvbox-flat.nvim" + path = "/home/pengu/.local/share/nvim/site/pack/packer/start/gruvbox.nvim", + url = "https://github.com/ellisonleao/gruvbox.nvim" }, ["impatient.nvim"] = { loaded = true, @@ -200,6 +205,21 @@ _G.packer_plugins = { path = "/home/pengu/.local/share/nvim/site/pack/packer/start/nvim-cmp", url = "https://github.com/hrsh7th/nvim-cmp" }, + ["nvim-colorizer.lua"] = { + loaded = true, + path = "/home/pengu/.local/share/nvim/site/pack/packer/start/nvim-colorizer.lua", + url = "https://github.com/norcalli/nvim-colorizer.lua" + }, + ["nvim-dap"] = { + loaded = true, + path = "/home/pengu/.local/share/nvim/site/pack/packer/start/nvim-dap", + url = "https://github.com/mfussenegger/nvim-dap" + }, + ["nvim-dap-ui"] = { + loaded = true, + path = "/home/pengu/.local/share/nvim/site/pack/packer/start/nvim-dap-ui", + url = "https://github.com/rcarriga/nvim-dap-ui" + }, ["nvim-lsp-installer"] = { loaded = true, path = "/home/pengu/.local/share/nvim/site/pack/packer/start/nvim-lsp-installer", @@ -327,6 +347,13 @@ time([[Defining packer_plugins]], false) time([[Config for competitest.nvim]], true) try_loadstring("\27LJ\2\n9\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\16competitest\frequire\0", "config", "competitest.nvim") time([[Config for competitest.nvim]], false) + +_G._packer.inside_compile = false +if _G._packer.needs_bufread == true then + vim.cmd("doautocmd BufRead") +end +_G._packer.needs_bufread = false + if should_profile then save_profiles() end end) |
