Ditch lsp-zero for own impl

This commit is contained in:
Lucas Barbieri 2023-02-28 13:46:12 -03:00
parent 4ffcd00eb9
commit ed0b4163c2
22 changed files with 4393 additions and 254 deletions

View File

@ -1,4 +1,11 @@
local status, autotag = pcall(require, 'nvim-ts-autotag') local status, autotag = pcall(require, "nvim-ts-autotag")
if (not status) then return end if (not status) then return end
autotag.setup() autotag.setup({})
local status, autopairs = pcall(require, "nvim-autopairs")
if (not status) then return end
autopairs.setup({
disable_filetype = { "TelescopePrompt" , "vim" },
})

View File

@ -1,94 +1,98 @@
-- Set barbar's options -- Set barbar's options
require'bufferline'.setup { require'bufferline'.setup()
-- Enable/disable animations -- -- Enable/disable animations
animation = true, -- animation = true,
--
-- Enable/disable auto-hiding the tab bar when there is a single buffer -- -- Enable/disable auto-hiding the tab bar when there is a single buffer
auto_hide = false, -- auto_hide = false,
--
-- Enable/disable current/total tabpages indicator (top right corner) -- -- Enable/disable current/total tabpages indicator (top right corner)
tabpages = true, -- tabpages = true,
--
-- Enable/disable close button -- -- Enable/disable close button
closable = true, -- closable = true,
--
-- Enables/disable clickable tabs -- -- Enables/disable clickable tabs
-- - left-click: go to buffer -- -- - left-click: go to buffer
-- - middle-click: delete buffer -- -- - middle-click: delete buffer
clickable = true, -- clickable = true,
--
-- Enables / disables diagnostic symbols -- -- Enables / disables diagnostic symbols
diagnostics = { -- diagnostics = {
-- you can use a list -- -- you can use a list
{enabled = true, icon = ''}, -- ERROR -- {enabled = true, icon = 'ff'}, -- ERROR
{enabled = false}, -- WARN -- {enabled = false}, -- WARN
{enabled = false}, -- INFO -- {enabled = false}, -- INFO
{enabled = true}, -- HINT -- {enabled = true}, -- HINT
--
-- OR `vim.diagnostic.severity` -- -- OR `vim.diagnostic.severity`
[vim.diagnostic.severity.ERROR] = {enabled = true, icon = ''}, -- [vim.diagnostic.severity.ERROR] = {enabled = true, icon = 'ff'},
[vim.diagnostic.severity.WARN] = {enabled = false}, -- [vim.diagnostic.severity.WARN] = {enabled = false},
[vim.diagnostic.severity.INFO] = {enabled = false}, -- [vim.diagnostic.severity.INFO] = {enabled = false},
[vim.diagnostic.severity.HINT] = {enabled = true}, -- [vim.diagnostic.severity.HINT] = {enabled = true},
}, -- },
--
-- Excludes buffers from the tabline -- -- Excludes buffers from the tabline
exclude_ft = {'javascript'}, -- exclude_ft = {'javascript'},
exclude_name = {'package.json'}, -- exclude_name = {'package.json'},
--
-- Hide inactive buffers and file extensions. Other options are `alternate`, `current`, and `visible`. -- -- Hide inactive buffers and file extensions. Other options are `alternate`, `current`, and `visible`.
-- hide = {extensions = true, inactive = true}, -- hide = {extensions = true, inactive = true},
--
-- Disable highlighting alternate buffers -- -- Disable highlighting alternate buffers
highlight_alternate = false, -- highlight_alternate = false,
--
-- Enable highlighting visible buffers -- -- Disable highlighting file icons in inactive buffers
highlight_visible = true, -- highlight_inactive_file_icons = false,
--
-- Enable/disable icons -- -- Enable highlighting visible buffers
-- if set to 'numbers', will show buffer index in the tabline -- highlight_visible = true,
-- if set to 'both', will show buffer index and icons in the tabline --
icons = false, -- -- Enable/disable icons
-- -- if set to 'numbers', will show buffer index in the tabline
-- If set, the icon color will follow its corresponding buffer -- -- if set to 'both', will show buffer index and icons in the tabline
-- highlight group. By default, the Buffer*Icon group is linked to the -- icons = true,
-- Buffer* group (see Highlighting below). Otherwise, it will take its --
-- default value as defined by devicons. -- -- If set, the icon color will follow its corresponding buffer
icon_custom_colors = false, -- -- highlight group. By default, the Buffer*Icon group is linked to the
-- -- Buffer* group (see Highlighting below). Otherwise, it will take its
-- Configure icons on the bufferline. -- -- default value as defined by devicons.
icon_separator_active = '', -- icon_custom_colors = false,
icon_separator_inactive = '', --
icon_close_tab = '', -- -- Configure icons on the bufferline.
icon_close_tab_modified = '', -- icon_separator_active = '▎',
icon_pinned = '', -- icon_separator_inactive = '▎',
-- icon_close_tab = '',
-- If true, new buffers will be inserted at the start/end of the list. -- icon_close_tab_modified = '●',
-- Default is to insert after current buffer. -- icon_pinned = '車',
insert_at_end = false, --
insert_at_start = false, -- -- If true, new buffers will be inserted at the start/end of the list.
-- -- Default is to insert after current buffer.
-- Sets the maximum padding width with which to surround each tab -- insert_at_end = false,
maximum_padding = 1, -- insert_at_start = false,
--
-- Sets the minimum padding width with which to surround each tab -- -- Sets the maximum padding width with which to surround each tab
minimum_padding = 1, -- maximum_padding = 1,
--
-- Sets the maximum buffer name length. -- -- Sets the minimum padding width with which to surround each tab
maximum_length = 30, -- minimum_padding = 1,
--
-- If set, the letters for each buffer in buffer-pick mode will be -- -- Sets the maximum buffer name length.
-- assigned based on their name. Otherwise or in case all letters are -- maximum_length = 30,
-- already assigned, the behavior is to assign letters in order of --
-- usability (see order below) -- -- If set, the letters for each buffer in buffer-pick mode will be
semantic_letters = true, -- -- assigned based on their name. Otherwise or in case all letters are
-- -- already assigned, the behavior is to assign letters in order of
-- New buffer letters are assigned in this order. This order is -- -- usability (see order below)
-- optimal for the qwerty keyboard layout but might need adjustement -- semantic_letters = true,
-- for other layouts. --
letters = 'asdfjkl;ghnmxcvbziowerutyqpASDFJKLGHNMXCVBZIOWERUTYQP', -- -- New buffer letters are assigned in this order. This order is
-- -- optimal for the qwerty keyboard layout but might need adjustement
-- Sets the name of unnamed buffers. By default format is "[Buffer X]" -- -- for other layouts.
-- where X is the buffer number. But only a static string is accepted here. -- letters = 'asdfjkl;ghnmxcvbziowerutyqpASDFJKLGHNMXCVBZIOWERUTYQP',
no_name_title = nil, --
} -- -- Sets the name of unnamed buffers. By default format is "[Buffer X]"
-- -- where X is the buffer number. But only a static string is accepted here.
-- no_name_title = nil,
-- }
--

View File

@ -0,0 +1,47 @@
local status, cmp = pcall(require, "cmp")
if not status then
return
end
local lspkind = require("lspkind")
local cmp_select = { behavior = cmp.SelectBehavior.Select }
cmp.setup({
snippet = {
expand = function(args)
require("luasnip").lsp_expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert({
["<C-k>"] = cmp.mapping.scroll_docs(-4),
["<C-j>"] = cmp.mapping.scroll_docs(4),
["<C-p>"] = cmp.mapping.select_prev_item(cmp_select),
["<C-n>"] = cmp.mapping.select_next_item(cmp_select),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.close(),
["<CR>"] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Replace,
select = true,
}),
}),
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = "buffer" },
{ name = 'luasnip'},
{ name = 'path'}
}),
formatting = {
format = lspkind.cmp_format({ with_text = false, maxwidth = 40 }),
},
})
vim.api.nvim_set_keymap('i', '<Tab>', 'luasnip#expand_or_jumpable() ? "<Plug>luasnip-expand-or-jump" : "<Tab>"', {expr=true, silent=true})
vim.api.nvim_set_keymap('i', '<S-Tab>', '<cmd>lua require("luasnip").jump(-1)<CR>', {silent=true})
vim.api.nvim_set_keymap('s', '<Tab>', '<cmd>lua require("luasnip").jump(1)<CR>', {silent=true})
vim.api.nvim_set_keymap('s', '<S-Tab>', '<cmd>lua require("luasnip").jump(-1)<CR>', {silent=true})
vim.api.nvim_set_keymap('i', '<C-F>', 'luasnip#choice_active() ? "<Plug>luasnip-next-choice" : "<C-E>"', {expr=true, silent=true})
vim.api.nvim_set_keymap('s', '<C-F>', 'luasnip#choice_active() ? "<Plug>luasnip-next-choice" : "<C-E>"', {expr=true, silent=true})
vim.cmd([[
set completeopt=menuone,noinsert,noselect
highlight! default link CmpItemKind CmpItemMenuDefault
]])

View File

@ -1,4 +1,6 @@
local status, colorizer = pcall(require, 'colorizer') local status, colorizer = pcall(require, "colorizer")
if (not status) then return end if not status then
return
end
colorizer.setup() colorizer.setup()

View File

@ -0,0 +1,12 @@
local status_ok, live_server = pcall(require, "live_server")
if not status_ok then
return
end
live_server.setup({
port = 8800,
browser_command = "", -- Empty string starts up with default browser
quiet = true,
no_css_inject = false, -- Disables css injection if true, might be useful when testing out tailwindcss
install_path = vim.fn.stdpath "config" .. "/live-server/",
})

View File

@ -0,0 +1,11 @@
local status, colors = pcall(require, "lsp-colors")
if not status then
return "status"
end
colors.setup({
Error = "#db4b4b",
Warning = "#e0af68",
Information = "#0db9d7",
Hint = "#10B981",
})

View File

@ -0,0 +1,47 @@
local status, lspkind = pcall(require, "lspkind")
if (not status) then return end
lspkind.init({
-- enables text annotations
--
-- default: true
mode = 'symbol',
-- default symbol map
-- can be either 'default' (requires nerd-fonts font) or
-- 'codicons' for codicon preset (requires vscode-codicons font)
--
-- default: 'default'
preset = 'codicons',
-- override preset symbols
--
-- default: {}
symbol_map = {
Text = "",
Method = "",
Function = "",
Constructor = "",
Field = "",
Variable = "",
Class = "",
Interface = "",
Module = "",
Property = "",
Unit = "",
Value = "",
Enum = "",
Keyword = "",
Snippet = "",
Color = "",
File = "",
Reference = "",
Folder = "",
EnumMember = "",
Constant = "",
Struct = "",
Event = "",
Operator = "",
TypeParameter = ""
},
})

View File

@ -0,0 +1,39 @@
local status, saga = pcall(require, "lspsaga")
if not status then
return
end
saga.setup({
ui = {
-- This option only works in Neovim 0.9
title = true,
-- Border type can be single, double, rounded, solid, shadow.
border = "rounded",
winblend = 0,
expand = "",
collapse = "",
code_action = "💡",
incoming = "",
outgoing = "",
hover = "",
kind = {},
},
})
local opts = { noremap = true, silent = true }
vim.keymap.set("n", "<C-z>", "<Cmd>Lspsaga diagnostic_jump_next<CR>", opts)
vim.keymap.set("n", "K", "<Cmd>Lspsaga hover_doc<CR>", opts)
-- vim.keymap.set('n', 'gd', '<Cmd>Lspsaga lsp_finder<CR>', opts)
vim.keymap.set("i", "<C-x>", "<Cmd>Lspsaga signature_help<CR>", opts)
vim.keymap.set("n", "gp", "<Cmd>Lspsaga preview_definition<CR>", opts)
vim.keymap.set("n", "gr", "<Cmd>Lspsaga rename<CR>", opts)
-- code action
local codeaction = require("lspsaga.codeaction")
vim.keymap.set("n", "<leader>ca", function()
codeaction:code_action()
end, { silent = true })
vim.keymap.set("v", "<leader>ca", function()
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<C-U>", true, false, true))
codeaction:range_code_action()
end, { silent = true })

View File

@ -0,0 +1,43 @@
local status, lualine = pcall(require, "lualine")
if (not status) then return end
lualine.setup {
options = {
icons_enabled = true,
theme = 'solarized_dark',
section_separators = { left = '', right = '' },
component_separators = { left = '', right = '' },
disabled_filetypes = {}
},
sections = {
lualine_a = { 'mode' },
lualine_b = { 'branch' },
lualine_c = { {
'filename',
file_status = true, -- displays file status (readonly status, modified status)
path = 0 -- 0 = just filename, 1 = relative path, 2 = absolute path
} },
lualine_x = {
{ 'diagnostics', sources = { "nvim_diagnostic" }, symbols = { error = '', warn = '', info = '',
hint = '' } },
'encoding',
'filetype'
},
lualine_y = { 'progress' },
lualine_z = { 'location' }
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = { {
'filename',
file_status = true, -- displays file status (readonly status, modified status)
path = 1 -- 0 = just filename, 1 = relative path, 2 = absolute path
} },
lualine_x = { 'location' },
lualine_y = {},
lualine_z = {}
},
tabline = {},
extensions = { 'fugitive' }
}

View File

@ -0,0 +1,58 @@
require("mason").setup()
require("mason-lspconfig").setup({
ensure_installed = { "lua_ls", "rust_analyzer", "pyright", "cssls", "hls", "html", "tsserver" },
})
local status, nvim_lsp = pcall(require, "lspconfig")
if not status then
return
end
require("mason").setup()
require("mason-lspconfig").setup({
ensure_installed = {
"rust_analyzer",
"tsserver",
"html",
"pyright"
},
})
local lsp_capabilities = require("cmp_nvim_lsp").default_capabilities()
local lsp_attach = function(client, bufnr)
local opts = { buffer = bufnr, remap = false }
-- Create your keybindings here...
if client.name == "eslint" then
vim.cmd.LspStop("eslint")
return
end
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
vim.keymap.set("n", "<leader>vws", vim.lsp.buf.workspace_symbol, opts)
vim.keymap.set("n", "<leader>vd", vim.diagnostic.open_float, opts)
vim.keymap.set("n", "[d", vim.diagnostic.goto_next, opts)
vim.keymap.set("n", "]d", vim.diagnostic.goto_prev, opts)
vim.keymap.set("n", "<leader>vca", vim.lsp.buf.code_action, opts)
vim.keymap.set("n", "<leader>vrr", vim.lsp.buf.references, opts)
vim.keymap.set("n", "<leader>vrn", vim.lsp.buf.rename, opts)
vim.keymap.set("i", "<C-h>", vim.lsp.buf.signature_help, opts)
end
require("luasnip.loaders.from_vscode").lazy_load()
local lspconfig = require("lspconfig")
require("mason-lspconfig").setup_handlers({
function(server_name)
lspconfig[server_name].setup({
snippet = {
expand = function(args)
require("luasnip").lsp_expand(args.body)
end,
},
on_attach = lsp_attach,
capabilities = lsp_capabilities,
})
end,
})

View File

@ -3,6 +3,7 @@ if (not status) then return end
n.setup({ n.setup({
comment_italics = true, comment_italics = true,
-- background_set = true
}) })
local cb = require('colorbuddy.init') local cb = require('colorbuddy.init')
@ -30,3 +31,23 @@ Group.new("DiagnosticUnderlineError", colors.none, colors.none, styles.undercurl
Group.new("DiagnosticUnderlineWarn", colors.none, colors.none, styles.undercurl, cWarn) Group.new("DiagnosticUnderlineWarn", colors.none, colors.none, styles.undercurl, cWarn)
Group.new("DiagnosticUnderlineInfo", colors.none, colors.none, styles.undercurl, cInfo) Group.new("DiagnosticUnderlineInfo", colors.none, colors.none, styles.undercurl, cInfo)
Group.new("DiagnosticUnderlineHint", colors.none, colors.none, styles.undercurl, cHint) Group.new("DiagnosticUnderlineHint", colors.none, colors.none, styles.undercurl, cHint)
Group.new("Macro", groups.PreProc, colors.none, styles.italic + styles.bold)
Group.new("Function", groups.Function, colors.none, styles.italic)
Group.new("Conditional", groups.Statement, colors.none, styles.italic)
Group.new("Boolean", groups.Constant, colors.none, styles.bold)
--
-- local success, solarized = pcall(require, 'solarized')
--
-- if not success then
-- return
-- end
--
-- local default_config = {
-- mode = 'dark', -- dark(default)/light
-- theme = 'vim', -- vim(default)/neovim/vscode
-- transparent = true, -- false(default)/true
-- }
--
-- solarized.setup(default_config)
--
-- vim.cmd 'colorscheme solarized'

View File

@ -0,0 +1,25 @@
local status, null_ls = pcall(require, "null-ls")
if not status then
return
end
require("mason-null-ls").setup({
automatic_setup = true,
ensure_installed = { "rust", "javascript", "typescript", "html", "css", "python", "ruby" },
})
require("mason-null-ls").setup_handlers({
function(source_name, methods)
-- all sources with no handler get passed here
-- To keep the original functionality of `automatic_setup = true`,
-- please add the below.
require("mason-null-ls.automatic_setup")(source_name, methods)
end,
stylua = function(source_name, methods)
null_ls.register(null_ls.builtins.formatting.stylua)
end,
})
-- will setup any installed and configured sources above
null_ls.setup()

View File

@ -1,7 +1,79 @@
local builtin = require('telescope.builtin') local status, telescope = pcall(require, "telescope")
vim.keymap.set('n', '<leader>pf', builtin.find_files, {}) if not status then
vim.keymap.set('n', '<C-p>', builtin.git_files, {}) return
vim.keymap.set('n', '<leader>ps', function() end
builtin.grep_string({ search = vim.fn.input("Grep > ") }); local actions = require("telescope.actions")
local builtin = require("telescope.builtin")
local function telescope_buffer_dir()
return vim.fn.expand("%:p:h")
end
local fb_actions = require("telescope").extensions.file_browser.actions
telescope.setup({
defaults = {
mappings = {
n = {
["q"] = actions.close,
},
},
},
extensions = {
file_browser = {
theme = "dropdown",
-- disables netrw and use telescope-file-browser in its place
hijack_netrw = true,
mappings = {
-- your custom insert mode mappings
["i"] = {
["<C-w>"] = function()
vim.cmd("normal vbd")
end,
},
["n"] = {
-- your custom normal mode mappings
["N"] = fb_actions.create,
["R"] = fb_actions.rename,
["h"] = fb_actions.goto_parent_dir,
["/"] = function()
vim.cmd("startinsert")
end,
},
},
},
},
})
telescope.load_extension("file_browser")
vim.keymap.set("n", "sf", function()
telescope.extensions.file_browser.file_browser({
path = "%:p:h",
cwd = telescope_buffer_dir(),
respect_gitignore = false,
hidden = true,
grouped = true,
previewer = false,
initial_mode = "normal",
layout_config = { height = 40 },
})
end)
vim.keymap.set("n", "<leader>pf", builtin.find_files, {})
vim.keymap.set("n", "<C-p>", builtin.git_files, {})
vim.keymap.set("n", "<leader>ps", function()
builtin.grep_string({ search = vim.fn.input("Grep > ") })
end)
vim.keymap.set("n", "<leader>pz", builtin.live_grep, {})
vim.keymap.set("n", "\\\\", function()
builtin.buffers()
end)
vim.keymap.set("n", ";t", function()
builtin.help_tags()
end)
vim.keymap.set("n", ";;", function()
builtin.resume()
end)
vim.keymap.set("n", ";e", function()
builtin.diagnostics()
end) end)
vim.keymap.set('n', '<leader>pz', builtin.live_grep, {})

View File

@ -0,0 +1,8 @@
require("transparent").setup({
enable = true, -- boolean: enable transparent
extra_groups = { -- table/string: additional groups that should be cleared
"all",
},
exclude = {}, -- table: groups you don't want to clear
ignore_linked_group = true, -- boolean: don't clear a group that links to another group
})

View File

@ -46,3 +46,6 @@ require 'nvim-treesitter.configs'.setup {
}, },
}, },
} }
local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
parser_config.tsx.filetype_to_parsername = { "javascript", "typescript.tsx" }

View File

@ -0,0 +1,8 @@
local status, zenMode = pcall(require, "zen-mode")
if not status then
return
end
zenMode.setup({})
vim.keymap.set("n", "<leader>z", "<cmd>ZenMode<cr>", { silent = true })

View File

@ -1 +1,15 @@
require("jabuxas") require("jabuxas")
if vim.g.neovide then
vim.o.guifont = "Cartograph CF Demi Bold:h13"
vim.g.neovide_transparency = 0.95
vim.g.neovide_floating_blur_amount_x = 2.0
vim.g.neovide_floating_blur_amount_y = 2.0
vim.g.neovide_refresh_rate = 60
-- vim.g.neovide_background_color = "#292522"
-- vim.cmd("hi Normal guibg=#78997a")
end
vim.g.solarized_italic_comments = true
vim.g.solarized_italic_keywords = false
vim.g.solarized_italic_functions = true
vim.g.solarized_italic_variables = false

3767
configs/nvim/live-server/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
{
"dependencies": {
"live-server": "^1.2.2"
}
}

View File

@ -1,142 +1,83 @@
local ensure_packer = function() return require("packer").startup(function(use)
local fn = vim.fn
local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
fn.system({ 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path })
vim.cmd [[packadd packer.nvim]]
return true
end
return false
end
local packer_bootstrap = ensure_packer()
return require('packer').startup(function(use)
-- Packer can manage itself -- Packer can manage itself
use 'wbthomason/packer.nvim' use("wbthomason/packer.nvim")
-- Simple plugins can be specified as strings use("nvim-treesitter/nvim-treesitter", { run = ":TSUpdate" })
use 'rstacruz/vim-closer' use("theprimeagen/harpoon")
use { use("nvim-lua/plenary.nvim")
'nvim-telescope/telescope.nvim', tag = '0.1.0', use("mbbill/undotree")
-- or , branch = '0.1.x', use("tpope/vim-fugitive")
requires = { { 'nvim-lua/plenary.nvim' } }
}
use({ use({
'rose-pine/neovim', "numToStr/Comment.nvim",
as = 'rose-pine',
-- config = function()
-- vim.cmd('colorscheme rose-pine')
-- end
})
use('nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' })
use('nvim-treesitter/playground')
use('theprimeagen/harpoon')
use('mbbill/undotree')
use('tpope/vim-fugitive')
use({
"jose-elias-alvarez/null-ls.nvim",
config = function() config = function()
require("null-ls").setup() require("Comment").setup()
end,
requires = { "nvim-lua/plenary.nvim" },
})
use {
'nvim-tree/nvim-tree.lua',
requires = {
'nvim-tree/nvim-web-devicons', -- optional, for file icons
},
tag = 'nightly' -- optional, updated every week. (see issue #1193)
}
use {
'VonHeikemen/lsp-zero.nvim',
requires = {
-- LSP Support
{ 'neovim/nvim-lspconfig' },
{ 'williamboman/mason.nvim' },
{ 'williamboman/mason-lspconfig.nvim' },
{ 'jay-babu/mason-null-ls.nvim' },
-- Autocompletion
{ 'hrsh7th/nvim-cmp' },
{ 'hrsh7th/cmp-buffer' },
{ 'hrsh7th/cmp-path' },
{ 'saadparwaiz1/cmp_luasnip' },
{ 'hrsh7th/cmp-nvim-lsp' },
{ 'hrsh7th/cmp-nvim-lua' },
-- Snippets
{ 'L3MON4D3/LuaSnip' },
-- Snippet Collection (Optional)
{ 'rafamadriz/friendly-snippets' },
}
}
use {
'numToStr/Comment.nvim',
config = function()
require('Comment').setup()
end
}
use 'nvim-tree/nvim-web-devicons'
use { 'romgrk/barbar.nvim', wants = 'nvim-web-devicons' }
use 'feline-nvim/feline.nvim'
use 'xiyaowong/nvim-transparent'
-- use {
-- "windwp/nvim-autopairs",
-- }
use({
'nyoom-engineering/oxocarbon.nvim',
as = 'oxocarbon',
config = function()
vim.opt.background = "dark"
-- vim.cmd('colorscheme oxocarbon')
end
})
use({
"neanias/everforest-nvim",
-- Optional; default configuration will be used if setup isn't called.
config = function()
-- vim.cmd('colorscheme everforest')
require("everforest").setup()
end, end,
}) })
use({ use({
"svrana/neosolarized.nvim", "svrana/neosolarized.nvim",
requires = { requires = {
'tjdevries/colorbuddy.nvim' "tjdevries/colorbuddy.nvim",
} },
}) })
use({ use({
"aurum77/live-server.nvim", "aurum77/live-server.nvim",
run = function()
require "live_server.util".install()
end,
cmd = { "LiveServer", "LiveServerStart", "LiveServerStop" },
}) })
use({ use({
"kylechui/nvim-surround", "kylechui/nvim-surround",
tag = "*", -- Use for stability; omit to use `main` branch for the latest features
config = function() config = function()
require("nvim-surround").setup({ require("nvim-surround").setup({
-- Configuration here, or leave empty to use defaults -- Configuration here, or leave empty to use defaults
}) })
end end,
}) })
use({ "alexghergh/nvim-tmux-navigation" })
use { "alexghergh/nvim-tmux-navigation" } use({
"windwp/nvim-ts-autotag",
use 'windwp/nvim-ts-autotag' "windwp/nvim-autopairs",
})
use 'norcalli/nvim-colorizer.lua' use("norcalli/nvim-colorizer.lua")
use 'ThePrimeagen/vim-be-good' use("ThePrimeagen/vim-be-good")
use("declancm/maximize.nvim")
use 'declancm/maximize.nvim' use("andweeb/presence.nvim")
use("nvim-lualine/lualine.nvim")
use({"L3MON4D3/LuaSnip", tag = "v<CurrentMajor>.*"}) use({
use "rafamadriz/friendly-snippets" "williamboman/mason.nvim",
use "andweeb/presence.nvim" "williamboman/mason-lspconfig.nvim",
"neovim/nvim-lspconfig",
if packer_bootstrap then })
require('packer').sync() use({
end "onsails/lspkind-nvim",
"L3MON4D3/LuaSnip",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/nvim-cmp",
})
use("nvim-telescope/telescope.nvim")
use("nvim-telescope/telescope-file-browser.nvim")
use({ "akinsho/bufferline.nvim", tag = "v3.*", requires = "nvim-tree/nvim-web-devicons" })
use({
"glepnir/lspsaga.nvim",
branch = "main",
})
use({ "romgrk/barbar.nvim", requires = "nvim-web-devicons" })
use({
"jose-elias-alvarez/null-ls.nvim",
"jay-babu/mason-null-ls.nvim",
})
use("rafamadriz/friendly-snippets")
use("saadparwaiz1/cmp_luasnip")
use({
"lewis6991/gitsigns.nvim",
config = function()
require("gitsigns").setup()
end,
})
use({
"xiyaowong/nvim-transparent",
config = function()
require("transparent").setup({ enable = true })
vim.g.transparent_percentage = 80
end,
})
use("folke/zen-mode.nvim")
use("folke/lsp-colors.nvim")
end) end)

View File

@ -42,6 +42,8 @@ keymap.set("n", "<leader>sv", "<C-w>v")
keymap.set("n", "<leader>sh", "<C-w>s") keymap.set("n", "<leader>sh", "<C-w>s")
keymap.set("n", "<leader>se", "<C-w>=") keymap.set("n", "<leader>se", "<C-w>=")
keymap.set("n", "<leader>sx", ":close<CR>") keymap.set("n", "<leader>sx", ":close<CR>")
keymap.set("n", "<leader>s=", "<C-w>+")
keymap.set("n", "<leader>s-", "<C-w>-")
keymap.set('n', "<C-h>", nvim_tmux_nav.NvimTmuxNavigateLeft) keymap.set('n', "<C-h>", nvim_tmux_nav.NvimTmuxNavigateLeft)
keymap.set('n', "<C-j>", nvim_tmux_nav.NvimTmuxNavigateDown) keymap.set('n', "<C-j>", nvim_tmux_nav.NvimTmuxNavigateDown)

View File

@ -1,13 +1,13 @@
-- vim.opt.guicursor = "" -- vim.opt.guicursor = ""
vim.opt.mouse = 'a' vim.opt.mouse = "a"
vim.opt.nu = true vim.opt.nu = true
vim.opt.relativenumber = true vim.opt.relativenumber = true
vim.opt.clipboard:append {'unnamedplus'} vim.opt.clipboard:append({ "unnamedplus" })
vim.opt.tabstop = 4 vim.opt.tabstop = 2
vim.opt.softtabstop = 4 vim.opt.softtabstop = 2
vim.opt.shiftwidth = 4 vim.opt.shiftwidth = 2
vim.opt.expandtab = true vim.opt.expandtab = true
vim.opt.smartindent = true vim.opt.smartindent = true
@ -22,7 +22,6 @@ vim.opt.undofile = true
vim.opt.hlsearch = false vim.opt.hlsearch = false
vim.opt.incsearch = true vim.opt.incsearch = true
vim.opt.scrolloff = 8 vim.opt.scrolloff = 8
vim.opt.signcolumn = "yes" vim.opt.signcolumn = "yes"
vim.opt.isfname:append("@-@") vim.opt.isfname:append("@-@")
@ -33,14 +32,18 @@ vim.opt.updatetime = 50
vim.g.mapleader = " " vim.g.mapleader = " "
-- vim.g.loaded_netrw = 1
-- vim.g.loaded_netrwPlugin = 1
-- Case insensitive searching UNLESS /C or capital in search -- Case insensitive searching UNLESS /C or capital in search
vim.opt.ignorecase = true vim.opt.ignorecase = true
vim.opt.completeopt = 'menuone,noselect' vim.opt.completeopt = "menuone,noselect"
vim.opt.smartcase = true vim.opt.smartcase = true
vim.opt.splitright = true vim.opt.splitright = true
vim.opt.splitbelow = true vim.opt.splitbelow = true
vim.opt.termguicolors = true vim.opt.termguicolors = true
vim.cmd([[let &t_Cs = "\e[4:3m"]])
vim.cmd([[let &t_Ce = "\e[4:0m"]])
-- vim.o.foldcolumn = 1
-- vim.o.foldlevel = 99
-- vim.o.foldlevelstart= 0
-- vim.o.foldenable = true