update
This commit is contained in:
parent
5b282a3382
commit
354ef48d2f
89
init.lua
89
init.lua
|
|
@ -1,40 +1,21 @@
|
||||||
-- Thanks TJ :)
|
|
||||||
|
|
||||||
-- Set <space> as the leader key
|
|
||||||
-- See `:help mapleader`
|
-- See `:help mapleader`
|
||||||
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
|
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
|
||||||
vim.g.mapleader = ' '
|
vim.g.mapleader = ' '
|
||||||
vim.g.maplocalleader = ' '
|
vim.g.maplocalleader = ' '
|
||||||
vim.opt.guicursor = ''
|
vim.opt.guicursor = ''
|
||||||
|
|
||||||
-- Setting my diabolic colorscheme
|
|
||||||
vim.cmd 'colorscheme quiet'
|
|
||||||
vim.api.nvim_set_hl(0, 'Normal', { bg = 'none' })
|
|
||||||
vim.o.winborder = 'rounded'
|
|
||||||
|
|
||||||
-- Background with White text
|
|
||||||
vim.api.nvim_set_hl(0, 'NormalFloat', { bg = 'none', fg = '#ffffff' })
|
|
||||||
|
|
||||||
vim.api.nvim_set_hl(0, 'FloatBorder', { bg = 'none', fg = '#ffffff' })
|
|
||||||
|
|
||||||
-- Optional: Fix the autocomplete menu colors to match
|
|
||||||
vim.api.nvim_set_hl(0, 'Pmenu', { bg = 'none' })
|
|
||||||
-- vim.api.nvim_set_hl(0, 'PmenuSel', { bg = '#ffffff', fg = '#001f3f' }) -- White highlight with Blue text
|
|
||||||
vim.api.nvim_set_hl(0, 'PmenuKind', { bg = 'none' })
|
|
||||||
|
|
||||||
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
||||||
vim.g.have_nerd_font = true
|
vim.g.have_nerd_font = false
|
||||||
|
|
||||||
-- [[ Setting options ]]
|
-- [[ Setting options ]]
|
||||||
-- See `:help vim.o`
|
-- See `:help vim.o`
|
||||||
-- NOTE: You can change these options as you wish!
|
-- NOTE: You can change these options as you wish!
|
||||||
-- For more options, you can see `:help option-list`
|
-- For more options, you can see `:help option-list`
|
||||||
|
|
||||||
-- add the damn sign columns
|
|
||||||
vim.opt.signcolumn = 'yes'
|
|
||||||
|
|
||||||
-- Make line numbers default
|
-- Make line numbers default
|
||||||
vim.o.number = true
|
vim.o.number = true
|
||||||
|
-- You can also add relative line numbers, to help with jumping.
|
||||||
|
-- Experiment for yourself to see if you like it!
|
||||||
vim.o.relativenumber = true
|
vim.o.relativenumber = true
|
||||||
|
|
||||||
-- Enable mouse mode, can be useful for resizing splits for example!
|
-- Enable mouse mode, can be useful for resizing splits for example!
|
||||||
|
|
@ -42,11 +23,8 @@ vim.o.mouse = 'a'
|
||||||
|
|
||||||
-- Don't show the mode, since it's already in the status line
|
-- Don't show the mode, since it's already in the status line
|
||||||
vim.o.showmode = false
|
vim.o.showmode = false
|
||||||
|
|
||||||
-- soft and elegant Neotree toggle
|
-- soft and elegant Neotree toggle
|
||||||
vim.keymap.set('n', '<leader>e', '<cmd>Neotree toggle<CR>')
|
vim.keymap.set('n', '<leader>e', '<cmd>Neotree toggle<CR>')
|
||||||
-- vim.keymap.set('v', '<leader>e', '<cmd>Neotree toggle<CR>')
|
|
||||||
-- vim.keymap.set('i', '<leader>e', '<cmd>Neotree toggle<CR>')
|
|
||||||
|
|
||||||
-- Sync clipboard between OS and Neovim.
|
-- Sync clipboard between OS and Neovim.
|
||||||
-- Schedule the setting after `UiEnter` because it can increase startup-time.
|
-- Schedule the setting after `UiEnter` because it can increase startup-time.
|
||||||
|
|
@ -62,24 +40,14 @@ vim.keymap.set('v', '<A-h>', '<gv')
|
||||||
-- Deleting buffers
|
-- Deleting buffers
|
||||||
vim.keymap.set('n', '<leader>bd', vim.cmd.bdelete)
|
vim.keymap.set('n', '<leader>bd', vim.cmd.bdelete)
|
||||||
|
|
||||||
-- go to project view
|
|
||||||
vim.keymap.set('n', '<leader>pv', vim.cmd.Ex)
|
|
||||||
|
|
||||||
-- Enable break indent
|
-- Enable break indent
|
||||||
vim.o.breakindent = true
|
vim.o.breakindent = true
|
||||||
vim.keymap.set('v', '<A-l>', '>gv')
|
|
||||||
|
|
||||||
-- Enable break indent
|
|
||||||
-- vim.o.breakindent = true
|
|
||||||
|
|
||||||
-- Enable undo/redo changes even after closing and reopening a file
|
-- Enable undo/redo changes even after closing and reopening a file
|
||||||
vim.o.undofile = true
|
vim.o.undofile = true
|
||||||
vim.opt.swapfile = false
|
vim.opt.swapfile = false
|
||||||
vim.opt.undodir = os.getenv 'HOME' .. '/.vim/undodir'
|
vim.opt.undodir = os.getenv 'HOME' .. '/.vim/undodir'
|
||||||
|
|
||||||
-- close the damn folds
|
|
||||||
vim.opt.foldenable = false
|
|
||||||
|
|
||||||
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
|
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
|
||||||
vim.o.ignorecase = true
|
vim.o.ignorecase = true
|
||||||
vim.o.smartcase = true
|
vim.o.smartcase = true
|
||||||
|
|
@ -90,8 +58,6 @@ vim.o.signcolumn = 'yes'
|
||||||
-- color column
|
-- color column
|
||||||
vim.opt.colorcolumn = '100'
|
vim.opt.colorcolumn = '100'
|
||||||
|
|
||||||
-- most disgusting keymap to quit
|
|
||||||
vim.keymap.set('n', '<leader>qq', vim.cmd.q)
|
|
||||||
-- Decrease update time
|
-- Decrease update time
|
||||||
vim.o.updatetime = 250
|
vim.o.updatetime = 250
|
||||||
|
|
||||||
|
|
@ -112,7 +78,6 @@ vim.o.splitbelow = true
|
||||||
-- and `:help lua-guide-options`
|
-- and `:help lua-guide-options`
|
||||||
-- vim.o.list = true
|
-- vim.o.list = true
|
||||||
-- vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
|
-- vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
|
||||||
|
|
||||||
vim.opt.tabstop = 4
|
vim.opt.tabstop = 4
|
||||||
vim.opt.softtabstop = 4
|
vim.opt.softtabstop = 4
|
||||||
vim.opt.shiftwidth = 4
|
vim.opt.shiftwidth = 4
|
||||||
|
|
@ -274,7 +239,6 @@ require('lazy').setup({
|
||||||
-- Then, because we use the `opts` key (recommended), the configuration runs
|
-- Then, because we use the `opts` key (recommended), the configuration runs
|
||||||
-- after the plugin has been loaded as `require(MODULE).setup(opts)`.
|
-- after the plugin has been loaded as `require(MODULE).setup(opts)`.
|
||||||
|
|
||||||
-- I'd intentionally hide which key... might see its use later
|
|
||||||
-- { -- Useful plugin to show you pending keybinds.
|
-- { -- Useful plugin to show you pending keybinds.
|
||||||
-- 'folke/which-key.nvim',
|
-- 'folke/which-key.nvim',
|
||||||
-- event = 'VimEnter',
|
-- event = 'VimEnter',
|
||||||
|
|
@ -332,7 +296,7 @@ require('lazy').setup({
|
||||||
{ 'nvim-telescope/telescope-ui-select.nvim' },
|
{ 'nvim-telescope/telescope-ui-select.nvim' },
|
||||||
|
|
||||||
-- Useful for getting pretty icons, but requires a Nerd Font.
|
-- Useful for getting pretty icons, but requires a Nerd Font.
|
||||||
{ 'nvim-tree/nvim-web-devicons', enabled = false },
|
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
-- Telescope is a fuzzy finder that comes with a lot of different things that
|
-- Telescope is a fuzzy finder that comes with a lot of different things that
|
||||||
|
|
@ -561,9 +525,9 @@ require('lazy').setup({
|
||||||
-- code, if the language server you are using supports them
|
-- code, if the language server you are using supports them
|
||||||
--
|
--
|
||||||
-- This may be unwanted, since they displace some of your code
|
-- This may be unwanted, since they displace some of your code
|
||||||
-- if client and client:supports_method('textDocument/inlayHint', event.buf) then
|
if client and client:supports_method('textDocument/inlayHint', event.buf) then
|
||||||
-- map('<leader>th', function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf }) end, '[T]oggle Inlay [H]ints')
|
map('<leader>th', function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf }) end, '[T]oggle Inlay [H]ints')
|
||||||
-- end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -572,9 +536,9 @@ require('lazy').setup({
|
||||||
-- See `:help lsp-config` for information about keys and how to configure
|
-- See `:help lsp-config` for information about keys and how to configure
|
||||||
---@type table<string, vim.lsp.Config>
|
---@type table<string, vim.lsp.Config>
|
||||||
local servers = {
|
local servers = {
|
||||||
clangd = {},
|
-- clangd = {},
|
||||||
-- gopls = {},
|
-- gopls = {},
|
||||||
pyright = {},
|
-- pyright = {},
|
||||||
-- rust_analyzer = {},
|
-- rust_analyzer = {},
|
||||||
--
|
--
|
||||||
-- Some languages (like typescript) have entire language plugins that can be useful:
|
-- Some languages (like typescript) have entire language plugins that can be useful:
|
||||||
|
|
@ -775,22 +739,21 @@ require('lazy').setup({
|
||||||
-- change the command in the config to whatever the name of that colorscheme is.
|
-- change the command in the config to whatever the name of that colorscheme is.
|
||||||
--
|
--
|
||||||
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
||||||
-- 'folke/tokyonight.nvim',
|
'folke/tokyonight.nvim',
|
||||||
-- priority = 1000, -- Make sure to load this before all the other start plugins.
|
priority = 1000, -- Make sure to load this before all the other start plugins.
|
||||||
-- config = function()
|
config = function()
|
||||||
-- ---@diagnostic disable-next-line: missing-fields
|
---@diagnostic disable-next-line: missing-fields
|
||||||
-- require('tokyonight').setup {
|
require('tokyonight').setup {
|
||||||
-- styles = {
|
styles = {
|
||||||
-- comments = { italic = false }, -- Disable italics in comments
|
comments = { italic = false }, -- Disable italics in comments
|
||||||
-- },
|
},
|
||||||
-- transparent = true,
|
}
|
||||||
-- }
|
|
||||||
--
|
-- Load the colorscheme here.
|
||||||
-- -- Load the colorscheme here.
|
-- Like many other themes, this one has different styles, and you could load
|
||||||
-- -- Like many other themes, this one has different styles, and you could load
|
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
|
||||||
-- -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
|
vim.cmd.colorscheme 'tokyonight-night'
|
||||||
-- vim.cmd.colorscheme 'tokyonight-night'
|
end,
|
||||||
-- end,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Highlight todo, notes, etc in comments
|
-- Highlight todo, notes, etc in comments
|
||||||
|
|
@ -827,7 +790,7 @@ require('lazy').setup({
|
||||||
-- and try some other statusline plugin
|
-- and try some other statusline plugin
|
||||||
local statusline = require 'mini.statusline'
|
local statusline = require 'mini.statusline'
|
||||||
-- set use_icons to true if you have a Nerd Font
|
-- set use_icons to true if you have a Nerd Font
|
||||||
statusline.setup { use_icons = false }
|
statusline.setup { use_icons = vim.g.have_nerd_font }
|
||||||
|
|
||||||
-- You can configure sections in the statusline by overriding their
|
-- You can configure sections in the statusline by overriding their
|
||||||
-- default behavior. For example, here we set the section for
|
-- default behavior. For example, here we set the section for
|
||||||
|
|
@ -886,7 +849,7 @@ require('lazy').setup({
|
||||||
-- require 'kickstart.plugins.indent_line',
|
-- require 'kickstart.plugins.indent_line',
|
||||||
require 'kickstart.plugins.lint',
|
require 'kickstart.plugins.lint',
|
||||||
require 'kickstart.plugins.autopairs',
|
require 'kickstart.plugins.autopairs',
|
||||||
-- require 'kickstart.plugins.neo-tree',
|
require 'kickstart.plugins.neo-tree',
|
||||||
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommended keymaps
|
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommended keymaps
|
||||||
|
|
||||||
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
||||||
|
|
|
||||||
|
|
@ -3,16 +3,15 @@
|
||||||
"blink.cmp": { "branch": "main", "commit": "451168851e8e2466bc97ee3e026c3dcb9141ce07" },
|
"blink.cmp": { "branch": "main", "commit": "451168851e8e2466bc97ee3e026c3dcb9141ce07" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" },
|
"conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" },
|
||||||
"fidget.nvim": { "branch": "main", "commit": "7fa433a83118a70fe24c1ce88d5f0bd3453c0970" },
|
"fidget.nvim": { "branch": "main", "commit": "7fa433a83118a70fe24c1ce88d5f0bd3453c0970" },
|
||||||
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
|
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "7c4faa3540d0781a28588cafbd4dd187a28ac6e3" },
|
"gitsigns.nvim": { "branch": "main", "commit": "7c4faa3540d0781a28588cafbd4dd187a28ac6e3" },
|
||||||
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
|
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
|
||||||
"hardtime.nvim": { "branch": "main", "commit": "b4e431934af1fe224a3a801f632c008278cb7628" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" },
|
||||||
"harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" },
|
|
||||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "a676ab7282da8d651e175118bcf54483ca11e46d" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "a676ab7282da8d651e175118bcf54483ca11e46d" },
|
||||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" },
|
"mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
|
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
|
||||||
"mini.nvim": { "branch": "main", "commit": "9990c41f10f54f29a888d13024c9f765037bde23" },
|
"mini.nvim": { "branch": "main", "commit": "9990c41f10f54f29a888d13024c9f765037bde23" },
|
||||||
|
"neo-tree.nvim": { "branch": "main", "commit": "ba6871d15528e36657d19a3112cc1697c59da19a" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
|
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
|
||||||
"nvim-lint": { "branch": "master", "commit": "606b823a57b027502a9ae00978ebf4f5d5158098" },
|
"nvim-lint": { "branch": "master", "commit": "606b823a57b027502a9ae00978ebf4f5d5158098" },
|
||||||
|
|
@ -20,11 +19,8 @@
|
||||||
"nvim-treesitter": { "branch": "main", "commit": "2f5d4c3f3c675962242096bcc8e586d76dd72eb2" },
|
"nvim-treesitter": { "branch": "main", "commit": "2f5d4c3f3c675962242096bcc8e586d76dd72eb2" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" },
|
"nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||||
"rose-pine": { "branch": "main", "commit": "cf2a288696b03d0934da713d66c6d71557b5c997" },
|
|
||||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
|
||||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "5255aa27c422de944791318024167ad5d40aad20" },
|
"telescope.nvim": { "branch": "master", "commit": "5255aa27c422de944791318024167ad5d40aad20" },
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }
|
||||||
"undotree": { "branch": "main", "commit": "0e6d41d55ad147407e4ba00a292973de8db0b836" },
|
|
||||||
"vim-fugitive": { "branch": "master", "commit": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0" }
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
return {
|
|
||||||
'm4xshen/hardtime.nvim',
|
|
||||||
dependencies = { 'MunifTanjim/nui.nvim', 'nvim-lua/plenary.nvim' },
|
|
||||||
opts = {
|
|
||||||
-- Set to false if you want to keep using your mouse while learning
|
|
||||||
disable_mouse = true,
|
|
||||||
|
|
||||||
-- After 3 repeated presses of a key, it will block you for 1 second
|
|
||||||
max_time = 1000,
|
|
||||||
max_count = 3,
|
|
||||||
|
|
||||||
-- This will give you hints like "Use 5j instead of jjjjj"
|
|
||||||
hint = true,
|
|
||||||
|
|
||||||
-- You can disable it for specific filetypes like the Lazy dashboard
|
|
||||||
disabled_filetypes = { 'qf', 'netrw', 'NvimTree', 'lazy', 'mason' },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue