Skip to content

Commit 64a4490

Browse files
committed
adding my changes maybe
1 parent 8d1ef97 commit 64a4490

File tree

2 files changed

+163
-42
lines changed

2 files changed

+163
-42
lines changed

db_ui/connections.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"url": "postgresql://postgres:mysecretpassword@localhost:5432/postgres", "name": "postgresLOCAL"}, {"url": "postgres://Jam:uTbgAJkiWNQoaQM6Avs3@database-1.cl0yc6giqcky.us-west-2.rds.amazonaws.com:5432/argodb", "name": "argodb"}]

init.lua

Lines changed: 162 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
--[[
2-
32
=====================================================================
43
==================== READ THIS BEFORE CONTINUING ====================
54
=====================================================================
@@ -14,15 +13,15 @@
1413
======== |'-..................-'| |____o| ========
1514
======== `"")----------------(""` ___________ ========
1615
======== /::::::::::| |::::::::::\ \ no mouse \ ========
17-
======== /:::========| |==hjkl==:::\ \ required \ ========
16+
======== /:::========| |==hjkl==:::\ \ reqired \ ========
1817
======== '""""""""""""' '""""""""""""' '""""""""""' ========
1918
======== ========
2019
=====================================================================
2120
=====================================================================
2221
2322
What is Kickstart?
2423
25-
Kickstart.nvim is *not* a distribution.
24+
Kickstart.nvim is *not* a distribtion.
2625
2726
Kickstart.nvim is a starting point for your own configuration.
2827
The goal is that you can read every line of code, top-to-bottom, understand
@@ -47,7 +46,7 @@ Kickstart Guide:
4746
4847
If you don't know what this means, type the following:
4948
- <escape key>
50-
- :
49+
h - :
5150
- Tutor
5251
- <enter key>
5352
@@ -97,12 +96,12 @@ vim.g.have_nerd_font = false
9796
-- See `:help vim.opt`
9897
-- NOTE: You can change these options as you wish!
9998
-- For more options, you can see `:help option-list`
100-
99+
vim.opt.foldmethod = 'indent'
101100
-- Make line numbers default
102-
vim.opt.number = true
101+
--vim.opt.number = true
103102
-- You can also add relative line numbers, to help with jumping.
104103
-- Experiment for yourself to see if you like it!
105-
-- vim.opt.relativenumber = true
104+
vim.opt.relativenumber = true
106105

107106
-- Enable mouse mode, can be useful for resizing splits for example!
108107
vim.opt.mouse = 'a'
@@ -128,12 +127,11 @@ vim.opt.undofile = true
128127
vim.opt.ignorecase = true
129128
vim.opt.smartcase = true
130129

131-
-- Keep signcolumn on by default
130+
-- Keep signcolumn on by default.
132131
vim.opt.signcolumn = 'yes'
133132

134133
-- Decrease update time
135-
vim.opt.updatetime = 250
136-
134+
vim.opt.updatetime = 20
137135
-- Decrease mapped sequence wait time
138136
-- Displays which-key popup sooner
139137
vim.opt.timeoutlen = 300
@@ -190,6 +188,9 @@ vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right win
190188
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
191189
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
192190

191+
-- I removed this because I just use oiler now with "-"
192+
--vim.keymap.set('n', '<leader>pv', vim.cmd.Ex)
193+
193194
-- [[ Basic Autocommands ]]
194195
-- See `:help lua-guide-autocommands`
195196

@@ -257,7 +258,6 @@ require('lazy').setup({
257258
},
258259

259260
-- NOTE: Plugins can also be configured to run Lua code when they are loaded.
260-
--
261261
-- This is often very useful to both group configuration, as well as handle
262262
-- lazy loading plugins that don't need to be loaded immediately at startup.
263263
--
@@ -358,7 +358,7 @@ require('lazy').setup({
358358
},
359359
config = function()
360360
-- Telescope is a fuzzy finder that comes with a lot of different things that
361-
-- it can fuzzy find! It's more than just a "file finder", it can search
361+
--", it can search
362362
-- many different aspects of Neovim, your workspace, LSP, and more!
363363
--
364364
-- The easiest way to use Telescope, is to start by doing something like:
@@ -411,7 +411,7 @@ require('lazy').setup({
411411
vim.keymap.set('n', '<leader>sr', builtin.resume, { desc = '[S]earch [R]esume' })
412412
vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
413413
vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
414-
414+
vim.keymap.set('n', '<C-p>', ':Telescope find_files<CR>')
415415
-- Slightly advanced example of overriding default behavior and theme
416416
vim.keymap.set('n', '<leader>/', function()
417417
-- You can pass additional configuration to Telescope to change the theme, layout, etc.
@@ -450,6 +450,7 @@ require('lazy').setup({
450450
},
451451
},
452452
},
453+
453454
{ 'Bilal2453/luvit-meta', lazy = true },
454455
{
455456
-- Main LSP Configuration
@@ -468,14 +469,21 @@ require('lazy').setup({
468469
'hrsh7th/cmp-nvim-lsp',
469470
},
470471
config = function()
472+
-- Add the dadbod completion setup here
473+
require('cmp').setup.filetype('sql', {
474+
sources = {
475+
{ name = 'vim-dadbod-completion' },
476+
{ name = 'buffer' },
477+
},
478+
})
471479
-- Brief aside: **What is LSP?**
472480
--
473481
-- LSP is an initialism you've probably heard, but might not understand what it is.
474482
--
475483
-- LSP stands for Language Server Protocol. It's a protocol that helps editors
476484
-- and language tooling communicate in a standardized fashion.
477485
--
478-
-- In general, you have a "server" which is some tool built to understand a particular
486+
-- In general, you have a "" which is some tool built to understand a particular
479487
-- language (such as `gopls`, `lua_ls`, `rust_analyzer`, etc.). These Language Servers
480488
-- (sometimes called LSP servers, but that's kind of like ATM Machine) are standalone
481489
-- processes that communicate with some "client" - in this case, Neovim!
@@ -617,15 +625,15 @@ require('lazy').setup({
617625
local servers = {
618626
-- clangd = {},
619627
-- gopls = {},
620-
-- pyright = {},
628+
pyright = {},
621629
-- rust_analyzer = {},
622630
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
623631
--
624632
-- Some languages (like typescript) have entire language plugins that can be useful:
625633
-- https://github.com/pmizio/typescript-tools.nvim
626634
--
627635
-- But for many setups, the LSP (`ts_ls`) will work just fine
628-
-- ts_ls = {},
636+
ts_ls = {},
629637
--
630638

631639
lua_ls = {
@@ -674,7 +682,6 @@ require('lazy').setup({
674682
}
675683
end,
676684
},
677-
678685
{ -- Autoformat
679686
'stevearc/conform.nvim',
680687
event = { 'BufWritePre' },
@@ -703,14 +710,15 @@ require('lazy').setup({
703710
lsp_format_opt = 'fallback'
704711
end
705712
return {
706-
timeout_ms = 500,
713+
timeout_ms = 2000, -- this was 500
707714
lsp_format = lsp_format_opt,
715+
async = false, -- added this line
708716
}
709717
end,
710718
formatters_by_ft = {
711719
lua = { 'stylua' },
712720
-- Conform can also run multiple formatters sequentially
713-
-- python = { "isort", "black" },
721+
python = { 'isort', 'black' },
714722
--
715723
-- You can use 'stop_after_first' to run the first available formatter from the list
716724
-- javascript = { "prettierd", "prettier", stop_after_first = true },
@@ -797,7 +805,6 @@ require('lazy').setup({
797805
-- Generally you don't need this, because nvim-cmp will display
798806
-- completions whenever it has completion options available.
799807
['<C-Space>'] = cmp.mapping.complete {},
800-
801808
-- Think of <c-l> as moving to the right of your snippet expansion.
802809
-- So if you have a snippet that's like:
803810
-- function $name($args)
@@ -833,24 +840,42 @@ require('lazy').setup({
833840
}
834841
end,
835842
},
836-
837-
{ -- You can easily change to a different colorscheme.
838-
-- Change the name of the colorscheme plugin below, and then
839-
-- change the command in the config to whatever the name of that colorscheme is.
840-
--
841-
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
842-
'folke/tokyonight.nvim',
843-
priority = 1000, -- Make sure to load this before all the other start plugins.
844-
init = function()
845-
-- Load the colorscheme here.
846-
-- Like many other themes, this one has different styles, and you could load
847-
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
848-
vim.cmd.colorscheme 'tokyonight-night'
849-
850-
-- You can configure highlights by doing something like:
851-
vim.cmd.hi 'Comment gui=none'
843+
{
844+
'sainnhe/gruvbox-material',
845+
priority = 1000,
846+
config = function()
847+
vim.g.gruvbox_material_foreground = 'original'
848+
vim.g.gruvbox_material_background = 'medium'
849+
vim.g.gruvbox_material_enable_italic = 1
850+
vim.g.gruvbox_material_better_performance = 1
851+
vim.cmd [[colorscheme gruvbox-material]]
852852
end,
853853
},
854+
-- {
855+
-- 'shaunsingh/nord.nvim', -- Use the Nord plugin
856+
-- priority = 1000,
857+
-- init = function()
858+
-- vim.cmd.colorscheme 'nord' -- Change to 'nord'
859+
-- end,
860+
-- },
861+
-- { -- You can easily change to a different colorscheme.
862+
--
863+
-- -- Change the name of the colorscheme plugin below, and then
864+
-- -- change the command in the config to whatever the name of that colorscheme is.
865+
--
866+
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
867+
-- 'folke/tokyonight.nvim',
868+
-- priority = 1000, -- Make sure to load this before all the other start plugins.
869+
-- init = function()
870+
-- -- Load the colorscheme here.
871+
-- -- Like many other themes, this one has different styles, and you could load
872+
-- -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
873+
-- vim.cmd.colorscheme 'tokyonight-night'
874+
--
875+
-- -- You can configure highlights by doing something like:
876+
-- vim.cmd.hi 'Comment gui=none'
877+
-- end,
878+
-- },
854879

855880
-- Highlight todo, notes, etc in comments
856881
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
@@ -872,9 +897,7 @@ require('lazy').setup({
872897
-- - sd' - [S]urround [D]elete [']quotes
873898
-- - sr)' - [S]urround [R]eplace [)] [']
874899
require('mini.surround').setup()
875-
876-
-- Simple and easy statusline.
877-
-- You could remove this setup call if you don't like it,
900+
-- Simple and easy statusline. You could remove this setup call if you don't like it,
878901
-- and try some other statusline plugin
879902
local statusline = require 'mini.statusline'
880903
-- set use_icons to true if you have a Nerd Font
@@ -898,7 +921,7 @@ require('lazy').setup({
898921
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
899922
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
900923
opts = {
901-
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
924+
ensure_installed = { 'typescript', 'python', 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
902925
-- Autoinstall languages that are not installed
903926
auto_install = true,
904927
highlight = {
@@ -933,17 +956,115 @@ require('lazy').setup({
933956
-- require 'kickstart.plugins.autopairs',
934957
-- require 'kickstart.plugins.neo-tree',
935958
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
959+
--
960+
{
961+
'nvim-tree/nvim-web-devicons',
962+
lazy = true,
963+
},
964+
{
965+
'folke/zen-mode.nvim',
966+
opts = {
967+
-- your configuration comes here
968+
-- or leave it empty to use the default settings
969+
-- refer to the configuration section below
970+
},
971+
},
972+
{
973+
'stevearc/oil.nvim',
974+
dependencies = { 'nvim-tree/nvim-web-devicons' },
975+
config = function()
976+
CustomOilBar = function()
977+
local path = vim.fn.expand '%'
978+
path = path:gsub('oil://', '')
979+
980+
return ' ' .. vim.fn.fnamemodify(path, ':.')
981+
end
982+
983+
require('oil').setup {
984+
columns = { 'icon' },
985+
keymaps = {
986+
['<C-h>'] = false,
987+
['<C-l>'] = false,
988+
['<C-k>'] = false,
989+
['<C-j>'] = false,
990+
['<M-h>'] = 'actions.select_split',
991+
},
992+
win_options = {
993+
winbar = '%{v:lua.CustomOilBar()}',
994+
},
995+
view_options = {
996+
show_hidden = true,
997+
is_always_hidden = function(name, _)
998+
local folder_skip = { 'dev-tools.locks', 'dune.lock', '_build' }
999+
return vim.tbl_contains(folder_skip, name)
1000+
end,
1001+
},
1002+
}
1003+
1004+
-- Open parent directory in current window
1005+
vim.keymap.set('n', '-', '<CMD>Oil<CR>', { desc = 'Open parent directory' })
1006+
1007+
-- Open parent directory in floating window
1008+
vim.keymap.set('n', '<space>-', require('oil').toggle_float)
1009+
end,
1010+
},
1011+
-- NOTE Custom plugins
1012+
{
1013+
'ThePrimeagen/harpoon',
1014+
branch = 'harpoon2',
1015+
dependencies = { 'nvim-lua/plenary.nvim' },
1016+
config = function()
1017+
local harpoon = require 'harpoon'
1018+
harpoon:setup()
1019+
1020+
vim.keymap.set('n', '<leader>a', function()
1021+
harpoon:list():add()
1022+
end)
1023+
vim.keymap.set('n', '<leader>h', function()
1024+
harpoon.ui:toggle_quick_menu(harpoon:list())
1025+
end)
1026+
1027+
vim.keymap.set('n', '<leader>1', function()
1028+
harpoon:list():select(1)
1029+
end)
1030+
vim.keymap.set('n', '<leader>2', function()
1031+
harpoon:list():select(2)
1032+
end)
1033+
vim.keymap.set('n', '<leader>3', function()
1034+
harpoon:list():select(3)
1035+
end)
1036+
vim.keymap.set('n', '<leader>4', function()
1037+
harpoon:list():select(4)
1038+
end)
1039+
end,
1040+
},
1041+
{
1042+
'mbbill/undotree',
1043+
keys = {
1044+
{ '<leader>u', vim.cmd.UndotreeToggle, desc = 'Toggle undotree' },
1045+
},
1046+
},
1047+
{
1048+
'tpope/vim-dadbod',
1049+
dependencies = {
1050+
'kristijanhusak/vim-dadbod-ui',
1051+
'kristijanhusak/vim-dadbod-completion',
1052+
},
1053+
config = function()
1054+
vim.g.db_ui_save_location = vim.fn.stdpath 'config' .. '/db_ui'
1055+
end,
1056+
},
9361057

9371058
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
9381059
-- This is the easiest way to modularize your config.
9391060
--
9401061
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
9411062
-- { import = 'custom.plugins' },
942-
--
9431063
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
9441064
-- Or use telescope!
9451065
-- In normal mode type `<space>sh` then write `lazy.nvim-plugin`
9461066
-- you can continue same window with `<space>sr` which resumes last telescope search
1067+
--NOTE custom plugins
9471068
}, {
9481069
ui = {
9491070
-- If you are using a Nerd Font: set icons to an empty table which will use the
@@ -965,6 +1086,5 @@ require('lazy').setup({
9651086
},
9661087
},
9671088
})
968-
9691089
-- The line beneath this is called `modeline`. See `:help modeline`
9701090
-- vim: ts=2 sts=2 sw=2 et

0 commit comments

Comments
 (0)