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 :)
|
P.S. You can delete this when you're done too. It's your config now :)
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
-- Set <space> as the leader key
|
-- Set <space> as the leader key
|
||||||
-- See `:help mapleader`
|
-- See `:help mapleader`
|
||||||
-- NOTE: Must happen before plugins are required (otherwise wrong leader will be used)
|
-- 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.
|
-- NOTE: This is where your plugins related to LSP can be installed.
|
||||||
-- The configuration is done below. Search for lspconfig to find it below.
|
-- The configuration is done below. Search for lspconfig to find it below.
|
||||||
{ -- LSP Configuration & Plugins
|
{
|
||||||
|
-- LSP Configuration & Plugins
|
||||||
'neovim/nvim-lspconfig',
|
'neovim/nvim-lspconfig',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- Automatically install LSPs to stdpath for neovim
|
-- Automatically install LSPs to stdpath for neovim
|
||||||
|
@ -111,17 +111,21 @@ require('lazy').setup({
|
||||||
handler_opts = {
|
handler_opts = {
|
||||||
-- TODO: Setup borders for other lsp stuff (Maybe using noice?)
|
-- TODO: Setup borders for other lsp stuff (Maybe using noice?)
|
||||||
border = "single"
|
border = "single"
|
||||||
}}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{ -- Autocompletion
|
{
|
||||||
|
-- Autocompletion
|
||||||
'hrsh7th/nvim-cmp',
|
'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.
|
-- Useful plugin to show you pending keybinds.
|
||||||
{ 'folke/which-key.nvim', opts = {} },
|
{ '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',
|
'lewis6991/gitsigns.nvim',
|
||||||
opts = {
|
opts = {
|
||||||
-- See `:help gitsigns.txt`
|
-- See `:help gitsigns.txt`
|
||||||
|
@ -135,7 +139,8 @@ require('lazy').setup({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{ -- Set lualine as statusline
|
{
|
||||||
|
-- Set lualine as statusline
|
||||||
'nvim-lualine/lualine.nvim',
|
'nvim-lualine/lualine.nvim',
|
||||||
-- See `:help lualine.txt`
|
-- See `:help lualine.txt`
|
||||||
opts = {
|
opts = {
|
||||||
|
@ -152,7 +157,8 @@ require('lazy').setup({
|
||||||
{ 'diagnostics', symbols = { error = '', warn = '', info = '', hint = '' } },
|
{ 'diagnostics', symbols = { error = '', warn = '', info = '', hint = '' } },
|
||||||
},
|
},
|
||||||
lualine_c = {
|
lualine_c = {
|
||||||
{ 'filename',
|
{
|
||||||
|
'filename',
|
||||||
path = 1,
|
path = 1,
|
||||||
symbols = {
|
symbols = {
|
||||||
modified = symbols.file.modified,
|
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',
|
'lukas-reineke/indent-blankline.nvim',
|
||||||
-- Enable `lukas-reineke/indent-blankline.nvim`
|
-- Enable `lukas-reineke/indent-blankline.nvim`
|
||||||
-- See `:help indent_blankline.txt`
|
-- See `:help indent_blankline.txt`
|
||||||
|
@ -184,7 +191,9 @@ require('lazy').setup({
|
||||||
|
|
||||||
|
|
||||||
-- Fuzzy Finder (files, lsp, etc)
|
-- 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.
|
-- Fuzzy Finder Algorithm which requires local dependencies to be built.
|
||||||
-- Only load if `make` is available. Make sure you have the system
|
-- Only load if `make` is available. Make sure you have the system
|
||||||
|
@ -199,7 +208,8 @@ require('lazy').setup({
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ -- Highlight, edit, and navigate code
|
{
|
||||||
|
-- Highlight, edit, and navigate code
|
||||||
'nvim-treesitter/nvim-treesitter',
|
'nvim-treesitter/nvim-treesitter',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||||
|
@ -351,7 +361,8 @@ require('nvim-treesitter.configs').setup {
|
||||||
|
|
||||||
-- LSP settings.
|
-- LSP settings.
|
||||||
-- Set the diagnostic symbols (Also used by Neo-tree)
|
-- 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
|
for type, icon in pairs(signs) do
|
||||||
local hl = "DiagnosticSign" .. type
|
local hl = "DiagnosticSign" .. type
|
||||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
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')
|
-- nmap('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
|
||||||
-- Should allow code actions in visual mode
|
-- 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('<leader>ca', require('telescope.builtin')., '[C]ode [A]ction')
|
||||||
|
|
||||||
nmap('gd', vim.lsp.buf.definition, '[G]oto [D]efinition')
|
nmap('gd', vim.lsp.buf.definition, '[G]oto [D]efinition')
|
||||||
|
|
|
@ -5,7 +5,6 @@ return {
|
||||||
warning = "",
|
warning = "",
|
||||||
info = "",
|
info = "",
|
||||||
hint = "",
|
hint = "",
|
||||||
|
|
||||||
-- Comment type symbols
|
-- Comment type symbols
|
||||||
bug = "",
|
bug = "",
|
||||||
todo = "",
|
todo = "",
|
||||||
|
|
|
@ -5,7 +5,6 @@ return {
|
||||||
modified = '●',
|
modified = '●',
|
||||||
deleted = '✖',
|
deleted = '✖',
|
||||||
renamed = '',
|
renamed = '',
|
||||||
|
|
||||||
-- Status type
|
-- Status type
|
||||||
untracked = '',
|
untracked = '',
|
||||||
ignored = '',
|
ignored = '',
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
-- vim: ts=4 sts=4 sw=4 noet
|
|
||||||
-- https://github.com/windwp/nvim-autopairs
|
-- https://github.com/windwp/nvim-autopairs
|
||||||
return {
|
return {
|
||||||
'windwp/nvim-autopairs',
|
'windwp/nvim-autopairs',
|
||||||
|
|
|
@ -3,11 +3,21 @@ return {
|
||||||
'ojroques/nvim-bufdel',
|
'ojroques/nvim-bufdel',
|
||||||
cmd = { "BufDel", "BuffDelOthers" },
|
cmd = { "BufDel", "BuffDelOthers" },
|
||||||
keys = {
|
keys = {
|
||||||
{ '<leader>bd', function()
|
{
|
||||||
|
'<leader>bd',
|
||||||
|
function()
|
||||||
require('bufdel').delete_buffer_expr(nil, false)
|
require('bufdel').delete_buffer_expr(nil, false)
|
||||||
end, silent = true, desc = '[B]uffer [d]elete' },
|
end,
|
||||||
{ '<leader>bD', function()
|
silent = true,
|
||||||
|
desc = '[B]uffer [d]elete'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'<leader>bD',
|
||||||
|
function()
|
||||||
require('bufdel').delete_buffer_others(false)
|
require('bufdel').delete_buffer_others(false)
|
||||||
end, silent = true, desc = '[B]uffer [D]elete others' },
|
end,
|
||||||
|
silent = true,
|
||||||
|
desc = '[B]uffer [D]elete others'
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,9 +2,13 @@
|
||||||
return {
|
return {
|
||||||
'simrat39/symbols-outline.nvim',
|
'simrat39/symbols-outline.nvim',
|
||||||
keys = {
|
keys = {
|
||||||
{ '<F5>', function()
|
{
|
||||||
|
'<F5>',
|
||||||
|
function()
|
||||||
require('symbols-outline').toggle_outline()
|
require('symbols-outline').toggle_outline()
|
||||||
end, desc = 'Toggle symbols outline' },
|
end,
|
||||||
|
desc = 'Toggle symbols outline'
|
||||||
|
},
|
||||||
},
|
},
|
||||||
opts = {},
|
opts = {},
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,9 +2,13 @@
|
||||||
return {
|
return {
|
||||||
'Wansmer/treesj',
|
'Wansmer/treesj',
|
||||||
keys = {
|
keys = {
|
||||||
{ '<space>m', function()
|
{
|
||||||
|
'<space>m',
|
||||||
|
function()
|
||||||
require('treesj').toggle()
|
require('treesj').toggle()
|
||||||
end, desc = "Split or Join code block" },
|
end,
|
||||||
|
desc = "Split or Join code block"
|
||||||
|
},
|
||||||
},
|
},
|
||||||
dependencies = { 'nvim-treesitter/nvim-treesitter' },
|
dependencies = { 'nvim-treesitter/nvim-treesitter' },
|
||||||
opts = {
|
opts = {
|
||||||
|
|
|
@ -7,7 +7,6 @@ return {
|
||||||
-- `highlight` configures which highlight is used to display
|
-- `highlight` configures which highlight is used to display
|
||||||
-- trailing whitespace
|
-- trailing whitespace
|
||||||
highlight = 'CursorLine',
|
highlight = 'CursorLine',
|
||||||
|
|
||||||
-- `ignored_filetypes` configures which filetypes to ignore when
|
-- `ignored_filetypes` configures which filetypes to ignore when
|
||||||
-- displaying trailing whitespace
|
-- displaying trailing whitespace
|
||||||
ignored_filetypes = { 'TelescopePrompt', 'Trouble', 'help' },
|
ignored_filetypes = { 'TelescopePrompt', 'Trouble', 'help' },
|
||||||
|
|
Loading…
Reference in New Issue
Block a user