feat: add my devstack.lua plugin
This commit is contained in:
parent
3338d39206
commit
4e3efe8d22
13
init.lua
13
init.lua
|
|
@ -973,12 +973,13 @@ require('lazy').setup({
|
|||
-- Here are some example plugins that I've included in the Kickstart repository.
|
||||
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
||||
--
|
||||
-- require 'kickstart.plugins.debug',
|
||||
-- require 'kickstart.plugins.indent_line',
|
||||
-- require 'kickstart.plugins.lint',
|
||||
-- require 'kickstart.plugins.autopairs',
|
||||
-- require 'kickstart.plugins.neo-tree',
|
||||
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
||||
require 'kickstart.plugins.debug',
|
||||
require 'kickstart.plugins.indent_line',
|
||||
require 'kickstart.plugins.lint',
|
||||
require 'kickstart.plugins.autopairs',
|
||||
require 'kickstart.plugins.neo-tree',
|
||||
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
||||
-- require 'kickstart.plugins.devstack',
|
||||
|
||||
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
||||
-- This is the easiest way to modularize your config.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,151 @@
|
|||
-- lua/kickstart/plugins/devstack.lua
|
||||
return {
|
||||
-- Mason core + LSP glue
|
||||
{ 'williamboman/mason.nvim', build = ':MasonUpdate', config = true },
|
||||
{
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
dependencies = { 'williamboman/mason.nvim' },
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
-- LSP servers
|
||||
'basedpyright', -- Python
|
||||
'ruff_lsp', -- Python linter LSP
|
||||
'tsserver', -- TypeScript/JavaScript
|
||||
'rust_analyzer', -- Rust
|
||||
},
|
||||
automatic_installation = true,
|
||||
},
|
||||
},
|
||||
{
|
||||
-- Auto-install external tools on first start
|
||||
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
||||
dependencies = { 'williamboman/mason.nvim' },
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
-- Python
|
||||
'basedpyright',
|
||||
'ruff',
|
||||
'ruff-lsp',
|
||||
'black',
|
||||
-- TypeScript/JS
|
||||
'typescript-language-server',
|
||||
'prettierd',
|
||||
-- Rust
|
||||
'rust-analyzer',
|
||||
'codelldb',
|
||||
},
|
||||
auto_update = true,
|
||||
run_on_start = true,
|
||||
start_delay = 3000,
|
||||
debounce_hours = 6,
|
||||
},
|
||||
},
|
||||
|
||||
-- LSP configs
|
||||
{
|
||||
'neovim/nvim-lspconfig',
|
||||
config = function()
|
||||
local lsp = require 'lspconfig'
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
local ok_cmp, cmp = pcall(require, 'cmp_nvim_lsp')
|
||||
if ok_cmp then
|
||||
capabilities = cmp.default_capabilities(capabilities)
|
||||
end
|
||||
|
||||
-- Python: basedpyright + ruff_lsp
|
||||
lsp.basedpyright.setup { capabilities = capabilities }
|
||||
lsp.ruff_lsp.setup {
|
||||
capabilities = capabilities,
|
||||
on_attach = function(client)
|
||||
-- Let Ruff format/fix; disable hover if you prefer Pyright’s hover
|
||||
client.server_capabilities.hoverProvider = false
|
||||
end,
|
||||
}
|
||||
|
||||
-- TypeScript / JavaScript
|
||||
lsp.tsserver.setup { capabilities = capabilities }
|
||||
|
||||
-- Rust (use rustaceanvim below; comment that out if you prefer plain lsp)
|
||||
lsp.rust_analyzer.setup { capabilities = capabilities }
|
||||
end,
|
||||
},
|
||||
|
||||
-- Rust UX (recommended)
|
||||
{
|
||||
'mrcjkb/rustaceanvim',
|
||||
version = '^5',
|
||||
init = function()
|
||||
vim.g.rustaceanvim = {
|
||||
server = {
|
||||
settings = {
|
||||
['rust-analyzer'] = {
|
||||
cargo = { allFeatures = true },
|
||||
checkOnSave = { command = 'clippy' },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
-- Treesitter parsers preinstalled
|
||||
{
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ':TSUpdate',
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
'lua',
|
||||
'python',
|
||||
'typescript',
|
||||
'tsx',
|
||||
'javascript',
|
||||
'rust',
|
||||
'json',
|
||||
'toml',
|
||||
'yaml',
|
||||
'bash',
|
||||
'markdown',
|
||||
'markdown_inline',
|
||||
},
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
},
|
||||
config = function(_, opts)
|
||||
require('nvim-treesitter.configs').setup(opts)
|
||||
end,
|
||||
},
|
||||
|
||||
-- Codeium (AI pair programming)
|
||||
{
|
||||
'Exafunction/codeium.nvim',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'hrsh7th/nvim-cmp', -- if you’re using cmp (kickstart does)
|
||||
},
|
||||
config = function()
|
||||
require('codeium').setup {}
|
||||
-- After first start, run :Codeium Auth in Neovim to link your account.
|
||||
-- If you want Codeium suggestions inline + cmp source, ensure the cmp source is added (see below).
|
||||
end,
|
||||
},
|
||||
|
||||
-- Add Codeium to nvim-cmp sources (if your repo has a cmp config file already)
|
||||
{
|
||||
'hrsh7th/nvim-cmp',
|
||||
opts = function(_, opts)
|
||||
opts.sources = opts.sources or {}
|
||||
-- Prepend Codeium to increase its priority (optional)
|
||||
table.insert(opts.sources, 1, { name = 'codeium' })
|
||||
return opts
|
||||
end,
|
||||
},
|
||||
|
||||
-- LazyGit integration
|
||||
{
|
||||
'kdheepak/lazygit.nvim',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
keys = {
|
||||
{ '<leader>gg', '<cmd>LazyGit<cr>', desc = 'LazyGit' },
|
||||
},
|
||||
},
|
||||
}
|
||||
Loading…
Reference in New Issue