First c ommit ever

This commit is contained in:
LinlyBoi
2022-11-25 10:36:46 +02:00
commit 08cdff2f3f
214 changed files with 10989 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
return {
["folke/trouble.nvim"] = {
config = function()
require("trouble").setup{}
end,
},
["andweeb/presence.nvim"] = {},
["neovim/nvim-lspconfig"] = {
config = function()
require "plugins.configs.lspconfig"
require "custom.plugins.lspconfig"
end,
},
["tpope/vim-fugitive"] = {},
["jose-elias-alvarez/null-ls.nvim"] = {
after = "nvim-lspconfig",
config = function()
require "custom.plugins.null-ls"
end,
},
["simrat39/rust-tools.nvim"]= {}
}

View File

@@ -0,0 +1,52 @@
-- custom.plugins.lspconfig
local on_attach = require("plugins.configs.lspconfig").on_attach
local capabilities = require("plugins.configs.lspconfig").capabilities
local lspconfig = require "lspconfig"
local servers = { "html", "cssls", "clangd","tsserver","angularls","rust_analyzer","rustfmt",}
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
on_attach = on_attach,
capabilities = capabilities,
}
end
local lsp_flags = {
-- This is the default in Nvim 0.7+
debounce_text_changes = 150,
}
require('lspconfig')['pyright'].setup{
on_attach = on_attach,
flags = lsp_flags,
}
require('lspconfig')['tsserver'].setup{
on_attach = on_attach,
flags = lsp_flags,
}
-- require('lspconfig')['rust_analyzer'].setup{
-- on_attach = on_attach,
-- flags = lsp_flags,
-- settings = {
-- ["rust-analyzer"] = {
-- imports = {
-- granularity = {
-- group = "module",
-- },
-- prefix = "self",
-- },
-- cargo = {
-- buildScripts = {
-- enable = true,
-- },
-- },
-- procMacro = {
-- enable = true
-- },
-- }
-- }
-- }
require('lspconfig')['rustfmt'].setup{
on_attach = on_attach,
flags = lsp_flags,
}

View File

@@ -0,0 +1,26 @@
local present, null_ls = pcall(require, "null-ls")
if not present then
return
end
local b = null_ls.builtins
local sources = {
-- webdev stuff
b.formatting.deno_fmt,
b.formatting.prettier,
-- Lua
b.formatting.stylua,
-- Shell
b.formatting.shfmt,
b.diagnostics.shellcheck.with { diagnostics_format = "#{m} [#{c}]" },
}
null_ls.setup {
debug = true,
sources = sources,
}