Skip to content

Commit

Permalink
fix many issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomashighbaugh committed Nov 14, 2023
1 parent 3fcea7e commit 987613d
Show file tree
Hide file tree
Showing 14 changed files with 359 additions and 73 deletions.
44 changes: 28 additions & 16 deletions lazy-lock.json
Original file line number Diff line number Diff line change
@@ -1,64 +1,76 @@
{
"Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" },
"LuaSnip": { "branch": "master", "commit": "0b4950a237ce441a6a3a947d501622453f6860ea" },
"LuaSnip": { "branch": "master", "commit": "1f4ad8bb72bdeb60975e98652636b991a9b7475d" },
"animation.nvim": { "branch": "main", "commit": "fb77091ab72ec9971aee0562e7081182527aaa6a" },
"barbecue.nvim": { "branch": "main", "commit": "cd7e7da622d68136e13721865b4d919efd6325ed" },
"bufferline.nvim": { "branch": "main", "commit": "6ecd37e0fa8b156099daedd2191130e083fb1490" },
"cheatsheet.nvim": { "branch": "master", "commit": "9716f9aaa94dd1fd6ce59b5aae0e5f25e2a463ef" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-calc": { "branch": "main", "commit": "ce91d14d2e7a8b3f6ad86d85e34d41c1ae6268d9" },
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
"cmp-cmdline-history": { "branch": "master", "commit": "003573b72d4635ce636234a826fa8c4ba2895ffe" },
"cmp-conventionalcommits": { "branch": "master", "commit": "a4dfacf0601130b7f8afa7c948d735c27802fb7f" },
"cmp-git": { "branch": "main", "commit": "f900a4cf117300fdc3ba31d26f8b6223ccd9c574" },
"cmp-luasnip-choice": { "branch": "master", "commit": "4f49232e51c9df379b9daf43f25f7ee6320450f0" },
"cmp-npm": { "branch": "main", "commit": "2337f109f51a09297596dd6b538b70ccba92b4e4" },
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
"cmp-nvim-lsp-document-symbol": { "branch": "main", "commit": "f0f53f704c08ea501f9d222b23491b0d354644b0" },
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp-treesitter": { "branch": "master", "commit": "b8bc760dfcc624edd5454f0982b63786a822eed9" },
"cmp-zsh": { "branch": "main", "commit": "c24db8e58fac9006ec23d93f236749288d00dec9" },
"cmp_kitty": { "branch": "main", "commit": "a0716db2efb4c452600ef1e4a3ca610889279118" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"codeium.nvim": { "branch": "main", "commit": "822e762567a0bf50b1a4e733c8c93691934d7606" },
"comment-box.nvim": { "branch": "main", "commit": "dd1a48f8d06102e9b87ae1e0069bc365c006979b" },
"compile-nvim": { "branch": "main", "commit": "f7ad312ec5d0ae4a0554a7e52349ee371b868a5d" },
"conform.nvim": { "branch": "master", "commit": "1281e26948fc06994e0e0cdcaafdd9bbd28929e7" },
"dashboard-nvim": { "branch": "master", "commit": "c71cab740e2add248c54c458b5ca9d6e77c30fa6" },
"conform.nvim": { "branch": "master", "commit": "66affb4034ee6d77160f0aed99b615fad311ce14" },
"dashboard-nvim": { "branch": "master", "commit": "63df28409d940f9cac0a925df09d3dc369db9841" },
"dressing.nvim": { "branch": "master", "commit": "59fe7ef1aeeed499b983614fcfff89206bf0d5ce" },
"emmet-vim": { "branch": "master", "commit": "def5d57a1ae5afb1b96ebe83c4652d1c03640f4d" },
"friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" },
"gitsigns.nvim": { "branch": "main", "commit": "bb808fc7376ed7bac0fbe8f47b83d4bf01738167" },
"indent-blankline.nvim": { "branch": "master", "commit": "29be0919b91fb59eca9e90690d76014233392bef" },
"lazy.nvim": { "branch": "main", "commit": "16603c6917435d8446f7357cb61095138a417085" },
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
"llm.nvim": { "branch": "main", "commit": "7657d65adac2901b4712f73d81d5827d7c0494f4" },
"lsp_signature.nvim": { "branch": "master", "commit": "4665921ff8e30601c7c1328625b3abc1427a6143" },
"lspsaga.nvim": { "branch": "main", "commit": "7ebd0cc5923c81516c1c050fc9aea70bec23fd02" },
"lspsaga.nvim": { "branch": "main", "commit": "283a3fc8e01191095d33c078031c577e8f9427b9" },
"lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "bbc7d7709ea6aa85add78b745b2439f18b0bc240" },
"mason.nvim": { "branch": "main", "commit": "eabf6d347fdb75be360d4c0ced1145670a171453" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "c1a10a956eab57c8e9e43491a252ac112e765af3" },
"mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" },
"middleclass": { "branch": "master", "commit": "9fab4d5bca67262614960960ca35c4740eb2be2c" },
"mini.comment": { "branch": "main", "commit": "877acea5b2a32ff55f808fc0ebe9aa898648318c" },
"mini.indentscope": { "branch": "main", "commit": "cbc07203ca8faae952ca373c1f6cc5881ce97af0" },
"mini.indentscope": { "branch": "main", "commit": "c8fdafa7bf603d758986a27eb546c55a5c73b1a3" },
"mini.pairs": { "branch": "main", "commit": "dfa9f6e2576bb8853be277d96b735af59d9be7c2" },
"monokai-pro.nvim": { "branch": "master", "commit": "70c384c43b9e19b59df3d6489b544ad4df155100" },
"neo-tree-diagnostics.nvim": { "branch": "main", "commit": "483019d251c31acd14102bc279f938f98d9a3de6" },
"neo-tree.nvim": { "branch": "main", "commit": "1236db954ce502eb5b340bcdb69aa057cc372e8d" },
"neo-tree.nvim": { "branch": "main", "commit": "f053f09962819c1558cd93639aa80edf7c314c17" },
"neodev.nvim": { "branch": "main", "commit": "da1562e1e3df0e994ddc52cb4ba22376a5d7f2fc" },
"noice.nvim": { "branch": "main", "commit": "92433164e2f7118d4122c7674c3834d9511722ba" },
"nui.nvim": { "branch": "main", "commit": "9e3916e784660f55f47daa6f26053ad044db5d6a" },
"null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" },
"nvim-cmp": { "branch": "main", "commit": "51260c02a8ffded8e16162dcf41a23ec90cfba62" },
"nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" },
"nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" },
"nvim-jdtls": { "branch": "master", "commit": "a5c6f38f8151d7b4f5b32c005a95022fa66f4c9d" },
"nvim-lightbulb": { "branch": "master", "commit": "02aacd93b9b2367e6dbdd20f43b525f701faf834" },
"nvim-lspconfig": { "branch": "master", "commit": "d0467b9574b48429debf83f8248d8cee79562586" },
"nvim-lspconfig": { "branch": "master", "commit": "fa04d48113d7db6223c52b98c049995ecce3456e" },
"nvim-navic": { "branch": "master", "commit": "0ffa7ffe6588f3417e680439872f5049e38a24db" },
"nvim-notify": { "branch": "master", "commit": "ea9c8ce7a37f2238f934e087c255758659948e0f" },
"nvim-scrollbar": { "branch": "main", "commit": "35f99d559041c7c0eff3a41f9093581ceea534e8" },
"nvim-treesitter": { "branch": "master", "commit": "f3c27105840eeb3c5f66293232dd834a13f90c52" },
"nvim-treesitter": { "branch": "master", "commit": "2241f81d74a3de7f8ae1517bbfc24c319218d9a0" },
"nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "92e688f013c69f90c9bbd596019ec10235bc51de" },
"nvim-web-devicons": { "branch": "master", "commit": "5de460ca7595806044eced31e3c36c159a493857" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "6c30f3c8915d7b31c3decdfe6c7672432da1809d" },
"nvim-web-devicons": { "branch": "master", "commit": "11eb26fc166742db8d1e8a6f5a7de9df37b09aae" },
"persistence.nvim": { "branch": "main", "commit": "ad538bfd5336f1335cdb6fd4e0b0eebfa6e12f32" },
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
"quicknote.nvim": { "branch": "master", "commit": "530ee1f74b0ef191a3a8110b5f9d4bdffc7bfd6c" },
"rainbow-delimiters.nvim": { "branch": "master", "commit": "df8cdf68234fbf056202a9684931c3dfa89988c1" },
"rainbow-delimiters.nvim": { "branch": "master", "commit": "9515abd92ae0e42044d47716537f3997991a037b" },
"rnvimr": { "branch": "main", "commit": "4f4fbd29e2e0869bea9a8376e06fca4331de60c9" },
"sort.nvim": { "branch": "main", "commit": "c789da6968337d2a61104a929880b5f144e02855" },
"statuscol.nvim": { "branch": "main", "commit": "98d02fc90ebd7c4674ec935074d1d09443d49318" },
"swenv.nvim": { "branch": "main", "commit": "08aea3e8809ab00dfcab3cebb466dcb8001ad162" },
"telescope.nvim": { "branch": "master", "commit": "4522d7e3ea75ffddabdc39957168a8a7060b5df0" },
"telescope.nvim": { "branch": "master", "commit": "7011eaae0ac1afe036e30c95cf80200b8dc3f21a" },
"todo-comments.nvim": { "branch": "main", "commit": "8febc60a76feefd8203077ef78b6a262ea1a41f9" },
"toggleterm.nvim": { "branch": "main", "commit": "faee9d60428afc7857e0927fdc18daa6c409fa64" },
"vim-bbye": { "branch": "master", "commit": "903f5eb17f72ebf7b0b1524bbb792c0b36761af6" },
Expand Down
24 changes: 24 additions & 0 deletions lua/config/cmp/dict.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
local M ={}
local dict = require("cmp_dictionary")

dict.setup({
-- The following are default values.
exact = 2,
first_case_insensitive = false,
document = false,
document_command = "wn %s -over",
sqlite = false,
max_items = -1,
capacity = 5,
debug = false,
})

dict.switcher({
spelllang = {
en = "/home/tlh/.config/nvim/spell/en.dict",
hi ="/home/tlh/.config/nvim/spell/hi.dict",
es = "/home/tlh/.config/nvim/spell/es.dict",

},
})
return M
13 changes: 13 additions & 0 deletions lua/config/lsp/breadcrumb.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
local M = {}

M.attach = function(client, buffer)
local status_ok, breadcrumb = pcall(require, "breadcrumb")
if not status_ok then
return
end
if client.server_capabilities.documentSymbolProvider then
breadcrumb.attach(client, buffer)
end
end

return M
11 changes: 11 additions & 0 deletions lua/config/lsp/inlayhints.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
local M = {}

M.attach = function(client, buffer)
local status_ok, inlayhints = pcall(require, "lsp-inlayhints")
if not status_ok then
return
end
inlayhints.on_attach(client, buffer)
end

return M
20 changes: 20 additions & 0 deletions lua/config/lsp/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@ local M = {}

function M.get()
return {
{ "<leader>la", "<cmd>lua vim.lsp.buf.code_action()<cr>", desc = "Code Action" },
{ "<leader>ld", "<cmd>Telescope lsp_document_diagnostics<cr>", desc = "Document Diagnostics" },
{ "<leader>lw", "<cmd>Telescope lsp_workspace_diagnostics<cr>", desc = "Workspace Diagnostics" },
{
"<leader>lh",
function()
vim.lsp.inlay_hint(0, nil)
end,
desc = "Toggle inlay hints",
},
{ "<leader>li", "<cmd>LspInfo<cr>", desc = "Info" },
{ "<leader>lI", "<cmd>LspInstallInfo<cr>", desc = "Installer Info" },
{ "<leader>lj", "<cmd>lua vim.lsp.diagnostic.goto_next()<CR>", desc = "Next Diagnostic" },
{ "<leader>lk", "<cmd>lua vim.lsp.diagnostic.goto_prev()<cr>", desc = "Prev Diagnostic" },
{ "<leader>ll", "<cmd>lua vim.lsp.codelens.run()<cr>", desc = "CodeLens Action" },
{ "<leader>lq", "<cmd>lua vim.lsp.diagnostic.set_loclist()<cr>", desc = "Quickfix" },
{ "<leader>lr", "<cmd>lua vim.lsp.buf.rename()<cr>", desc = "Rename" },
{ "<leader>ls", "<cmd>Telescope lsp_document_symbols<cr>", desc = "Document Symbols" },
{ "<leader>lS", "<cmd>Telescope lsp_dynamic_workspace_symbols<cr>", desc = "Workspace Symbols" },
-- Goto
{ "gd", "<cmd>Telescope lsp_definitions<cr>", desc = "Go to definition" },
{ "gr", "<cmd>Telescope lsp_references<cr>", desc = "Go to references" },
Expand All @@ -10,6 +29,7 @@ function M.get()
{ "gl", "<cmd>lua vim.diagnostic.open_float()<CR>", desc = "Show diagnostics" },
{ "]d", "<cmd>lua vim.diagnostic.goto_prev({buffer=0})<cr>", desc = "Prev Diagnostic" },
{ "[d", "<cmd>lua vim.diagnostic.goto_next({buffer=0})<CR>", desc = "Next Diagnostic" },
{ "<leader>lq", "<cmd>lua vim.diagnostic.setloclist()<CR>", desc = "Quickfix" },
}
end

Expand Down
87 changes: 87 additions & 0 deletions lua/config/lsp/servers.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
local servers = {
clangd = {},
cssls = {},
html = {},
jsonls = {},
sqlls = {},
intelephense = {}, -- php language server
jdtls = {
disabled = true
},
lua_ls = {
settings = {
Lua = {
hint = {
enable = true,
arrayIndex = "Disable", -- "Enable", "Auto", "Disable"
await = true,
paramName = "Disable", -- "All", "Literal", "Disable"
paramType = false,
semicolon = "Disable", -- "All", "SameLine", "Disable"
setType = true,
},
runtime = {
version = "LuaJIT",
special = {
reload = "require",
},
},
diagnostics = {
globals = { "vim" },
},
workspace = {
library = {
[vim.fn.expand("$VIMRUNTIME/lua")] = false,
[vim.fn.stdpath("config") .. "/lua"] = false,
},
},
telemetry = {
enable = false,
},
},
},
},
tsserver = {
settings = {
typescript = {
inlayHints = {
includeInlayParameterNameHints = "all",
includeInlayParameterNameHintsWhenArgumentMatchesName = true,
includeInlayFunctionParameterTypeHints = true,
includeInlayVariableTypeHints = true,
includeInlayPropertyDeclarationTypeHints = true,
includeInlayFunctionLikeReturnTypeHints = true,
includeInlayEnumMemberValueHints = true,
},
},
javascript = {
inlayHints = {
includeInlayParameterNameHints = "all",
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
includeInlayFunctionParameterTypeHints = true,
includeInlayVariableTypeHints = true,
includeInlayPropertyDeclarationTypeHints = true,
includeInlayFunctionLikeReturnTypeHints = true,
includeInlayEnumMemberValueHints = true,
},
},
},
},
pyright = {
settings = {
python = {
analysis = {
typeCheckingMode = "basic",
diagnosticMode = "workspace",
inlayHints = {
variableTypes = true,
functionReturnTypes = true,
},
},
},
},
},
bashls = {},
}

return servers
32 changes: 31 additions & 1 deletion lua/core/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,41 @@ map("t", "<C-j>", [[<C-\><C-n><C-W>j]], { noremap = true })
map("t", "<C-k>", [[<C-\><C-n><C-W>k]], { noremap = true })
map("t", "<C-l>", [[<C-\><C-n><C-W>l]], { noremap = true })

-- save like your are used to

-- ┏╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍┓
-- ╏ ╏
-- ╏ Save Function ╏
-- ╏ ╏
-- ┗╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍┛

map("v", "<C-s>", "<esc><cmd>wa<cr>", { desc = "Save file" })
map("i", "<C-s>", "<esc><cmd>wa<cr>", { desc = "Save file" })
map("n", "<C-s>", "<esc><cmd>wa<cr>", { desc = "Save file" })
map("x", "<C-s>", "<esc><cmd>wa<cr>", { desc = "Save file" })


-- ┏╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍┓
-- ╏ ╏
-- ╏ Comment Box ╏
-- ╏ ╏
-- ┗╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍┛
map("v", "<leader>Cb", "<cmd>CBllbox5<cr>", { desc = "left aligned fixed size box with left aligned text" })

map("v", "<leader>Cr", "<cmd>CBrrbox5<cr>", { desc = "right aligned fixed size box with left aligned text" })

map("v", "<leader>Cc", "<cmd>CBccbox5<cr>", { desc = " center aligned fixed size box with center aligned text" })

map("i", "<M-l>", "<cmd>CBcline10<cr>", { desc = "centered line" })


map("n", "<leader>Cb", "<cmd>CBllbox5<cr>", { desc = "left aligned fixed size box with left aligned text" })

map("n", "<leader>Cr", "<cmd>CBrrbox5<cr>", { desc = "left aligned fixed size box with left aligned text" })

map("n", "<leader>Cc", "<cmd>CBccbox5<cr>", { desc = " center aligned fixed size box with center aligned text" })

map("n", "<M-l>", "<cmd>CBcline10<cr>", { desc = "centered line" })

-------------------- Fuzzy Search --------------------------------
vim.keymap.set("n", "<C-f>", function()
-- You can pass additional configuration to telescope to change theme, layout, etc.
Expand Down
39 changes: 32 additions & 7 deletions lua/core/resources/coding.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,23 @@ return {
dependencies = {
"mfussenegger/nvim-jdtls",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-nvim-lsp-document-symbol",
"hrsh7th/cmp-nvim-lsp-signature-help",
"petertriho/cmp-git",
"davidsierradz/cmp-conventionalcommits",
"dmitmel/cmp-cmdline-history",
"garyhurtz/cmp_kitty",
"tamago324/cmp-zsh",
"David-Kunz/cmp-npm",
"ray-x/cmp-treesitter",
"hrsh7th/cmp-calc",
"L3MON4D3/LuaSnip",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"hrsh7th/cmp-cmdline",
"saadparwaiz1/cmp_luasnip",
"hrsh7th/cmp-nvim-lsp",
"L3MON4D3/cmp-luasnip-choice",
"uga-rosa/cmp-dictionary",
},
opts = function()
local cmp = require("cmp")
Expand Down Expand Up @@ -108,18 +120,30 @@ return {
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
-- ["<Tab>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
-- ["<S-Tab>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
["<Tab>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
["<S-Tab>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
["<Esc>"] = cmp.mapping(function(fallback)
require("luasnip").unlink_current()
fallback()
end),
}),
sources = cmp.config.sources({
{
name = "dictionary",
keyword_length = 2,
},
{ name = "codeium" },
{ name = "nvim_lsp_signature_help" },
{ name = "calc" },
{ name = "luasnip-choice" },
{ name = "treesitter" },
{ name = "cmdline" },
{ name = "cmdline-history" },
{ name = "zsh" },
{ name = "nvim_lsp_document_symbol" },
{ name = "nvim_lsp", keyword_length = 2 },
{ name = "luasnip" },
{ name = "buffer", keyword_length = 3 },
{ name = "buffer", keyword_length = 5 },
{ name = "path" },
}),
formatting = {
Expand Down Expand Up @@ -304,9 +328,10 @@ return {
},
},
},
{ "sQVe/sort.nvim",
{
"sQVe/sort.nvim",
config = function()
require("sort").setup()
require("sort").setup()
end,
},
},
}
Loading

0 comments on commit 987613d

Please sign in to comment.