initial customization.

This commit is contained in:
bob-ross27 2023-10-08 13:30:12 -03:00
parent 53e925240f
commit 8bb6154263
4 changed files with 158 additions and 17 deletions

View File

@ -150,15 +150,6 @@ require('lazy').setup({
}, },
}, },
{
-- Theme inspired by Atom
'navarasu/onedark.nvim',
priority = 1000,
config = function()
vim.cmd.colorscheme 'onedark'
end,
},
{ {
-- Set lualine as statusline -- Set lualine as statusline
'nvim-lualine/lualine.nvim', 'nvim-lualine/lualine.nvim',
@ -166,7 +157,7 @@ require('lazy').setup({
opts = { opts = {
options = { options = {
icons_enabled = false, icons_enabled = false,
theme = 'onedark', theme = 'dracula',
component_separators = '|', component_separators = '|',
section_separators = '', section_separators = '',
}, },
@ -214,12 +205,11 @@ require('lazy').setup({
}, },
build = ':TSUpdate', build = ':TSUpdate',
}, },
-- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart -- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart
-- These are some example plugins that I've included in the kickstart repository. -- These are some example plugins that I've included in the kickstart repository.
-- Uncomment any of the lines below to enable them. -- Uncomment any of the lines below to enable them.
-- require 'kickstart.plugins.autoformat', -- require 'kickstart.plugins.autoformat',
-- require 'kickstart.plugins.debug', require 'kickstart.plugins.debug',
-- 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`
-- You can use this folder to prevent any conflicts with this init.lua if you're interested in keeping -- You can use this folder to prevent any conflicts with this init.lua if you're interested in keeping
@ -227,7 +217,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: https://github.com/folke/lazy.nvim#-structuring-your-plugins -- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins
-- { import = 'custom.plugins' }, { import = 'custom.plugins' },
}, {}) }, {})
-- [[ Setting options ]] -- [[ Setting options ]]
@ -240,13 +230,16 @@ vim.o.hlsearch = false
-- Make line numbers default -- Make line numbers default
vim.wo.number = true vim.wo.number = true
-- Relative line numbers
vim.wo.relativenumber = true
-- Enable mouse mode -- Enable mouse mode
vim.o.mouse = 'a' vim.o.mouse = 'a'
-- Sync clipboard between OS and Neovim. -- Sync clipboard between OS and Neovim.
-- Remove this option if you want your OS clipboard to remain independent. -- Remove this option if you want your OS clipboard to remain independent.
-- See `:help 'clipboard'` -- See `:help 'clipboard'`
vim.o.clipboard = 'unnamedplus' -- vim.o.clipboard = 'unnamedplus'
-- Enable break indent -- Enable break indent
vim.o.breakindent = true vim.o.breakindent = true
@ -334,7 +327,6 @@ vim.defer_fn(function()
require('nvim-treesitter.configs').setup { require('nvim-treesitter.configs').setup {
-- Add languages to be installed here that you want installed for treesitter -- Add languages to be installed here that you want installed for treesitter
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim' }, ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim' },
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
auto_install = false, auto_install = false,
@ -474,7 +466,8 @@ require('mason-lspconfig').setup()
local servers = { local servers = {
-- clangd = {}, -- clangd = {},
-- gopls = {}, -- gopls = {},
-- pyright = {}, pyright = {},
ruff_lsp = {},
-- rust_analyzer = {}, -- rust_analyzer = {},
-- tsserver = {}, -- tsserver = {},
-- html = { filetypes = { 'html', 'twig', 'hbs'} }, -- html = { filetypes = { 'html', 'twig', 'hbs'} },
@ -560,5 +553,12 @@ cmp.setup {
}, },
} }
-- Set autoformatting using conform
vim.api.nvim_create_autocmd('BufWritePre', {
pattern = '*',
callback = function(args)
require('conform').format { bufnr = args.buf }
end,
})
-- The line beneath this is called `modeline`. See `:help modeline` -- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et -- vim: ts=2 sts=2 sw=2 et

43
lazy-lock.json Normal file
View File

@ -0,0 +1,43 @@
{
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"LuaSnip": { "branch": "master", "commit": "cdbf6f41381e5ee4810b4b09284b603d8f18365d" },
"auto-pairs": { "branch": "master", "commit": "39f06b873a8449af8ff6a3eee716d3da14d63a76" },
"bufferline.nvim": { "branch": "main", "commit": "357cc8f8eeb64702e6fcf2995e3b9becee99a5d3" },
"cheatsheet.nvim": { "branch": "master", "commit": "9716f9aaa94dd1fd6ce59b5aae0e5f25e2a463ef" },
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
"conform.nvim": { "branch": "master", "commit": "e75819642c36810a55a7235b6b5e16a5ce896ed3" },
"dracula.nvim": { "branch": "main", "commit": "9fe831e685a76e1a1898a694623b33247c4d036c" },
"fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" },
"friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" },
"git-messenger.vim": { "branch": "master", "commit": "8a61bdfa351d4df9a9118ee1d3f45edbed617072" },
"gitsigns.nvim": { "branch": "main", "commit": "ff01d34daaed72f271a8ffa088a7e839a60c640f" },
"indent-blankline.nvim": { "branch": "master", "commit": "877c1db2bf957300097dd5348a665666a4d900cb" },
"lazy.nvim": { "branch": "main", "commit": "f0cfbf995238a42064e119bd1daa694fd1683ea3" },
"lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "e2705063f395b44f676cd26596a11007a2cbd3bd" },
"mason-nvim-dap.nvim": { "branch": "main", "commit": "6148b51db945b55b3b725da39eaea6441e59dff8" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "83dcddb6477f9ba5db98971ef27bd18bdca921b4" },
"mason.nvim": { "branch": "main", "commit": "d66c60e17dd6fd8165194b1d14d21f7eb2c1697a" },
"neodev.nvim": { "branch": "main", "commit": "f8592cc143a5512b98a2c3683aa43c73f98e34f7" },
"nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" },
"nvim-dap": { "branch": "master", "commit": "e79007c6d7a24db3ad19ea9196f1f0b2840e8ae7" },
"nvim-dap-go": { "branch": "main", "commit": "a5cc8dcad43f0732585d4793deb02a25c4afb766" },
"nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" },
"nvim-lspconfig": { "branch": "master", "commit": "2b361e043810d5587d9af0787f8ce40da92ec5e9" },
"nvim-treesitter": { "branch": "master", "commit": "a102053352bd958d84a3e1be3de0203d2af92984" },
"nvim-treesitter-context": { "branch": "master", "commit": "2095f231dfe796d228eedea96fdaa31f2e343fb2" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "76c7a89b41de77a4f83fb77fa072c5ad7605fe3b" },
"nvim-web-devicons": { "branch": "master", "commit": "56b3a6ce6d69329cbf603dd38ac59fb4d7774b01" },
"oil.nvim": { "branch": "master", "commit": "ac2928cca85ba3596e92f9f51940d46be2d606f8" },
"plenary.nvim": { "branch": "master", "commit": "9ce85b0f7dcfe5358c0be937ad23e456907d410b" },
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
"refactoring.nvim": { "branch": "master", "commit": "bebfcfcc4b604d3647fcce2f4aeb02a95d139c49" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
"telescope.nvim": { "branch": "0.1.x", "commit": "54930e1abfc94409e1bb9266e752ef8379008592" },
"vim-fugitive": { "branch": "master", "commit": "99db68d9b3304580bd383da7aaee05c7a954a344" },
"vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" },
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
"which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" },
"zen-mode.nvim": { "branch": "main", "commit": "cb73b8bd0ef9d765b942db09dc762c603a89ae44" }
}

View File

@ -2,4 +2,91 @@
-- I promise not to create any merge conflicts in this directory :) -- I promise not to create any merge conflicts in this directory :)
-- --
-- See the kickstart.nvim README for more information -- See the kickstart.nvim README for more information
return {} return {
-- Dracula theme
{
'Mofiqul/dracula.nvim',
priority = 1000,
config = function()
vim.cmd.colorscheme 'dracula'
end,
},
-- Zen Mode with :ZenMode
{
'folke/zen-mode.nvim',
opts = {
window = {
width = 0.80,
},
},
},
-- Automatic formatting
{
'stevearc/conform.nvim',
event = { 'BufWritePre' },
cmd = { 'ConformInfo' },
opts = {
formatters_by_ft = {
lua = { 'stylua' },
python = { 'black' },
},
format_on_save = { timeout_ms = 500, lsp_fallback = true },
},
},
-- Maintain context (function name/loops) at top of buffer
'nvim-treesitter/nvim-treesitter-context',
-- Refactor support with :Refactor
{
'ThePrimeagen/refactoring.nvim',
opts = {},
dependencies = {
'nvim-lua/plenary.nvim',
'nvim-treesitter/nvim-treesitter',
},
},
-- Automatic bracket pairs
'jiangmiao/auto-pairs',
-- Edit files/directories as a buffer
{
'stevearc/oil.nvim',
opts = {},
dependencies = { 'nvim-tree/nvim-web-devicons' },
},
-- Buffer tabs at top
{
'akinsho/bufferline.nvim',
opts = {},
dependencies = { 'nvim-tree/nvim-web-devicons' },
},
-- Searchable command reference with :CheatSheet
{
'sudormrfbin/cheatsheet.nvim',
dependencies = {
'nvim-telescope/telescope.nvim',
'nvim-lua/popup.nvim',
'nvim-lua/plenary.nvim',
},
},
-- Automatically install tools through Mason
{
'WhoIsSethDaniel/mason-tool-installer.nvim',
opts = {
ensure_installed = {
'black',
'stylua',
},
},
},
-- Add inline git history in floating windows
'rhysd/git-messenger.vim',
}

View File

@ -0,0 +1,11 @@
return {
vim.keymap.set('n', '<C-d>', '<C-d>zz'), -- Center after half-page down
vim.keymap.set('n', '<C-u>', '<C-u>zz'), -- Center after half-page up
vim.keymap.set('n', 'n', 'nzzzv'), -- Center after next result
vim.keymap.set('n', 'N', 'Nzzzv'), -- Center after previous result
vim.keymap.set('x', '<leader>p', [["_dP]]), -- Paste without losing register
vim.keymap.set({ 'n', 'v' }, '<leader>y', [["+y]]), -- Yank to OS clipboard
vim.keymap.set('n', '<leader>Y', [["+Y]]), -- ????
vim.keymap.set({ 'n', 'v' }, '<leader>d', [["_d]]), -- ????
vim.keymap.set('n', '<leader>cm', vim.cmd.ZenMode, { desc = '[Z]en [M]ode' }), -- Toggle ZenMode
}