added discord + formatting + rest api + more
This commit is contained in:
parent
fd1eb6128a
commit
f82cc2bc93
15 changed files with 189 additions and 70 deletions
3
init.lua
3
init.lua
|
|
@ -1,2 +1,3 @@
|
|||
require("core.lazy")
|
||||
require("core.config.custom") -- Custom config
|
||||
require("core.config.custom")
|
||||
|
||||
|
|
|
|||
|
|
@ -1,28 +1,34 @@
|
|||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "33b06d72d220aa56a7ce80a0dd6f06c70cd82b9d" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||
"LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
|
||||
"cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"kanagawa.nvim": { "branch": "master", "commit": "ad3dddecd606746374ba4807324a08331dfca23c" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "014d1d6d78df4e58f962158e6e00261d8632612c" },
|
||||
"conform.nvim": { "branch": "master", "commit": "eebc724d12c5579d733d1f801386e0ceb909d001" },
|
||||
"cord.nvim": { "branch": "master", "commit": "caf33cd8e933a07b30dd4828c7409b173d1af272" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
||||
"kanagawa.nvim": { "branch": "master", "commit": "cc3b68b08e6a0cb6e6bf9944932940091e49bb83" },
|
||||
"kulala.nvim": { "branch": "main", "commit": "48e4995dccb6ab647ddc7ceeb0017cd25c2a8b98" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"lua-async-await": { "branch": "main", "commit": "652d94df34e97abe2d4a689edbc4270e7ead1a98" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "8e46de9241d3997927af12196bd8faa0ed08c29a" },
|
||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "ca4d3330d386e76967e53b85953c170658255ecb" },
|
||||
"nvim-dap": { "branch": "master", "commit": "580d6e526358afd0e4bba053e68fd59cf581a161" },
|
||||
"nvim-highlight-colors": { "branch": "main", "commit": "e967e2ba13fd4ca731b41d0e5cc1ac2edcd6e25e" },
|
||||
"nvim-java": { "branch": "main", "commit": "a36f50c82f922f352d4ce7ac6a3c6b238b3e0a36" },
|
||||
"nvim-java-core": { "branch": "main", "commit": "5b03dca22fee76524a89e1c2dc1d73a9f0b1a3bb" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
|
||||
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
|
||||
"nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "2a406cdd8c373ae7fe378a9e062a5424472bd8d8" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "059e89495b3ec09395262f16b1ad441a38081d04" },
|
||||
"nvim-dap": { "branch": "master", "commit": "7aade9e99bef5f0735cf966e715b3ce45515d786" },
|
||||
"nvim-highlight-colors": { "branch": "main", "commit": "982543ec460199de5bdc491745dc9faa6bcc19b6" },
|
||||
"nvim-java": { "branch": "main", "commit": "e552f06d86752edd77aedf50b9b49e59f6de1b65" },
|
||||
"nvim-java-core": { "branch": "main", "commit": "401bf7683012a25929a359deec418f36beb876e2" },
|
||||
"nvim-java-dap": { "branch": "main", "commit": "55f239532f7a3789d21ea68d1e795abc77484974" },
|
||||
"nvim-java-refactor": { "branch": "main", "commit": "ea1420fed5463c9cc976c2b4175f434b3646f0f7" },
|
||||
"nvim-java-refactor": { "branch": "main", "commit": "b51a57d862338999059e1d1717df3bc80a3a15c0" },
|
||||
"nvim-java-test": { "branch": "main", "commit": "7f0f40e9c5b7eab5096d8bec6ac04251c6e81468" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "fc16fd4f9c5d72b45db0f45ee275db3a9a30481a" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "375e38673b5c61debd8074ced01cfd4f3b7ce1e9" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "3b8dee4293567b0b9a87360842af14669f60dd13" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "87c34abe5d1dc7c1c0a95aaaf888059c614c68ac" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "4ea9083b6d3dff4ddc6da17c51334c3255b7eba5" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "6709463b2d18e77f7a946027917aa00d4aaed6f4" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "0e21ee8df6235511c02bab4a5b391d18e165a58d" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "c90dee4e930ab9f49fa6d77f289bff335b49e972" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||
"spring-boot.nvim": { "branch": "main", "commit": "218c0c26c14d99feca778e4d13f5ec3e8b1b60f0" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||
"typescript-language-server": { "branch": "master", "commit": "184c60de3308621380469d6632bdff2e10f672fd" }
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
-- neovim/vim options
|
||||
local opt = vim.opt
|
||||
|
||||
opt.guicursor = "" -- For indentation
|
||||
|
|
@ -17,7 +18,11 @@ opt.termguicolors = true
|
|||
|
||||
vim.g.rust_recommended_style = 0
|
||||
|
||||
local setkb = vim.keymap.set
|
||||
|
||||
-- For WSL
|
||||
--setkb('n', '<M-v>', '<C-v>')
|
||||
-- Keybinds
|
||||
local keybind = vim.keymap.set
|
||||
keybind('n', "<leader>hh", '<cmd>lua vim.diagnostic.setqflist()<CR>')
|
||||
keybind('v', "<leader>ii", '\"+y')
|
||||
keybind('n', "<leader>bb", '<cmd>bprevious<CR>')
|
||||
keybind('n', "<leader>nn", '<cmd>bnext<CR>')
|
||||
keybind('n', "<leader>,,", '<cmd>bdel<CR>')
|
||||
keybind('i', "jk", '<Esc>') -- For justin
|
||||
|
|
|
|||
|
|
@ -5,10 +5,12 @@ return {
|
|||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
{ "L3MON4D3/LuaSnip",
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
build = "make install_jsregexp"
|
||||
},
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"saadparwaiz1/cmp_luasnip", -- luasnip autocompletion
|
||||
"hrsh7th/cmp-path" -- Path finder
|
||||
},
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
|
|
@ -28,7 +30,8 @@ return {
|
|||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' }
|
||||
{ name = 'luasnip' },
|
||||
{ name= 'path' }
|
||||
}),
|
||||
formatting = {
|
||||
format = require("nvim-highlight-colors").format
|
||||
|
|
|
|||
6
lua/core/plugins/autotag.lua
Normal file
6
lua/core/plugins/autotag.lua
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
return {
|
||||
"windwp/nvim-ts-autotag",
|
||||
config = function ()
|
||||
require("nvim-ts-autotag").setup({})
|
||||
end
|
||||
}
|
||||
|
|
@ -1,11 +1,9 @@
|
|||
return {
|
||||
{
|
||||
"rebelot/kanagawa.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
-- loads colorscheme
|
||||
vim.cmd([[colorscheme kanagawa-dragon]])
|
||||
end,
|
||||
},
|
||||
"rebelot/kanagawa.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
-- loads colorscheme
|
||||
vim.cmd([[colorscheme kanagawa-dragon]])
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
8
lua/core/plugins/comments.lua
Normal file
8
lua/core/plugins/comments.lua
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
return {
|
||||
"folke/todo-comments.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
config = function ()
|
||||
-- Initializes todo setup
|
||||
require("todo-comments").setup()
|
||||
end
|
||||
}
|
||||
14
lua/core/plugins/discord.lua
Normal file
14
lua/core/plugins/discord.lua
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
return {
|
||||
'vyfor/cord.nvim',
|
||||
build = ':Cord update',
|
||||
config = function()
|
||||
require('cord').setup {
|
||||
display = {
|
||||
flavor = "dark"
|
||||
},
|
||||
text = {
|
||||
workspace = ''
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
26
lua/core/plugins/formatter.lua
Normal file
26
lua/core/plugins/formatter.lua
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
-- Using formatter.nvim: https://github.com/mhartington/formatter.nvim
|
||||
return {
|
||||
"stevearc/conform.nvim",
|
||||
event = { "BufWritePre" },
|
||||
cmd = { "ConformInfo" },
|
||||
|
||||
-- This will provide type hinting with LuaLS
|
||||
---@module "conform"
|
||||
---@type conform.setupOpts
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
python = { "black" },
|
||||
javascript = { "prettier" } -- add stop_after_first if you want more than 1
|
||||
},
|
||||
-- Set default options
|
||||
default_format_opts = {
|
||||
lsp_format = "fallback"
|
||||
},
|
||||
format_on_save = { timeout_ms = 500 },
|
||||
},
|
||||
init = function ()
|
||||
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
|
||||
end
|
||||
}
|
||||
|
||||
7
lua/core/plugins/indent.lua
Normal file
7
lua/core/plugins/indent.lua
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
return {
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
main = "ibl",
|
||||
---@module "ibl"
|
||||
---@type ibl.config
|
||||
opts = {},
|
||||
}
|
||||
|
|
@ -16,7 +16,8 @@ return {
|
|||
|
||||
-- https://github.com/williamboman/mason.nvim?tab=readme-ov-file#configuration for more information
|
||||
-- https://github.com/williamboman/mason-lspconfig.nvim?tab=readme-ov-file#setup for more info
|
||||
{ "williamboman/mason.nvim",
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
dependencies = {
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
"neovim/nvim-lspconfig", -- https://github.com/neovim/nvim-lspconfig for more information
|
||||
|
|
@ -30,6 +31,7 @@ return {
|
|||
})
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = {
|
||||
-- Language Servers
|
||||
"lua_ls",
|
||||
"pylsp",
|
||||
"clangd",
|
||||
|
|
@ -38,15 +40,20 @@ return {
|
|||
"eslint",
|
||||
"cssls",
|
||||
"html",
|
||||
"tailwindcss",
|
||||
-- Formatters
|
||||
"prettier",
|
||||
"stylua",
|
||||
"black"
|
||||
}
|
||||
})
|
||||
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
local lspconfig = require("lspconfig")
|
||||
local config = require("lspconfig")
|
||||
|
||||
-- LSP Servers
|
||||
|
||||
lspconfig.lua_ls.setup {
|
||||
config.lua_ls.setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
|
||||
|
|
@ -54,13 +61,15 @@ return {
|
|||
-- Make sure to install 'shellcheck', :MasonInstall shellcheck
|
||||
-- Make sure to install 'shfmt', :MasonInstall shfmt
|
||||
|
||||
lspconfig.bashls.setup {
|
||||
config.bashls.setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
|
||||
lspconfig.pylsp.setup {}
|
||||
config.pylsp.setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
|
||||
lspconfig.clangd.setup{
|
||||
config.clangd.setup {
|
||||
cmd = { "clangd", "--background-index", "--clang-tidy", "--log=verbose", "--query-driver=/usr/bin/c++", "--suggest-missing-includes", "--all-scopes-completion", "--completion-style=detailed" },
|
||||
init_options = {
|
||||
fallback_flags = { "-std=c++17" },
|
||||
|
|
@ -68,33 +77,39 @@ return {
|
|||
capabilities = capabilities
|
||||
}
|
||||
|
||||
lspconfig.ts_ls.setup {
|
||||
config.ts_ls.setup {
|
||||
capabilities = capabilities,
|
||||
init_options = {
|
||||
preferences = {
|
||||
disableSuggestions = true
|
||||
init_options = { preferences = { disableSuggestions = false } },
|
||||
}
|
||||
|
||||
config.eslint.setup {
|
||||
capabilities = capabilities,
|
||||
settings = { autoFixOnSave = true }
|
||||
}
|
||||
|
||||
config.html.setup {
|
||||
capabilities = capabilities,
|
||||
}
|
||||
|
||||
config.cssls.setup {
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
css = {
|
||||
lint = {
|
||||
unknownAtRules = "ignore"
|
||||
}
|
||||
},
|
||||
scss = {
|
||||
lint = {
|
||||
unknownAtRules = "ignore"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lspconfig.eslint.setup {
|
||||
capabilities = capabilities
|
||||
config.tailwindcss.setup { }
|
||||
|
||||
}
|
||||
|
||||
lspconfig.html.setup {
|
||||
capabilities = capabilities,
|
||||
}
|
||||
|
||||
|
||||
lspconfig.cssls.setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
end
|
||||
},
|
||||
|
||||
-- Javascript and/or Typescript
|
||||
{
|
||||
"typescript-language-server/typescript-language-server"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
-- https://github.com/nvim-tree/nvim-tree.lua?tab=readme-ov-file -- For more information
|
||||
-- https://github.com/nvim-tree/nvim-tree.lua?tab=readme-ov-file For more information
|
||||
-- File Explorer
|
||||
return {
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
version = "*",
|
||||
|
|
@ -9,4 +10,5 @@ return {
|
|||
config = function()
|
||||
require("nvim-tree").setup {}
|
||||
end,
|
||||
keys = { { "<leader>mm", "<cmd>NvimTreeToggle<cr>", desc = "Toggle Tree"} }
|
||||
}
|
||||
|
|
|
|||
8
lua/core/plugins/rest.lua
Normal file
8
lua/core/plugins/rest.lua
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
return {
|
||||
'mistweaverco/kulala.nvim',
|
||||
opts = {},
|
||||
keys = {
|
||||
{ "<leader>uu", "<cmd>lua require('kulala').run()<cr>", desc = "run current" },
|
||||
{ "<leader>yy", "<cmd>lua require('kulala').toggle_view()<cr>", desc = "run current" },
|
||||
}
|
||||
}
|
||||
|
|
@ -9,6 +9,6 @@ return {
|
|||
{ "<leader>pp", "<cmd>Telescope find_files<cr>", desc = "File Picker" },
|
||||
{ "<leader>;;", "<cmd>Telescope buffers<cr>", desc = "Buffer Picker" },
|
||||
{ "<leader>..", "<cmd>Telescope treesitter<cr>", desc = "Treesitter" },
|
||||
{ "<leader>[[", "<cmd>Telescop live_grep<cr>", desc = "Grep" }
|
||||
{ "<leader>[[", "<cmd>Telescope live_grep<cr>", desc = "Grep" },
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
-- https://github.com/nvim-treesitter/nvim-treesitter?tab=readme-ov-file#language-parsers for language parsers
|
||||
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
|
|
@ -6,7 +7,29 @@ return {
|
|||
config = function()
|
||||
local configs = require("nvim-treesitter.configs")
|
||||
configs.setup({
|
||||
ensure_installed = { "lua", "cpp", "java", "javascript", "bash", "python", "typescript", "css", "html", "jsdoc" },
|
||||
ensure_installed = {
|
||||
"lua",
|
||||
"cpp",
|
||||
"java",
|
||||
"javascript",
|
||||
"bash",
|
||||
"python",
|
||||
"typescript",
|
||||
"css",
|
||||
"html",
|
||||
"jsdoc",
|
||||
"http",
|
||||
"sql",
|
||||
"ssh_config",
|
||||
"json",
|
||||
"tsx",
|
||||
"xml",
|
||||
"yaml",
|
||||
"nginx",
|
||||
"gitcommit",
|
||||
"gitignore",
|
||||
"cmake"
|
||||
},
|
||||
sync_install = true,
|
||||
auto_intsall = true,
|
||||
highlight = {
|
||||
|
|
@ -18,10 +41,7 @@ return {
|
|||
enable = true
|
||||
}
|
||||
})
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>mm", "<cmd>NvimTreeToggle<cr>", desc = "Toggle Tree"}
|
||||
}
|
||||
end
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue