Fixed formatting
This commit is contained in:
parent
4edc2a87b0
commit
1640e1c3b6
|
@ -35,7 +35,6 @@ I hope you enjoy your Neovim journey,
|
|||
|
||||
P.S. You can delete this when you're done too. It's your config now :)
|
||||
--]]
|
||||
|
||||
-- Set <space> as the leader key
|
||||
-- See `:help mapleader`
|
||||
-- NOTE: Must happen before plugins are required (otherwise wrong leader will be used)
|
||||
|
@ -69,7 +68,8 @@ require('lazy').setup({
|
|||
|
||||
-- NOTE: This is where your plugins related to LSP can be installed.
|
||||
-- The configuration is done below. Search for lspconfig to find it below.
|
||||
{ -- LSP Configuration & Plugins
|
||||
{
|
||||
-- LSP Configuration & Plugins
|
||||
'neovim/nvim-lspconfig',
|
||||
dependencies = {
|
||||
-- Automatically install LSPs to stdpath for neovim
|
||||
|
@ -111,17 +111,21 @@ require('lazy').setup({
|
|||
handler_opts = {
|
||||
-- TODO: Setup borders for other lsp stuff (Maybe using noice?)
|
||||
border = "single"
|
||||
}}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{ -- Autocompletion
|
||||
{
|
||||
-- Autocompletion
|
||||
'hrsh7th/nvim-cmp',
|
||||
dependencies = { 'hrsh7th/cmp-nvim-lsp', 'L3MON4D3/LuaSnip', 'saadparwaiz1/cmp_luasnip', 'hrsh7th/cmp-path', 'onsails/lspkind-nvim', },
|
||||
dependencies = { 'hrsh7th/cmp-nvim-lsp', 'L3MON4D3/LuaSnip', 'saadparwaiz1/cmp_luasnip', 'hrsh7th/cmp-path',
|
||||
'onsails/lspkind-nvim', },
|
||||
},
|
||||
|
||||
-- Useful plugin to show you pending keybinds.
|
||||
{ 'folke/which-key.nvim', opts = {} },
|
||||
{ -- Adds git releated signs to the gutter, as well as utilities for managing changes
|
||||
{
|
||||
-- Adds git releated signs to the gutter, as well as utilities for managing changes
|
||||
'lewis6991/gitsigns.nvim',
|
||||
opts = {
|
||||
-- See `:help gitsigns.txt`
|
||||
|
@ -135,24 +139,26 @@ require('lazy').setup({
|
|||
},
|
||||
},
|
||||
|
||||
{ -- Set lualine as statusline
|
||||
{
|
||||
-- Set lualine as statusline
|
||||
'nvim-lualine/lualine.nvim',
|
||||
-- See `:help lualine.txt`
|
||||
opts = {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'gruvbox',
|
||||
component_separators = { left = '', right = ''},
|
||||
section_separators = { left = '', right = ''},
|
||||
component_separators = { left = '', right = '' },
|
||||
section_separators = { left = '', right = '' },
|
||||
},
|
||||
sections = {
|
||||
lualine_b = {
|
||||
'branch',
|
||||
'diff',
|
||||
{ 'diagnostics', symbols = {error = '', warn = '', info = '', hint = ''} },
|
||||
{ 'diagnostics', symbols = { error = '', warn = '', info = '', hint = '' } },
|
||||
},
|
||||
lualine_c = {
|
||||
{ 'filename',
|
||||
{
|
||||
'filename',
|
||||
path = 1,
|
||||
symbols = {
|
||||
modified = symbols.file.modified,
|
||||
|
@ -172,7 +178,8 @@ require('lazy').setup({
|
|||
},
|
||||
},
|
||||
|
||||
{ -- Add indentation guides even on blank lines
|
||||
{
|
||||
-- Add indentation guides even on blank lines
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
-- Enable `lukas-reineke/indent-blankline.nvim`
|
||||
-- See `:help indent_blankline.txt`
|
||||
|
@ -184,7 +191,9 @@ require('lazy').setup({
|
|||
|
||||
|
||||
-- Fuzzy Finder (files, lsp, etc)
|
||||
{ 'nvim-telescope/telescope.nvim', version = '*', dependencies = { 'nvim-lua/plenary.nvim', 'nvim-telescope/telescope-ui-select.nvim' } },
|
||||
{ 'nvim-telescope/telescope.nvim', version = '*',
|
||||
dependencies = { 'nvim-lua/plenary.nvim',
|
||||
'nvim-telescope/telescope-ui-select.nvim' } },
|
||||
|
||||
-- Fuzzy Finder Algorithm which requires local dependencies to be built.
|
||||
-- Only load if `make` is available. Make sure you have the system
|
||||
|
@ -199,7 +208,8 @@ require('lazy').setup({
|
|||
end,
|
||||
},
|
||||
|
||||
{ -- Highlight, edit, and navigate code
|
||||
{
|
||||
-- Highlight, edit, and navigate code
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
dependencies = {
|
||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||
|
@ -351,7 +361,8 @@ require('nvim-treesitter.configs').setup {
|
|||
|
||||
-- LSP settings.
|
||||
-- Set the diagnostic symbols (Also used by Neo-tree)
|
||||
local signs = { Error = symbols.diagnostic.error, Warn = symbols.diagnostic.warning, Hint = symbols.diagnostic.hint, Info = symbols.diagnostic.info }
|
||||
local signs = { Error = symbols.diagnostic.error, Warn = symbols.diagnostic.warning, Hint = symbols.diagnostic.hint,
|
||||
Info = symbols.diagnostic.info }
|
||||
for type, icon in pairs(signs) do
|
||||
local hl = "DiagnosticSign" .. type
|
||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
||||
|
@ -379,7 +390,8 @@ local on_attach = function(client, bufnr)
|
|||
|
||||
-- nmap('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
|
||||
-- Should allow code actions in visual mode
|
||||
vim.keymap.set({'v', 'n'}, '<leader>ca', vim.lsp.buf.code_action, { buffer = bufnr, desc = 'LSP: [C]ode [A]ction', remap=true })
|
||||
vim.keymap.set({ 'v', 'n' }, '<leader>ca', vim.lsp.buf.code_action,
|
||||
{ buffer = bufnr, desc = 'LSP: [C]ode [A]ction', remap = true })
|
||||
-- nmap('<leader>ca', require('telescope.builtin')., '[C]ode [A]ction')
|
||||
|
||||
nmap('gd', vim.lsp.buf.definition, '[G]oto [D]efinition')
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
|
||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
callback = function()
|
||||
vim.highlight.on_yank({ higroup = 'YankHighlight'})
|
||||
vim.highlight.on_yank({ higroup = 'YankHighlight' })
|
||||
end,
|
||||
group = highlight_group,
|
||||
pattern = '*',
|
||||
|
|
|
@ -5,7 +5,6 @@ return {
|
|||
warning = "",
|
||||
info = "",
|
||||
hint = "",
|
||||
|
||||
-- Comment type symbols
|
||||
bug = "",
|
||||
todo = "",
|
||||
|
|
|
@ -5,7 +5,6 @@ return {
|
|||
modified = '●',
|
||||
deleted = '✖',
|
||||
renamed = '',
|
||||
|
||||
-- Status type
|
||||
untracked = '',
|
||||
ignored = '',
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
-- vim: ts=4 sts=4 sw=4 noet
|
||||
-- https://github.com/windwp/nvim-autopairs
|
||||
return {
|
||||
'windwp/nvim-autopairs',
|
||||
|
|
|
@ -3,11 +3,21 @@ return {
|
|||
'ojroques/nvim-bufdel',
|
||||
cmd = { "BufDel", "BuffDelOthers" },
|
||||
keys = {
|
||||
{ '<leader>bd', function()
|
||||
{
|
||||
'<leader>bd',
|
||||
function()
|
||||
require('bufdel').delete_buffer_expr(nil, false)
|
||||
end, silent = true, desc = '[B]uffer [d]elete' },
|
||||
{ '<leader>bD', function()
|
||||
end,
|
||||
silent = true,
|
||||
desc = '[B]uffer [d]elete'
|
||||
},
|
||||
{
|
||||
'<leader>bD',
|
||||
function()
|
||||
require('bufdel').delete_buffer_others(false)
|
||||
end, silent = true, desc = '[B]uffer [D]elete others' },
|
||||
end,
|
||||
silent = true,
|
||||
desc = '[B]uffer [D]elete others'
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ return {
|
|||
for e, n in pairs(diagnostics_dict) do
|
||||
local sym = e == "error" and symbols.diagnostic.error .. ' '
|
||||
or (e == "warning" and symbols.diagnostic.warning .. ' ')
|
||||
or (e == "info" and symbols.diagnostic.info .. ' ' or symbols.diagnostic.hint .. ' ' )
|
||||
or (e == "info" and symbols.diagnostic.info .. ' ' or symbols.diagnostic.hint .. ' ')
|
||||
s = s .. n .. sym
|
||||
end
|
||||
return s
|
||||
|
|
|
@ -11,7 +11,7 @@ return {
|
|||
keys = {
|
||||
{ '<F2>', '<cmd>Neotree toggle reveal filesystem float<cr>', desc = 'Open floating Neo-tree window' },
|
||||
},
|
||||
config = function ()
|
||||
config = function()
|
||||
local symbols = require('constant.symbols');
|
||||
|
||||
require('neo-tree').setup {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
return {
|
||||
'jose-elias-alvarez/null-ls.nvim',
|
||||
config = function ()
|
||||
config = function()
|
||||
local null_ls = require('null-ls')
|
||||
|
||||
null_ls.setup {
|
||||
|
|
|
@ -14,7 +14,7 @@ return {
|
|||
local augroup = vim.api.nvim_create_augroup('Peek', { clear = true })
|
||||
|
||||
-- Automatically open a markdown preview window
|
||||
vim.api.nvim_create_autocmd({ "FileType"}, {
|
||||
vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||
callback = function()
|
||||
require('peek').open()
|
||||
end,
|
||||
|
|
|
@ -2,9 +2,13 @@
|
|||
return {
|
||||
'simrat39/symbols-outline.nvim',
|
||||
keys = {
|
||||
{ '<F5>', function()
|
||||
{
|
||||
'<F5>',
|
||||
function()
|
||||
require('symbols-outline').toggle_outline()
|
||||
end, desc = 'Toggle symbols outline' },
|
||||
end,
|
||||
desc = 'Toggle symbols outline'
|
||||
},
|
||||
},
|
||||
opts = {},
|
||||
}
|
||||
|
|
|
@ -2,9 +2,13 @@
|
|||
return {
|
||||
'Wansmer/treesj',
|
||||
keys = {
|
||||
{ '<space>m', function()
|
||||
{
|
||||
'<space>m',
|
||||
function()
|
||||
require('treesj').toggle()
|
||||
end, desc = "Split or Join code block" },
|
||||
end,
|
||||
desc = "Split or Join code block"
|
||||
},
|
||||
},
|
||||
dependencies = { 'nvim-treesitter/nvim-treesitter' },
|
||||
opts = {
|
||||
|
|
|
@ -5,7 +5,7 @@ return {
|
|||
keys = {
|
||||
{ '<F3>', '<cmd>TroubleToggle workspace_diagnostics<cr>', desc = 'Goto previous buffer' },
|
||||
},
|
||||
config = function ()
|
||||
config = function()
|
||||
local symbols = require('constant.symbols');
|
||||
require('trouble').setup {
|
||||
icons = false,
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
return {
|
||||
'johnfrankmorgan/whitespace.nvim',
|
||||
config = function ()
|
||||
config = function()
|
||||
require('whitespace-nvim').setup({
|
||||
-- configuration options and their defaults
|
||||
|
||||
-- `highlight` configures which highlight is used to display
|
||||
-- trailing whitespace
|
||||
highlight = 'CursorLine',
|
||||
|
||||
-- `ignored_filetypes` configures which filetypes to ignore when
|
||||
-- displaying trailing whitespace
|
||||
ignored_filetypes = { 'TelescopePrompt', 'Trouble', 'help' },
|
||||
|
|
Loading…
Reference in New Issue
Block a user