added discord + formatting + rest api + more
This commit is contained in:
parent
fd1eb6128a
commit
f82cc2bc93
15 changed files with 189 additions and 70 deletions
|
|
@ -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