Compare commits

..

No commits in common. "7e85124b10e776a77b3ce5520aa5f7038cc5461f" and "07de246f77191f8d39d87b6f4d9b9946ea9adec3" have entirely different histories.

3 changed files with 5 additions and 91 deletions

View File

@ -1,21 +0,0 @@
local null_ls_status_ok, null_ls = pcall(require, "null-ls")
if not null_ls_status_ok then
return
end
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting
local formatting = null_ls.builtins.formatting
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
local diagnostics = null_ls.builtins.diagnostics
null_ls.setup {
debug = false,
sources = {
formatting.prettier.with { extra_args = { "--no-semi", "--single-quote", "--jsx-single-quote" } },
formatting.black.with { extra_args = { "--fast" } },
diagnostics.flake8,
},
}
local map = vim.api.nvim_set_keymap
map('n', '<leader>f', '<cmd>lua vim.lsp.buf.formatting_sync()<cr>', {})

View File

@ -1,22 +1,6 @@
local lsp_installer = require("nvim-lsp-installer")
-- Register a handler that will be called for each installed server when it's ready (i.e. when installation is finished
-- or if the server is already installed).
lsp_installer.on_server_ready(function(server)
local opts = {}
-- (optional) Customize the options passed to the server
-- if server.name == "tsserver" then
-- opts.root_dir = function() ... end
-- end
-- This setup() function will take the provided server configuration and decorate it with the necessary properties
-- before passing it onwards to lspconfig.
-- Refer to https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
server:setup(opts)
end)
local nvim_lsp = require('lspconfig')
-- Use an on_attach function to only map the following keys
-- after the language server attaches to the current buffer
local on_attach = function(client, bufnr)

View File

@ -1,46 +1,7 @@
local fn = vim.fn
-- Only required if you have packer configured as `opt`
vim.cmd [[packadd packer.nvim]]
-- Automatically install packer
local install_path = fn.stdpath "data" .. "/site/pack/packer/start/packer.nvim"
if fn.empty(fn.glob(install_path)) > 0 then
PACKER_BOOTSTRAP = fn.system {
"git",
"clone",
"--depth",
"1",
"https://github.com/wbthomason/packer.nvim",
install_path,
}
print "Installing packer close and reopen Neovim..."
vim.cmd [[packadd packer.nvim]]
end
-- Autocommand that reloads neovim whenever you save the plugins.lua file
vim.cmd [[
augroup packer_user_config
autocmd!
autocmd BufWritePost plugins.lua source <afile> | PackerSync
augroup end
]]
-- Use a protected call so we don't error out on first use
local status_ok, packer = pcall(require, "packer")
if not status_ok then
return
end
-- Have packer use a popup window
packer.init {
display = {
open_fn = function()
return require("packer.util").float { border = "rounded" }
end,
},
}
return packer.startup(function(use)
-- Packer can manage itself
use 'wbthomason/packer.nvim'
return require('packer').startup(function()
use 'morhetz/gruvbox'
-- Status line
@ -58,8 +19,7 @@ return packer.startup(function(use)
use {
'neovim/nvim-lspconfig',
requires = {
"hrsh7th/cmp-nvim-lsp",
'williamboman/nvim-lsp-installer',
"hrsh7th/cmp-nvim-lsp"
}
}
use {
@ -78,12 +38,6 @@ return packer.startup(function(use)
use {'hrsh7th/cmp-nvim-lsp', after = 'nvim-cmp'}
-- use {'f3fora/cmp-spell', after = 'nvim-cmp'}
-- for formatters and linters
use {
"jose-elias-alvarez/null-ls.nvim",
config = [[require('config.null-ls')]]
}
use 'nvim-lua/popup.nvim'
use {
@ -126,7 +80,4 @@ return packer.startup(function(use)
config = [[require('config.colorizer')]],
}
if PACKER_BOOTSTRAP then
require("packer").sync()
end
end)