Created
May 23, 2022 09:32
-
-
Save danbruegge/090270895bb832a00cf30162f1049de5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require("packer_compiled") | |
require("packer").startup({ | |
function(use) | |
use("lewis6991/impatient.nvim") | |
-- package management | |
use("wbthomason/packer.nvim") | |
-- colorscheme | |
use("~/workspace/kraken") | |
-- LSP | |
use({ | |
"neovim/nvim-lspconfig", | |
"williamboman/nvim-lsp-installer", | |
"jose-elias-alvarez/typescript.nvim", | |
}) | |
-- formatting | |
use({ "jose-elias-alvarez/null-ls.nvim", requires = { "nvim-lua/plenary.nvim" } }) | |
-- completion | |
use({ | |
"hrsh7th/nvim-cmp", | |
"hrsh7th/cmp-nvim-lua", | |
"hrsh7th/cmp-nvim-lsp", | |
"hrsh7th/cmp-nvim-lsp-document-symbol", | |
"hrsh7th/cmp-buffer", | |
"hrsh7th/cmp-path", | |
"hrsh7th/cmp-cmdline", | |
"hrsh7th/cmp-nvim-lsp-signature-help", | |
"dcampos/nvim-snippy", | |
"dcampos/cmp-snippy", | |
"onsails/lspkind-nvim", | |
}) | |
-- treesitter | |
use({ "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" }) | |
use("nvim-treesitter/playground") | |
-- telescope | |
use({ | |
{ "nvim-telescope/telescope.nvim", requires = { "nvim-lua/plenary.nvim" } }, | |
{ "nvim-telescope/telescope-fzf-native.nvim", run = "make" }, | |
{ "AckslD/nvim-neoclip.lua", requires = { "tami5/sqlite.lua", module = "sqlite" } }, | |
}) | |
-- statusline | |
use({ | |
"nvim-lualine/lualine.nvim", | |
requires = { "kyazdani42/nvim-web-devicons", opt = true }, | |
}) | |
-- vim code | |
use("mhinz/vim-startify") | |
use("kevinhwang91/rnvimr") | |
use("tpope/vim-sleuth") | |
use("AaronLasseigne/yank-code") | |
-- other | |
use({ "lewis6991/gitsigns.nvim", requires = { "nvim-lua/plenary.nvim" } }) | |
use("windwp/nvim-autopairs") | |
use("windwp/nvim-ts-autotag") | |
use("blackCauldron7/surround.nvim") | |
use("numToStr/Comment.nvim") | |
use("norcalli/nvim-colorizer.lua") | |
use("lukas-reineke/indent-blankline.nvim") | |
use("ellisonleao/glow.nvim") | |
use({ | |
"bennypowers/nvim-regexplainer", | |
requires = { | |
"nvim-lua/plenary.nvim", | |
"MunifTanjim/nui.nvim", | |
}, | |
}) | |
-- use("lukas-reineke/headlines.nvim") | |
end, | |
config = { | |
compile_path = vim.fn.stdpath("config") .. "/lua/packer_compiled.lua", | |
display = { | |
open_fn = function() | |
return require("packer.util").float({ border = "single" }) | |
end, | |
}, | |
}, | |
}) | |
require("common") | |
require("mappings") | |
require("plugins.lsp") | |
require("plugins.formatting") | |
require("plugins.syntax") | |
require("plugins.completion") | |
require("plugins.telescope") | |
require("plugins.startify") | |
require("plugins.statusline") | |
require("plugins.git") | |
require("plugins.rnvimr") | |
require("plugins.indent") | |
require("nvim-autopairs").setup({ | |
fast_wrap = { | |
highlight = "IncSearch", | |
}, -- setup function and press <a-e> to use fast_wrap | |
check_ts = true, | |
map_c_h = true, | |
}) | |
require("nvim-ts-autotag").setup() | |
require("surround").setup({ mappings_style = "surround" }) | |
require("Comment").setup() | |
require("regexplainer").setup({ auto = true }) | |
-- require("headlines").setup() | |
-- load as last one for project specific settings | |
-- require("projects") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local servers = { | |
"bashls", | |
"cssls", | |
"cssmodules_ls", | |
"diagnosticls", | |
"graphql", | |
"html", | |
"ls_emmet", | |
"stylelint_lsp", | |
"sumneko_lua", | |
"tailwindcss", | |
"tsserver", | |
"vimls", | |
"zk", | |
} | |
require("plugins.lsp.customs") | |
require("nvim-lsp-installer").setup({ | |
ensure_installed = servers, | |
automatic_installation = true, | |
}) | |
local lspconfig = require("lspconfig") | |
local on_attach = require("plugins.lsp.settings") | |
-- Disable virtual text for diagnostics | |
vim.diagnostic.config({ | |
update_in_insert = true, | |
virtual_text = false, | |
}) | |
for _, server in ipairs(servers) do | |
if server == "sumneko_lua" then | |
lspconfig[server].setup({ | |
on_attach = function(client) | |
if vim.fn.has("nvim-0.8") == 1 then | |
client.server_capabilities.documentFormattingProvider = false | |
client.server_capabilities.documentRangeFormattingProvider = false | |
else | |
client.resolved_capabilities.document_formatting = false | |
client.resolved_capabilities.document_range_formatting = false | |
end | |
on_attach() | |
end, | |
}) | |
elseif server == "tsserver" then | |
require("typescript").setup({ | |
disable_formatting = true, | |
server = { | |
hostInfo = "neovim", | |
on_attach = on_attach, | |
}, | |
}) | |
else | |
if servers[server] ~= nil then | |
lspconfig[server].setup({ on_attach }) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment