add addons, some prefs
This commit is contained in:
parent
5aeddfdd5d
commit
d1a430248a
|
@ -83,7 +83,7 @@ git clone https://github.com/nvim-lua/kickstart.nvim.git %userprofile%\AppData\L
|
|||
If you're using `powershell.exe`
|
||||
|
||||
```
|
||||
git clone https://github.com/nvim-lua/kickstart.nvim.git $env:USERPROFILE\AppData\Local\nvim\
|
||||
gimv /home/user/oldname /home/user/newnamet clone https://github.com/nvim-lua/kickstart.nvim.git $env:USERPROFILE\AppData\Local\nvim\
|
||||
```
|
||||
|
||||
</details>
|
||||
|
|
22
init.lua
22
init.lua
|
@ -91,7 +91,7 @@ vim.g.mapleader = ' '
|
|||
vim.g.maplocalleader = ' '
|
||||
|
||||
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
||||
vim.g.have_nerd_font = false
|
||||
vim.g.have_nerd_font = true
|
||||
|
||||
-- [[ Setting options ]]
|
||||
-- See `:help vim.opt`
|
||||
|
@ -118,8 +118,15 @@ vim.opt.clipboard = 'unnamedplus'
|
|||
-- Enable break indent
|
||||
vim.opt.breakindent = true
|
||||
|
||||
-- My settings
|
||||
vim.opt.smartindent = true
|
||||
vim.opt.wrap = false
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.backup = false
|
||||
|
||||
-- Save undo history
|
||||
vim.opt.undofile = true
|
||||
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
||||
|
||||
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
|
||||
vim.opt.ignorecase = true
|
||||
|
@ -605,9 +612,9 @@ require('lazy').setup({
|
|||
-- You can add other tools here that you want Mason to install
|
||||
-- for you, so that they are available from within Neovim.
|
||||
local ensure_installed = vim.tbl_keys(servers or {})
|
||||
vim.list_extend(ensure_installed, {
|
||||
'stylua', -- Used to format Lua code
|
||||
})
|
||||
--vim.list_extend(ensure_installed, {
|
||||
-- 'stylua', -- Used to format Lua code
|
||||
--})
|
||||
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||
|
||||
require('mason-lspconfig').setup {
|
||||
|
@ -785,7 +792,8 @@ require('lazy').setup({
|
|||
-- Like many other themes, this one has different styles, and you could load
|
||||
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
|
||||
vim.cmd.colorscheme 'tokyonight-night'
|
||||
|
||||
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
||||
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
||||
-- You can configure highlights by doing something like:
|
||||
vim.cmd.hi 'Comment gui=none'
|
||||
end,
|
||||
|
@ -835,7 +843,7 @@ require('lazy').setup({
|
|||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ':TSUpdate',
|
||||
opts = {
|
||||
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'vim', 'vimdoc' },
|
||||
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'vim', 'vimdoc', 'python' },
|
||||
-- Autoinstall languages that are not installed
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
|
@ -885,7 +893,7 @@ require('lazy').setup({
|
|||
--
|
||||
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
||||
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
|
||||
-- { import = 'custom.plugins' },
|
||||
{ import = 'custom.plugins' },
|
||||
}, {
|
||||
ui = {
|
||||
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
return {
|
||||
"tpope/vim-fugitive",
|
||||
config = function()
|
||||
vim.keymap.set("n", "<leader>gs", vim.cmd.Git)
|
||||
|
||||
local Chibs_Fugitive = vim.api.nvim_create_augroup("ThePrimeagen_Fugitive", {})
|
||||
|
||||
local autocmd = vim.api.nvim_create_autocmd
|
||||
autocmd("BufWinEnter", {
|
||||
group = Chibs_Fugitive,
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
if vim.bo.ft ~= "fugitive" then
|
||||
return
|
||||
end
|
||||
|
||||
local bufnr = vim.api.nvim_get_current_buf()
|
||||
local opts = { buffer = bufnr, remap = false }
|
||||
vim.keymap.set("n", "<leader>p", function()
|
||||
vim.cmd.Git('push')
|
||||
end, opts)
|
||||
|
||||
-- rebase always
|
||||
vim.keymap.set("n", "<leader>P", function()
|
||||
vim.cmd.Git({ 'pull', '--rebase' })
|
||||
end, opts)
|
||||
|
||||
-- NOTE: It allows me to easily set the branch i am pushing and any tracking
|
||||
-- needed if i did not set the branch up correctly
|
||||
vim.keymap.set("n", "<leader>t", ":Git push -u origin ", opts);
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
vim.keymap.set("n", "gu", "<cmd>diffget //2<CR>")
|
||||
vim.keymap.set("n", "gh", "<cmd>diffget //3<CR>")
|
||||
end
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
return {
|
||||
"mbbill/undotree",
|
||||
|
||||
config = function()
|
||||
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
|
||||
end
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
return {
|
||||
"folke/zen-mode.nvim",
|
||||
config = function()
|
||||
vim.keymap.set("n", "<leader>zz", function()
|
||||
require("zen-mode").setup {
|
||||
window = {
|
||||
width = 90,
|
||||
options = {}
|
||||
},
|
||||
}
|
||||
require("zen-mode").toggle()
|
||||
vim.wo.wrap = false
|
||||
vim.wo.number = true
|
||||
vim.wo.rnu = true
|
||||
end)
|
||||
|
||||
|
||||
vim.keymap.set("n", "<leader>zZ", function()
|
||||
require("zen-mode").setup {
|
||||
window = {
|
||||
width = 80,
|
||||
options = {}
|
||||
},
|
||||
}
|
||||
require("zen-mode").toggle()
|
||||
vim.wo.wrap = false
|
||||
vim.wo.number = false
|
||||
vim.wo.rnu = false
|
||||
vim.opt.colorcolumn = "0"
|
||||
end)
|
||||
end
|
||||
}
|
Loading…
Reference in New Issue