feat: Removing nvim-lspconfig and starting the removal of Mason, adding

in LSP definitions for servers that are used, adding in a script to
check for LSPs, removing some extraneous items in the tmux conf, moving
autopairs to its own file
This commit is contained in:
2026-08-16 20:19:05 -05:00
parent 5608ade094
commit 86475a8e8e
25 changed files with 352 additions and 123 deletions

View File

@@ -39,5 +39,4 @@ vim.api.nvim_create_autocmd({ 'BufWinEnter' }, {
end
end
})
-- End large file handling

View File

@@ -1,7 +1,6 @@
-- Load the following plugins eagerly to prevent visual oddities
require('plugins.gruvbox') -- Colorscheme setup
require('plugins.lualine') -- Status line plugin
-- require('statusline')
-- vim.schedule defers plugin loading for after the main loop starts
-- Startup is cleaner and faster than ever
@@ -13,20 +12,16 @@ vim.schedule(function()
require('plugins.luasnip') -- Snippet engine
require('plugins.telescope') -- Floating window fuzzy searching different sources
require('plugins.telekasten') -- Note taking plugin
require('plugins.mason') -- LSP and DAP manager
require('plugins.render-markdown') -- Render markdown directly in neovim
vim.pack.add({
'https://github.com/windwp/nvim-autopairs', -- Autocomplete symbol pairs when typing TODO: disabled for now, using snippets instead. remove if that feels better
'https://github.com/windwp/nvim-autopairs', -- Autocomplete symbol pairs when typing
'https://github.com/tpope/vim-surround', -- Change surrounding characters (doesn't need setup called)
'https://github.com/tpope/vim-fugitive', -- _The_ Git integration plugin people have been using forever
'https://github.com/habamax/vim-godot' -- Godot specific bindings and debug
})
require('nvim-autopairs').setup() -- Automatic pair completion of paranteticals, braces, quotes, etc.
require('plugins.dap') -- DAP debugging plugin TODO: cleanup
require('plugins.dap-python') -- Debug plugin settings specifically for python TODO: cleanup
-- Experimental
-- require('plugins.note_taking') -- In house note taking plugin (TODO: rename once the plugin name is solidified)
require('plugins.autopairs') -- Automatic pair completion of paranteticals, braces, quotes, etc.
require('plugins.dap') -- DAP debugging plugin TODO: cleanup
require('plugins.dap-python') -- Debug plugin settings specifically for python TODO: cleanup
end)

View File

@@ -0,0 +1,3 @@
vim.pack.add({'https://github.com/nvim-autopairs'})
require('nvim-autopairs').setup()

View File

@@ -31,19 +31,19 @@ require('gitsigns').setup {
end)
-- Actions
map('n', '<leader>gs', gitsigns.stage_hunk) -- TODO: Overlaps with LSP keymappings
-- map('n', '<leader>gs', gitsigns.stage_hunk) -- TODO: Overlaps with LSP keymappings
map('n', '<leader>gu', gitsigns.undo_stage_hunk)
map('n', '<leader>gr', gitsigns.reset_hunk) -- TODO: Overlaps with LSP keymappings
map('v', '<leader>gs', function() gitsigns.stage_hunk { vim.fn.line('.'), vim.fn.line('v') } end) -- TODO: Overlaps with LSP keymappings
-- map('n', '<leader>gr', gitsigns.reset_hunk) -- TODO: Overlaps with LSP keymappings
-- map('v', '<leader>gs', function() gitsigns.stage_hunk { vim.fn.line('.'), vim.fn.line('v') } end) -- TODO: Overlaps with LSP keymappings
map('v', '<leader>gu', function() gitsigns.undo_stage_hunk { vim.fn.line('.'), vim.fn.line('v') } end)
map('v', '<leader>gr', function() gitsigns.reset_hunk { vim.fn.line('.'), vim.fn.line('v') } end) -- TODO: Overlaps with LSP keymappings
-- map('v', '<leader>gr', function() gitsigns.reset_hunk { vim.fn.line('.'), vim.fn.line('v') } end) -- TODO: Overlaps with LSP keymappings
map('n', '<leader>gS', gitsigns.stage_buffer)
map('n', '<leader>gR', gitsigns.reset_buffer)
map('n', '<leader>gp', gitsigns.preview_hunk)
map('n', '<leader>gb', function() gitsigns.blame_line { full = true } end)
map('n', '<leader>gtb', gitsigns.toggle_current_line_blame)
map('n', '<leader>gd', gitsigns.diffthis) -- TODO: Overlaps with LSP keymappings
map('n', '<leader>gD', function() gitsigns.diffthis('~') end) -- TODO: Overlaps with LSP keymappings
-- map('n', '<leader>gd', gitsigns.diffthis) -- TODO: Overlaps with LSP keymappings
-- map('n', '<leader>gD', function() gitsigns.diffthis('~') end) -- TODO: Overlaps with LSP keymappings
map('n', '<leader>gtd', gitsigns.toggle_deleted)
-- Text object

View File

@@ -17,18 +17,18 @@ vim.diagnostic.config({
underline = true,
virtual_text = {
prefix = "",
source = 'always',
source = true,
},
severity_sort = true,
float = {
source = 'always'
source = true
}
})
-- Install and enable the language server settings from nvim-lspconfig
vim.pack.add({
'https://github.com/neovim/nvim-lspconfig',
})
-- vim.pack.add({
-- 'https://github.com/neovim/nvim-lspconfig',
-- })
-- Auto set keymaps and other settings on LSP attach
vim.api.nvim_create_autocmd('LspAttach', {
@@ -37,29 +37,33 @@ vim.api.nvim_create_autocmd('LspAttach', {
local bufnr = args.buf
local bufopts = { noremap = true, silent = true, buffer = bufnr }
vim.keymap.set('i', '<c-space>', vim.lsp.completion.get, bufopts)
vim.keymap.set('n', '<C-[>', function() vim.diagnostic.jump({ count = -1, float = true }) end, bufopts)
vim.keymap.set('n', '<C-]>', function() vim.diagnostic.jump({ count = 1, float = true }) end, bufopts)
vim.keymap.set('n', 'ga', vim.lsp.buf.code_action, bufopts)
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
vim.keymap.set('n', 'gs', vim.lsp.buf.signature_help, bufopts)
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', '<leader>D', vim.lsp.buf.type_definition, bufopts)
vim.keymap.set('n', '<leader>for', function() vim.lsp.buf.format { async = true } end, bufopts)
vim.keymap.set('n', '<leader>r', vim.lsp.buf.rename, bufopts)
vim.keymap.set('i', '<c-space>', vim.lsp.completion.get, bufopts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
vim.keymap.set('n', 'ga', vim.lsp.buf.code_action, bufopts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', 'gs', vim.lsp.buf.signature_help, bufopts)
end,
})
-- Enable LSP engines
local enabled_lsps = {
'clangd',
'bashls',
'gdscript',
'jinja_lsp',
'lua_ls',
'pylsp',
'r_language_server',
'rust_analyzer',
'yamlls',
}
for _, lsp in pairs(enabled_lsps) do

View File

@@ -20,8 +20,15 @@ require('lualine').setup {
}
},
sections = {
lualine_c = {
'filename',
'lsp_status',
},
lualine_x = {
'encoding', 'fileformat', 'filetype', get_schema
'encoding',
'fileformat',
'filetype',
get_schema,
},
}
}

View File

@@ -1,21 +1,23 @@
vim.pack.add({
'https://github.com/mason-org/mason.nvim',
'https://github.com/mason-org/mason-lspconfig.nvim',
})
-- vim.pack.add({
-- 'https://github.com/mason-org/mason.nvim',
-- 'https://github.com/mason-org/mason-lspconfig.nvim',
-- })
require('mason').setup()
require('mason-lspconfig').setup {
automatic_enable = true,
ensure_installed = {
'ansiblels', -- Ansible
'arduino_language_server', -- Arduino specific C
'bashls', -- Bash
'clangd', -- C/C++
'intelephense', -- PHP
'lua_ls', -- Lua
'marksman', -- markdown
'pylsp', -- Python
'rust_analyzer', -- Rust
'yamlls', -- YAML
}
}
-- require('mason').setup()
-- require('mason-lspconfig').setup {
-- automatic_enable = true,
-- ensure_installed = {
-- 'ansiblels', -- Ansible
-- 'arduino_language_server', -- Arduino specific C
-- 'bashls', -- Bash
-- 'clangd', -- C/C++
-- 'intelephense', -- PHP
-- 'jinja_lsp', -- Jinja2
-- 'lua_ls', -- Lua
-- 'marksman', -- markdown
-- 'pylsp', -- Python
-- 'rust_analyzer', -- Rust
-- 'shellcheck', -- Bash
-- 'yamlls', -- YAML
-- }
-- }

View File

@@ -21,7 +21,7 @@ cmp.setup {
['<C-p>'] = cmp.mapping.select_prev_item(),
['<C-j>'] = cmp.mapping.scroll_docs(-4),
['<C-k>'] = cmp.mapping.scroll_docs(4),
['<C-space>'] = cmp.mapping.complete(), -- TODO: Overlaps with completion(? possibly doesn't due to state)
['<C-space>'] = cmp.mapping.complete(),
['<C-y>'] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Insert,
select = true,

View File

@@ -20,7 +20,6 @@ require('telescope').setup {
'node_modules',
},
layout_config = { prompt_position = 'bottom' },
-- layout_strategy = 'vertical',
mappings = {
i = { ['<ESC>'] = require('telescope.actions').close, },
},

View File

@@ -19,11 +19,11 @@ vim.opt.mouse = 'a' -- Enable mouse
vim.opt.number = true -- Show the line number in the gutter.
vim.opt.pumheight = 15 -- Maximum height of the auto complete floating window
vim.opt.relativenumber = true -- Show the relative line numbers
vim.opt.sidescrolloff = 8 -- Side scrolling leadoff to keep the cursor a few characters from the screen edge instead of going all the way to it
vim.opt.shiftround = true -- Round indentation to shiftwidth
vim.opt.shiftwidth = 4 -- Number of spaces a tab counts for when converting tabs to spaces
vim.opt.shortmess = 'at' -- Abbreviations and truncation of cmd messages
vim.opt.showmatch = true -- Show matching bracket
vim.opt.sidescrolloff = 8 -- Side scrolling leadoff to keep the cursor a few characters from the screen edge instead of going all the way to it
vim.opt.signcolumn = 'yes' -- Always show the gutter
vim.opt.smartcase = true -- Keeps searches Case-insensitive until the search has an upper case character
vim.opt.smartindent = true -- Attempt to insert indentation to fit traditional languages.

View File

@@ -1,26 +0,0 @@
local function lsp_status()
local attached_clients = vim.lsp.get_clients({ bufnr = 0 })
if #attached_clients == 0 then
return ''
end
local names = vim.iter(attached_clients)
:map(function (client)
local name = client.name:gsub('language.server', 'ls')
return name
end)
:totable()
return '[' .. table.concat(names, ', ') .. ']'
end
function _G.statusline()
return table.concat({
'%f',
'%h%w%m%r',
'%=',
lsp_status(),
' %-14(%l,%c%V%)',
'%P',
}, ' ')
end
vim.o.statusline = '%{%v:lua._G.statusline()%}'