Added neodev

This commit is contained in:
Nikurasu 2023-02-23 22:39:29 +01:00
parent f97605d15d
commit c9eab38d4d
No known key found for this signature in database

View file

@ -6,17 +6,22 @@ if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
vim.fn.system{'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path } vim.fn.system{'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path }
vim.cmd [[packadd packer.nvim]] vim.cmd [[packadd packer.nvim]]
end end
vim
-- Install Plugins -- Install Plugins
require('packer').startup(function(use) require('packer').startup(function(use)
use 'wbthomason/packer.nvim' use 'wbthomason/packer.nvim'
use 'neovim/nvim-lspconfig' use 'neovim/nvim-lspconfig'
use 'nvim-treesitter/nvim-treesitter' use 'nvim-treesitter/nvim-treesitter'
use 'folke/neodev.nvim'
use { "catppuccin/nvim", as = "catppuccin" } use { "catppuccin/nvim", as = "catppuccin" }
use { use {
'hrsh7th/nvim-cmp', 'hrsh7th/nvim-cmp',
requires = { 'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-buffer', 'hrsh7th/cmp-cmdline', 'hrsh7th/cmp-path', 'hrsh7th/cmp-nvim-lua', 'onsails/lspkind.nvim', 'L3MON4D3/LuaSnip', 'saadparwaiz1/cmp_luasnip' } requires = { 'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-buffer', 'hrsh7th/cmp-cmdline', 'hrsh7th/cmp-path', 'hrsh7th/cmp-nvim-lua', 'onsails/lspkind.nvim', 'L3MON4D3/LuaSnip', 'saadparwaiz1/cmp_luasnip' }
} }
use {
'j-morano/buffer_manager.nvim',
requires = { 'nvim-lua/plenary.nvim'}
}
if is_bootstrap then if is_bootstrap then
require('packer').sync() require('packer').sync()
end end
@ -32,8 +37,10 @@ if is_bootstrap then
return return
end end
-- colorscheme -- load plugins
local bufferManager = require('buffer_manager.ui')
-- colorscheme
require("catppuccin").setup({ require("catppuccin").setup({
flavour = "frappe", flavour = "frappe",
transparent_background = true, transparent_background = true,
@ -50,6 +57,12 @@ vim.o.pumheight = 20
vim.g.netrw_banner = 0 vim.g.netrw_banner = 0
vim.g.netrw_liststyle = 3 vim.g.netrw_liststyle = 3
-- leader
vim.g.mapleader = ' '
-- keybinds
vim.keymap.set('n', '<leader>bs', bufferManager.toggle_quick_menu, {})
vim.keymap.set('n', '<leader>ps', require('packer').sync, {})
-- Additional keybinds if lsp running -- Additional keybinds if lsp running
local on_attach = function(client, bufnr) local on_attach = function(client, bufnr)
@ -66,6 +79,10 @@ local capabilities = vim.lsp.protocol.make_client_capabilities()
-- capabilities.textDocument.completion.completionItem.snippetSupport = true -- capabilities.textDocument.completion.completionItem.snippetSupport = true
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
require("neodev").setup({
-- add any options here, or leave empty to use the default settings
})
-- lsp configs -- lsp configs
require('lspconfig')['tsserver'].setup{ require('lspconfig')['tsserver'].setup{
on_attach = on_attach, on_attach = on_attach,
@ -74,7 +91,15 @@ require('lspconfig')['tsserver'].setup{
require('lspconfig')['lua_ls'].setup{ require('lspconfig')['lua_ls'].setup{
on_attach = on_attach, on_attach = on_attach,
flags = lsp_flags flags = lsp_flags,
capabilities = capabilities,
settings = {
Lua = {
completion = {
callSnippet = "Replace"
}
}
}
} }
require('lspconfig')['gopls'].setup{ require('lspconfig')['gopls'].setup{
@ -88,6 +113,12 @@ require('lspconfig')['emmet_ls'].setup{
capabilities = capabilities capabilities = capabilities
} }
require'lspconfig'.cssls.setup{
on_attach = on_attach,
flags = lsp_flags,
capabilities = capabilities
}
require('lspconfig')['docker_compose_language_service'].setup{ require('lspconfig')['docker_compose_language_service'].setup{
on_attach = on_attach, on_attach = on_attach,
flags = lsp_flags, flags = lsp_flags,