Add customizations
This commit is contained in:
parent
19afab1641
commit
da6943bdbb
26
init.lua
26
init.lua
|
@ -91,13 +91,31 @@ vim.g.mapleader = ' '
|
||||||
vim.g.maplocalleader = ' '
|
vim.g.maplocalleader = ' '
|
||||||
|
|
||||||
-- Set to true if you have a Nerd Font installed
|
-- Set to true if you have a Nerd Font installed
|
||||||
vim.g.have_nerd_font = false
|
vim.g.have_nerd_font = true
|
||||||
|
|
||||||
-- [[ Setting options ]]
|
-- [[ Setting options ]]
|
||||||
-- See `:help vim.opt`
|
-- See `:help vim.opt`
|
||||||
-- 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`
|
||||||
|
|
||||||
|
-- Powershell Custom
|
||||||
|
-- Check if Windows
|
||||||
|
local is_win32 = vim.fn.has 'win32'
|
||||||
|
if is_win32 == 1 then
|
||||||
|
local powershell_options = {
|
||||||
|
shell = vim.fn.executable 'pwsh' == 1 and 'pwsh' or 'powershell',
|
||||||
|
shellcmdflag = '-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;',
|
||||||
|
shellredir = '-RedirectStandardOutput %s -NoNewWindow -Wait',
|
||||||
|
shellpipe = '2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode',
|
||||||
|
shellquote = '',
|
||||||
|
shellxquote = '',
|
||||||
|
}
|
||||||
|
|
||||||
|
for option, value in pairs(powershell_options) do
|
||||||
|
vim.opt[option] = value
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Make line numbers default
|
-- Make line numbers default
|
||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
-- You can also add relative line numbers, to help with jumping.
|
-- You can also add relative line numbers, to help with jumping.
|
||||||
|
@ -538,8 +556,8 @@ require('lazy').setup({
|
||||||
-- - settings (table): Override the default settings passed when initializing the server.
|
-- - settings (table): Override the default settings passed when initializing the server.
|
||||||
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
||||||
local servers = {
|
local servers = {
|
||||||
-- clangd = {},
|
clangd = {},
|
||||||
-- gopls = {},
|
gopls = {},
|
||||||
-- pyright = {},
|
-- pyright = {},
|
||||||
-- rust_analyzer = {},
|
-- rust_analyzer = {},
|
||||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||||
|
@ -847,7 +865,7 @@ require('lazy').setup({
|
||||||
--
|
--
|
||||||
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
-- 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`
|
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
|
||||||
-- { import = 'custom.plugins' },
|
{ import = 'custom.plugins' },
|
||||||
}, {
|
}, {
|
||||||
ui = {
|
ui = {
|
||||||
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
-- File: lua/custom/plugins/autopairs.lua
|
||||||
|
|
||||||
|
return {
|
||||||
|
'windwp/nvim-autopairs',
|
||||||
|
-- Optional dependency
|
||||||
|
dependencies = { 'hrsh7th/nvim-cmp' },
|
||||||
|
config = function()
|
||||||
|
require('nvim-autopairs').setup {}
|
||||||
|
-- If you want to automatically add `(` after selecting a function or method
|
||||||
|
local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
|
||||||
|
local cmp = require 'cmp'
|
||||||
|
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
|
||||||
|
end,
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
-- You can add your own plugins here or in other files in this directory!
|
||||||
|
-- I promise not to create any merge conflicts in this directory :)
|
||||||
|
--
|
||||||
|
-- See the kickstart.nvim README for more information
|
||||||
|
return {
|
||||||
|
'kdheepak/lazygit.nvim',
|
||||||
|
cmd = {
|
||||||
|
'LazyGit',
|
||||||
|
'LazyGitConfig',
|
||||||
|
'LazyGitCurrentFile',
|
||||||
|
'LazyGitFilter',
|
||||||
|
'LazyGitFilterCurrentFile',
|
||||||
|
},
|
||||||
|
-- optional for floating window border decoration
|
||||||
|
dependencies = {
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
|
},
|
||||||
|
-- setting the keybinding for LazyGit with 'keys' is recommended in
|
||||||
|
-- order to load the plugin when the command is run for the first time
|
||||||
|
keys = {
|
||||||
|
{ '<leader>lg', '<cmd>LazyGit<cr>', desc = 'LazyGit' },
|
||||||
|
},
|
||||||
|
}
|
Loading…
Reference in New Issue