update nvim theming
This commit is contained in:
parent
c07c2c5477
commit
74c9aa5fb9
501
init.lua
501
init.lua
@ -1,130 +1,132 @@
|
|||||||
-- https://learnxinyminutes.com/docs/lua/
|
-- https://learnxinyminutes.com/docs/lua/
|
||||||
|
|
||||||
vim.g.mapleader = ' '
|
vim.g.mapleader = ' '
|
||||||
|
vim.g.user_emmet_install_global = 0
|
||||||
|
vim.g.user_emmet_leader_key = ","
|
||||||
vim.g.maplocalleader = ' '
|
vim.g.maplocalleader = ' '
|
||||||
|
|
||||||
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
|
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
vim.fn.system {
|
vim.fn.system {
|
||||||
'git',
|
'git',
|
||||||
'clone',
|
'clone',
|
||||||
'--filter=blob:none',
|
'--filter=blob:none',
|
||||||
'https://github.com/folke/lazy.nvim.git',
|
'https://github.com/folke/lazy.nvim.git',
|
||||||
'--branch=stable', -- latest stable release
|
'--branch=stable', -- latest stable release
|
||||||
lazypath,
|
lazypath,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
require('lazy').setup({
|
require('lazy').setup({
|
||||||
-- Git related plugins
|
-- Git related plugins
|
||||||
'tpope/vim-fugitive',
|
'tpope/vim-fugitive',
|
||||||
'tpope/vim-rhubarb',
|
'tpope/vim-rhubarb',
|
||||||
-- Detect tabstop and shiftwidth automatically
|
-- Detect tabstop and shiftwidth automatically
|
||||||
'tpope/vim-sleuth',
|
'tpope/vim-sleuth',
|
||||||
{
|
{
|
||||||
-- 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
|
||||||
{ 'williamboman/mason.nvim', config = true },
|
{ 'williamboman/mason.nvim', config = true },
|
||||||
'williamboman/mason-lspconfig.nvim',
|
'williamboman/mason-lspconfig.nvim',
|
||||||
|
|
||||||
{
|
{
|
||||||
'j-hui/fidget.nvim',
|
'j-hui/fidget.nvim',
|
||||||
tag = 'legacy',
|
tag = 'legacy',
|
||||||
opts = {
|
opts = {
|
||||||
align = {
|
align = {
|
||||||
bottom = false,
|
bottom = false,
|
||||||
},
|
},
|
||||||
window = {
|
window = {
|
||||||
blend = 0,
|
blend = 0,
|
||||||
-- border = "rounded",
|
-- border = "rounded",
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
'folke/neodev.nvim',
|
||||||
},
|
},
|
||||||
},
|
|
||||||
|
|
||||||
'folke/neodev.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 related signs to the gutter, as well as utilities for managing changes
|
-- Adds git related 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`
|
||||||
signs = {
|
signs = {
|
||||||
add = { text = '+' },
|
add = { text = '+' },
|
||||||
change = { text = '~' },
|
change = { text = '~' },
|
||||||
delete = { text = '_' },
|
delete = { text = '_' },
|
||||||
topdelete = { text = '‾' },
|
topdelete = { text = '‾' },
|
||||||
changedelete = { text = '~' },
|
changedelete = { text = '~' },
|
||||||
},
|
},
|
||||||
on_attach = function(bufnr)
|
on_attach = function(bufnr)
|
||||||
vim.keymap.set('n', '<leader>gp', require('gitsigns').prev_hunk,
|
vim.keymap.set('n', '<leader>gp', require('gitsigns').prev_hunk,
|
||||||
{ buffer = bufnr, desc = '[G]o to [P]revious Hunk' })
|
{ buffer = bufnr, desc = '[G]o to [P]revious Hunk' })
|
||||||
vim.keymap.set('n', '<leader>gn', require('gitsigns').next_hunk, { buffer = bufnr, desc = '[G]o to [N]ext Hunk' })
|
vim.keymap.set('n', '<leader>gn', require('gitsigns').next_hunk,
|
||||||
vim.keymap.set('n', '<leader>ph', require('gitsigns').preview_hunk, { buffer = bufnr, desc = '[P]review [H]unk' })
|
{ buffer = bufnr, desc = '[G]o to [N]ext Hunk' })
|
||||||
end,
|
vim.keymap.set('n', '<leader>ph', require('gitsigns').preview_hunk,
|
||||||
|
{ buffer = bufnr, desc = '[P]review [H]unk' })
|
||||||
|
end,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
-- 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 = {
|
||||||
options = {
|
options = {
|
||||||
icons_enabled = false,
|
icons_enabled = true,
|
||||||
theme = 'ayu_dark',
|
theme = 'moonfly',
|
||||||
component_separators = '|',
|
component_separators = '|',
|
||||||
section_separators = '',
|
section_separators = '',
|
||||||
},
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
|
||||||
|
|
||||||
{
|
{
|
||||||
-- 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`
|
||||||
opts = {
|
main = 'ibl',
|
||||||
char = '┊',
|
opts = {},
|
||||||
show_trailing_blankline_indent = false,
|
|
||||||
},
|
},
|
||||||
},
|
|
||||||
|
|
||||||
-- "gc" to comment visual regions/lines
|
-- "gc" to comment visual regions/lines
|
||||||
{ 'numToStr/Comment.nvim', opts = {} },
|
{ 'numToStr/Comment.nvim', opts = {} },
|
||||||
|
|
||||||
-- Fuzzy Finder (files, lsp, etc)
|
-- Fuzzy Finder (files, lsp, etc)
|
||||||
{ 'nvim-telescope/telescope.nvim', branch = '0.1.x', dependencies = { 'nvim-lua/plenary.nvim' } },
|
{ 'nvim-telescope/telescope.nvim', branch = '0.1.x', dependencies = { 'nvim-lua/plenary.nvim' } },
|
||||||
|
|
||||||
{
|
{
|
||||||
'nvim-telescope/telescope-fzf-native.nvim',
|
'nvim-telescope/telescope-fzf-native.nvim',
|
||||||
build = 'make',
|
build = 'make',
|
||||||
cond = function()
|
cond = function()
|
||||||
return vim.fn.executable 'make' == 1
|
return vim.fn.executable 'make' == 1
|
||||||
end,
|
end,
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
-- Highlight, edit, and navigate code
|
|
||||||
'nvim-treesitter/nvim-treesitter',
|
|
||||||
dependencies = {
|
|
||||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
|
||||||
},
|
},
|
||||||
build = ':TSUpdate',
|
|
||||||
},
|
|
||||||
|
|
||||||
require 'kickstart.plugins.autoformat',
|
{
|
||||||
require 'kickstart.plugins.debug',
|
-- Highlight, edit, and navigate code
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
dependencies = {
|
||||||
|
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||||
|
},
|
||||||
|
build = ':TSUpdate',
|
||||||
|
},
|
||||||
|
|
||||||
{ import = 'custom.plugins' },
|
require 'kickstart.plugins.autoformat',
|
||||||
|
require 'kickstart.plugins.debug',
|
||||||
|
|
||||||
|
{ import = 'custom.plugins' },
|
||||||
}, {})
|
}, {})
|
||||||
|
|
||||||
-- Set highlight on search
|
-- Set highlight on search
|
||||||
@ -173,28 +175,29 @@ vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = tr
|
|||||||
-- [[ Highlight on yank ]]
|
-- [[ Highlight on yank ]]
|
||||||
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
|
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
|
||||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.highlight.on_yank()
|
vim.highlight.on_yank()
|
||||||
end,
|
end,
|
||||||
group = highlight_group,
|
group = highlight_group,
|
||||||
pattern = '*',
|
pattern = '*',
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local fb_actions = require "telescope".extensions.file_browser.actions
|
||||||
-- [[ Configure Telescope ]]
|
-- [[ Configure Telescope ]]
|
||||||
require('telescope').setup {
|
require('telescope').setup {
|
||||||
defaults = {
|
defaults = {
|
||||||
mappings = {
|
mappings = {
|
||||||
i = {
|
i = {
|
||||||
['<C-u>'] = false,
|
['<C-u>'] = false,
|
||||||
['<C-d>'] = false,
|
['<C-d>'] = false,
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
pickers = {
|
||||||
|
find_files = {
|
||||||
|
theme = "ivy",
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
|
||||||
pickers = {
|
|
||||||
find_files = {
|
|
||||||
theme = "ivy",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Enable telescope fzf native, if installed
|
-- Enable telescope fzf native, if installed
|
||||||
@ -204,11 +207,11 @@ pcall(require('telescope').load_extension, 'fzf')
|
|||||||
vim.keymap.set('n', '<leader>?', require('telescope.builtin').oldfiles, { desc = '[?] Find recently opened files' })
|
vim.keymap.set('n', '<leader>?', require('telescope.builtin').oldfiles, { desc = '[?] Find recently opened files' })
|
||||||
vim.keymap.set('n', '<leader><space>', require('telescope.builtin').buffers, { desc = '[ ] Find existing buffers' })
|
vim.keymap.set('n', '<leader><space>', require('telescope.builtin').buffers, { desc = '[ ] Find existing buffers' })
|
||||||
vim.keymap.set('n', '<leader>/', function()
|
vim.keymap.set('n', '<leader>/', function()
|
||||||
-- You can pass additional configuration to telescope to change theme, layout, etc.
|
-- You can pass additional configuration to telescope to change theme, layout, etc.
|
||||||
require('telescope.builtin').current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
|
require('telescope.builtin').current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
|
||||||
winblend = 0,
|
winblend = 0,
|
||||||
previewer = false,
|
previewer = false,
|
||||||
})
|
})
|
||||||
end, { desc = '[/] Fuzzily search in current buffer' })
|
end, { desc = '[/] Fuzzily search in current buffer' })
|
||||||
|
|
||||||
vim.keymap.set('n', '<leader>gf', require('telescope.builtin').git_files, { desc = 'Search [G]it [F]iles' })
|
vim.keymap.set('n', '<leader>gf', require('telescope.builtin').git_files, { desc = 'Search [G]it [F]iles' })
|
||||||
@ -221,67 +224,67 @@ vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics, { de
|
|||||||
-- [[ Configure Treesitter ]]
|
-- [[ Configure Treesitter ]]
|
||||||
-- See `:help nvim-treesitter`
|
-- See `:help nvim-treesitter`
|
||||||
require('nvim-treesitter.configs').setup {
|
require('nvim-treesitter.configs').setup {
|
||||||
-- Add languages to be installed here that you want installed for treesitter
|
-- Add languages to be installed here that you want installed for treesitter
|
||||||
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'vimdoc', 'vim', 'java' },
|
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'vimdoc', 'vim', 'java' },
|
||||||
|
|
||||||
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
||||||
auto_install = false,
|
auto_install = false,
|
||||||
|
|
||||||
highlight = { enable = true },
|
highlight = { enable = true },
|
||||||
indent = { enable = true },
|
indent = { enable = true },
|
||||||
incremental_selection = {
|
incremental_selection = {
|
||||||
enable = true,
|
enable = true,
|
||||||
keymaps = {
|
keymaps = {
|
||||||
init_selection = '<c-space>',
|
init_selection = '<c-space>',
|
||||||
node_incremental = '<c-space>',
|
node_incremental = '<c-space>',
|
||||||
scope_incremental = '<c-s>',
|
scope_incremental = '<c-s>',
|
||||||
node_decremental = '<M-space>',
|
node_decremental = '<M-space>',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
textobjects = {
|
||||||
textobjects = {
|
select = {
|
||||||
select = {
|
enable = true,
|
||||||
enable = true,
|
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
|
||||||
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
|
keymaps = {
|
||||||
keymaps = {
|
-- You can use the capture groups defined in textobjects.scm
|
||||||
-- You can use the capture groups defined in textobjects.scm
|
['aa'] = '@parameter.outer',
|
||||||
['aa'] = '@parameter.outer',
|
['ia'] = '@parameter.inner',
|
||||||
['ia'] = '@parameter.inner',
|
['af'] = '@function.outer',
|
||||||
['af'] = '@function.outer',
|
['if'] = '@function.inner',
|
||||||
['if'] = '@function.inner',
|
['ac'] = '@class.outer',
|
||||||
['ac'] = '@class.outer',
|
['ic'] = '@class.inner',
|
||||||
['ic'] = '@class.inner',
|
},
|
||||||
},
|
},
|
||||||
|
move = {
|
||||||
|
enable = true,
|
||||||
|
set_jumps = true, -- whether to set jumps in the jumplist
|
||||||
|
goto_next_start = {
|
||||||
|
[']m'] = '@function.outer',
|
||||||
|
[']]'] = '@class.outer',
|
||||||
|
},
|
||||||
|
goto_next_end = {
|
||||||
|
[']M'] = '@function.outer',
|
||||||
|
[']['] = '@class.outer',
|
||||||
|
},
|
||||||
|
goto_previous_start = {
|
||||||
|
['[m'] = '@function.outer',
|
||||||
|
['[['] = '@class.outer',
|
||||||
|
},
|
||||||
|
goto_previous_end = {
|
||||||
|
['[M'] = '@function.outer',
|
||||||
|
['[]'] = '@class.outer',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
swap = {
|
||||||
|
enable = true,
|
||||||
|
swap_next = {
|
||||||
|
['<leader>a'] = '@parameter.inner',
|
||||||
|
},
|
||||||
|
swap_previous = {
|
||||||
|
['<leader>A'] = '@parameter.inner',
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
move = {
|
|
||||||
enable = true,
|
|
||||||
set_jumps = true, -- whether to set jumps in the jumplist
|
|
||||||
goto_next_start = {
|
|
||||||
[']m'] = '@function.outer',
|
|
||||||
[']]'] = '@class.outer',
|
|
||||||
},
|
|
||||||
goto_next_end = {
|
|
||||||
[']M'] = '@function.outer',
|
|
||||||
[']['] = '@class.outer',
|
|
||||||
},
|
|
||||||
goto_previous_start = {
|
|
||||||
['[m'] = '@function.outer',
|
|
||||||
['[['] = '@class.outer',
|
|
||||||
},
|
|
||||||
goto_previous_end = {
|
|
||||||
['[M'] = '@function.outer',
|
|
||||||
['[]'] = '@class.outer',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
swap = {
|
|
||||||
enable = true,
|
|
||||||
swap_next = {
|
|
||||||
['<leader>a'] = '@parameter.inner',
|
|
||||||
},
|
|
||||||
swap_previous = {
|
|
||||||
['<leader>A'] = '@parameter.inner',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Diagnostic keymaps
|
-- Diagnostic keymaps
|
||||||
@ -293,74 +296,76 @@ vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagn
|
|||||||
-- [[ Configure LSP ]]
|
-- [[ Configure LSP ]]
|
||||||
-- This function gets run when an LSP connects to a particular buffer.
|
-- This function gets run when an LSP connects to a particular buffer.
|
||||||
local on_attach = function(_, bufnr)
|
local on_attach = function(_, bufnr)
|
||||||
local nmap = function(keys, func, desc)
|
local nmap = function(keys, func, desc)
|
||||||
if desc then
|
if desc then
|
||||||
desc = 'LSP: ' .. desc
|
desc = 'LSP: ' .. desc
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.keymap.set('n', keys, func, { buffer = bufnr, desc = desc })
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.keymap.set('n', keys, func, { buffer = bufnr, desc = desc })
|
nmap('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
|
||||||
end
|
nmap('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
|
||||||
|
|
||||||
nmap('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
|
nmap('gd', vim.lsp.buf.definition, '[G]oto [D]efinition')
|
||||||
nmap('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
|
nmap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
|
||||||
|
nmap('gI', vim.lsp.buf.implementation, '[G]oto [I]mplementation')
|
||||||
|
nmap('<leader>D', vim.lsp.buf.type_definition, 'Type [D]efinition')
|
||||||
|
nmap('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
|
||||||
|
nmap('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
|
||||||
|
|
||||||
nmap('gd', vim.lsp.buf.definition, '[G]oto [D]efinition')
|
-- See `:help K` for why this keymap
|
||||||
nmap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
|
nmap('K', vim.lsp.buf.hover, 'Hover Documentation')
|
||||||
nmap('gI', vim.lsp.buf.implementation, '[G]oto [I]mplementation')
|
nmap('<C-S-k>', vim.lsp.buf.signature_help, 'Signature Documentation')
|
||||||
nmap('<leader>D', vim.lsp.buf.type_definition, 'Type [D]efinition')
|
|
||||||
nmap('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
|
|
||||||
nmap('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
|
|
||||||
|
|
||||||
-- See `:help K` for why this keymap
|
-- Lesser used LSP functionality
|
||||||
nmap('K', vim.lsp.buf.hover, 'Hover Documentation')
|
nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
||||||
nmap('<C-S-k>', vim.lsp.buf.signature_help, 'Signature Documentation')
|
nmap('<leader>wa', vim.lsp.buf.add_workspace_folder, '[W]orkspace [A]dd Folder')
|
||||||
|
nmap('<leader>wr', vim.lsp.buf.remove_workspace_folder, '[W]orkspace [R]emove Folder')
|
||||||
|
nmap('<leader>wl', function()
|
||||||
|
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||||
|
end, '[W]orkspace [L]ist Folders')
|
||||||
|
|
||||||
-- Lesser used LSP functionality
|
-- Create a command `:Format` local to the LSP buffer
|
||||||
nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_)
|
||||||
nmap('<leader>wa', vim.lsp.buf.add_workspace_folder, '[W]orkspace [A]dd Folder')
|
vim.lsp.buf.format()
|
||||||
nmap('<leader>wr', vim.lsp.buf.remove_workspace_folder, '[W]orkspace [R]emove Folder')
|
end, { desc = 'Format current buffer with LSP' })
|
||||||
nmap('<leader>wl', function()
|
|
||||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
|
||||||
end, '[W]orkspace [L]ist Folders')
|
|
||||||
|
|
||||||
-- Create a command `:Format` local to the LSP buffer
|
vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(
|
||||||
vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_)
|
vim.lsp.handlers.hover, {
|
||||||
vim.lsp.buf.format()
|
border = "single"
|
||||||
end, { desc = 'Format current buffer with LSP' })
|
}
|
||||||
|
)
|
||||||
vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(
|
vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(
|
||||||
vim.lsp.handlers.hover, {
|
vim.lsp.handlers.signatureHelp, {
|
||||||
border = "single"
|
border = "single"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(
|
vim.diagnostic.config({ float = { border = "single" } })
|
||||||
vim.lsp.handlers.signatureHelp, {
|
|
||||||
border = "single"
|
|
||||||
}
|
|
||||||
)
|
|
||||||
vim.diagnostic.config({ float = { border = "single" } })
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local servers = {
|
local servers = {
|
||||||
-- clangd = {},
|
-- clangd = {},
|
||||||
-- gopls = {},
|
-- hls = {},
|
||||||
-- pyright = {},
|
rust_analyzer = {},
|
||||||
rust_analyzer = {},
|
gopls = {
|
||||||
gopls = {},
|
usePlaceholders = true,
|
||||||
-- tsserver = {},
|
analyses = {
|
||||||
-- hls = {},
|
unusedparams = true,
|
||||||
html = { provideFormatter = false },
|
}
|
||||||
cssls = {},
|
},
|
||||||
tsserver = {},
|
html = { provideFormatter = false },
|
||||||
pyright = {},
|
cssls = {},
|
||||||
|
tsserver = {},
|
||||||
|
pyright = {},
|
||||||
lua_ls = {
|
|
||||||
Lua = {
|
|
||||||
workspace = { checkThirdParty = false },
|
lua_ls = {
|
||||||
telemetry = { enable = false },
|
Lua = {
|
||||||
|
workspace = { checkThirdParty = false },
|
||||||
|
telemetry = { enable = false },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Setup neovim lua configuration
|
-- Setup neovim lua configuration
|
||||||
@ -375,26 +380,26 @@ capabilities.textDocument.completion.completionItem.snippetSupport = true
|
|||||||
local mason_lspconfig = require 'mason-lspconfig'
|
local mason_lspconfig = require 'mason-lspconfig'
|
||||||
|
|
||||||
mason_lspconfig.setup {
|
mason_lspconfig.setup {
|
||||||
ensure_installed = vim.tbl_keys(servers),
|
ensure_installed = vim.tbl_keys(servers),
|
||||||
}
|
}
|
||||||
|
|
||||||
mason_lspconfig.setup_handlers {
|
mason_lspconfig.setup_handlers {
|
||||||
function(server_name)
|
function(server_name)
|
||||||
require('lspconfig')[server_name].setup {
|
require('lspconfig')[server_name].setup {
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
settings = servers[server_name],
|
settings = servers[server_name],
|
||||||
filetypes = (servers[server_name] or {}).filetypes,
|
filetypes = (servers[server_name] or {}).filetypes,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
-- this is for my personal config, i cant bother seeing every TJ's default and changing it to my own
|
-- this is for my personal config, i cant bother seeing every TJ's default and changing it to my own
|
||||||
require("jabuxas")
|
require("jabuxas")
|
||||||
|
|
||||||
vim.opt.tabstop = 2
|
vim.opt.tabstop = 4
|
||||||
vim.opt.softtabstop = 2
|
vim.opt.softtabstop = 4
|
||||||
vim.opt.shiftwidth = 2
|
vim.opt.shiftwidth = 4
|
||||||
vim.opt.expandtab = true
|
vim.opt.expandtab = true
|
||||||
|
|
||||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||||
-- vim: ts=2 sts=2 sw=2 et
|
-- vim: ts=4 sts=4 sw=4 et
|
||||||
|
@ -2,8 +2,12 @@ return {
|
|||||||
'akinsho/bufferline.nvim',
|
'akinsho/bufferline.nvim',
|
||||||
version = "*",
|
version = "*",
|
||||||
dependencies = 'nvim-tree/nvim-web-devicons',
|
dependencies = 'nvim-tree/nvim-web-devicons',
|
||||||
|
opts = {
|
||||||
|
options = {
|
||||||
|
mode = "tabs"
|
||||||
|
}
|
||||||
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require('bufferline').setup()
|
|
||||||
vim.keymap.set("n", "<A-.>", "<cmd>bnext<CR>", { desc = "Go to next Buffer" })
|
vim.keymap.set("n", "<A-.>", "<cmd>bnext<CR>", { desc = "Go to next Buffer" })
|
||||||
vim.keymap.set("n", "<A-,>", "<cmd>bprev<CR>", { desc = "Go to previous Buffer" })
|
vim.keymap.set("n", "<A-,>", "<cmd>bprev<CR>", { desc = "Go to previous Buffer" })
|
||||||
vim.keymap.set("n", "<A-x>", "<cmd>bdelete<CR>", { desc = "Delete current buffer" })
|
vim.keymap.set("n", "<A-x>", "<cmd>bdelete<CR>", { desc = "Delete current buffer" })
|
||||||
|
@ -142,8 +142,8 @@ return {
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
window = {
|
window = {
|
||||||
completion = cmp.config.window.bordered({ winhighlight }),
|
completion = cmp.config.window.bordered(winhighlight),
|
||||||
documentation = cmp.config.window.bordered({ winhighlight }),
|
documentation = cmp.config.window.bordered(winhighlight),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,15 +1,12 @@
|
|||||||
return {
|
return {
|
||||||
"mattn/emmet-vim",
|
"mattn/emmet-vim",
|
||||||
config = function()
|
config = function()
|
||||||
vim.g.user_emmet_leader_key = ","
|
|
||||||
vim.g.user_emmet_install_global = 0
|
|
||||||
|
|
||||||
local autocmd = vim.api.nvim_create_autocmd
|
local autocmd = vim.api.nvim_create_autocmd
|
||||||
autocmd("FileType", { pattern = "html", command = [[EmmetInstall]] })
|
autocmd("FileType", { pattern = "html", command = [[EmmetInstall]] })
|
||||||
autocmd("FileType", { pattern = "css", command = [[EmmetInstall]] })
|
autocmd("FileType", { pattern = "css", command = [[EmmetInstall]] })
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>e", function()
|
vim.keymap.set("n", "<leader>le", function()
|
||||||
vim.cmd(string.format("Emmet %s", vim.fn.input("Emmet: ")))
|
vim.cmd(string.format("Emmet %s", vim.fn.input("Emmet: ")))
|
||||||
end)
|
end)
|
||||||
end
|
end,
|
||||||
}
|
}
|
||||||
|
4
lua/custom/plugins/file-browser.lua
Normal file
4
lua/custom/plugins/file-browser.lua
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
return {
|
||||||
|
"nvim-telescope/telescope-file-browser.nvim",
|
||||||
|
dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" }
|
||||||
|
}
|
13
lua/custom/plugins/live-server.lua
Normal file
13
lua/custom/plugins/live-server.lua
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
return {
|
||||||
|
"aurum77/live-server.nvim",
|
||||||
|
opts = {},
|
||||||
|
cmd = {
|
||||||
|
"LiveServer",
|
||||||
|
"LiveServerStart",
|
||||||
|
"LiveServerStop",
|
||||||
|
"LiveServerInstall",
|
||||||
|
},
|
||||||
|
build = function()
|
||||||
|
require("live_server.util").install()
|
||||||
|
end,
|
||||||
|
}
|
@ -1,12 +1,13 @@
|
|||||||
return {
|
return {
|
||||||
"bluz71/vim-nightfly-colors",
|
"bluz71/vim-moonfly-colors",
|
||||||
name = "nightfly",
|
name = "moonfly",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
config = function()
|
config = function()
|
||||||
vim.o.termguicolors = true
|
vim.o.termguicolors = true
|
||||||
vim.cmd [[colorscheme nightfly]]
|
vim.cmd [[colorscheme moonfly]]
|
||||||
vim.g.nightflyCursorColor = true
|
vim.g.moonflyCursorColor = true
|
||||||
vim.g.nightflyNormalFloat = true
|
vim.g.moonflyNormalFloat = true
|
||||||
|
vim.g.moonflyTransparent = true
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ return {
|
|||||||
-- 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("Macro", groups.PreProc, colors.none, styles.italic + styles.bold)
|
||||||
-- Group.link("Function", groups.Function, colors.none, styles.italic)
|
-- Group.new("Function", groups.Function, colors.none, styles.italic)
|
||||||
-- Group.new("Conditional", groups.Statement, colors.none, styles.italic)
|
-- Group.new("Conditional", groups.Statement, colors.none, styles.italic)
|
||||||
-- Group.new("Boolean", groups.Constant, colors.none, styles.bold)
|
-- Group.new("Boolean", groups.Constant, colors.none, styles.bold)
|
||||||
-- Group.new("HoverBorder", colors.yellow, colors.none, styles.NONE)
|
-- Group.new("HoverBorder", colors.yellow, colors.none, styles.NONE)
|
||||||
|
@ -3,10 +3,10 @@ return {
|
|||||||
-- lazy = false,
|
-- lazy = false,
|
||||||
-- priority = 1000,
|
-- priority = 1000,
|
||||||
-- config = function()
|
-- config = function()
|
||||||
-- vim.o.background = 'dark' -- or 'light'
|
-- vim.o.background = 'light' -- or 'light'
|
||||||
-- require('solarized').setup({
|
-- require('solarized').setup({
|
||||||
-- transparent = true,
|
-- transparent = true,
|
||||||
-- theme = 'neo',
|
-- theme = 'default',
|
||||||
-- styles = {
|
-- styles = {
|
||||||
-- functions = { bold = true, italic = false }
|
-- functions = { bold = true, italic = false }
|
||||||
-- },
|
-- },
|
||||||
@ -14,5 +14,3 @@ return {
|
|||||||
-- vim.cmd.colorscheme 'solarized'
|
-- vim.cmd.colorscheme 'solarized'
|
||||||
-- end,
|
-- end,
|
||||||
}
|
}
|
||||||
|
|
||||||
-- vim: sw=2 ts=2 sts=2 et
|
|
||||||
|
6
lua/custom/plugins/surround.lua
Normal file
6
lua/custom/plugins/surround.lua
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
return {
|
||||||
|
"kylechui/nvim-surround",
|
||||||
|
version = "*",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {},
|
||||||
|
}
|
@ -3,7 +3,8 @@ return {
|
|||||||
lazy = false,
|
lazy = false,
|
||||||
opts = {
|
opts = {
|
||||||
extra_groups = {
|
extra_groups = {
|
||||||
"NormalFloat", -- plugins which have float panel such as Lazy, Mason, LspInfo
|
"NormalFloat", -- plugins which have float panel such as Lazy, Mason, LspInfo
|
||||||
|
"FloatBorder",
|
||||||
"NvimTreeNormal" -- NvimTree
|
"NvimTreeNormal" -- NvimTree
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -2,12 +2,26 @@ return {
|
|||||||
"folke/zen-mode.nvim",
|
"folke/zen-mode.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
plugins = {
|
plugins = {
|
||||||
tmux = { enabled = true },
|
|
||||||
kitty = {
|
kitty = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
font = "+5",
|
font = "+3",
|
||||||
}
|
},
|
||||||
|
wezterm = {
|
||||||
|
enabled = true,
|
||||||
|
font = "+3"
|
||||||
|
},
|
||||||
|
tmux = { enabled = true },
|
||||||
},
|
},
|
||||||
|
on_open = function()
|
||||||
|
vim.fn.system("kitty @ set-font-size +5")
|
||||||
|
vim.fn.system("tmux set status off")
|
||||||
|
vim.fn.system("tmux set -w pane-border-status off")
|
||||||
|
end,
|
||||||
|
on_close = function()
|
||||||
|
vim.fn.system("kitty @ set-font-size +0")
|
||||||
|
vim.fn.system("tmux set status on")
|
||||||
|
vim.fn.system("tmux set -w pane-border-status on")
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
vim.keymap.set("n", "<leader>z", "<cmd>ZenMode<CR>", { silent = true })
|
vim.keymap.set("n", "<leader>z", "<cmd>ZenMode<CR>", { silent = true })
|
||||||
|
@ -29,9 +29,9 @@ vim.opt.isfname:append("@-@")
|
|||||||
vim.opt.updatetime = 50
|
vim.opt.updatetime = 50
|
||||||
|
|
||||||
vim.opt.colorcolumn = "80"
|
vim.opt.colorcolumn = "80"
|
||||||
vim.cmd[[highlight ColorColumn ctermbg=235 guibg=#262626]]
|
vim.cmd [[highlight ColorColumn ctermbg=235 guibg=#262626]]
|
||||||
vim.api.nvim_create_autocmd({"WinLeave"}, {pattern = "*", callback = function() vim.opt.colorcolumn = "0" end,})
|
vim.api.nvim_create_autocmd({ "WinLeave" }, { pattern = "*", callback = function() vim.opt.colorcolumn = "0" end, })
|
||||||
vim.api.nvim_create_autocmd({"WinEnter"}, {pattern = "*", callback = function() vim.opt.colorcolumn = "80" end,})
|
vim.api.nvim_create_autocmd({ "WinEnter" }, { pattern = "*", callback = function() vim.opt.colorcolumn = "80" end, })
|
||||||
|
|
||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user