mirror of
https://github.com/genebean/dots.git
synced 2026-03-27 09:27:44 -04:00
rearrange some stuff, switch themes
This commit is contained in:
parent
2af59c0072
commit
0f11ababe4
23 changed files with 183 additions and 155 deletions
|
|
@ -119,7 +119,7 @@ in {
|
||||||
end
|
end
|
||||||
|
|
||||||
-- load additional settings
|
-- load additional settings
|
||||||
require("config.keymaps")
|
require("config.vim-options")
|
||||||
require("lazy").setup("plugins")
|
require("lazy").setup("plugins")
|
||||||
|
|
||||||
-- tell sqlite.lua where to find the bits it needs
|
-- tell sqlite.lua where to find the bits it needs
|
||||||
|
|
|
||||||
|
|
@ -12,3 +12,6 @@ vim.opt.shiftwidth = 2
|
||||||
vim.opt.shiftround = true
|
vim.opt.shiftround = true
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>h", ":nohlsearch<CR>")
|
vim.keymap.set("n", "<leader>h", ":nohlsearch<CR>")
|
||||||
|
|
||||||
|
vim.wo.relativenumber = true
|
||||||
|
|
||||||
|
|
@ -3,6 +3,6 @@ return {
|
||||||
lazy = false,
|
lazy = false,
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
config = function()
|
config = function()
|
||||||
vim.cmd.colorscheme "dracula"
|
vim.cmd.colorscheme("dracula")
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
@ -29,4 +29,3 @@ return {
|
||||||
alpha.setup(dashboard.opts)
|
alpha.setup(dashboard.opts)
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,6 @@ return {
|
||||||
lazy = false,
|
lazy = false,
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
config = function()
|
config = function()
|
||||||
vim.cmd.colorscheme "catppuccin"
|
vim.cmd.colorscheme("catppuccin")
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
58
modules/home-manager/files/nvim/lua/plugins/lsp-config.lua
Normal file
58
modules/home-manager/files/nvim/lua/plugins/lsp-config.lua
Normal file
|
|
@ -0,0 +1,58 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
config = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"williamboman/mason-lspconfig.nvim",
|
||||||
|
config = function()
|
||||||
|
require("mason-lspconfig").setup({
|
||||||
|
ensure_installed = {
|
||||||
|
"lua_ls", -- lua
|
||||||
|
"nil_ls", -- nix
|
||||||
|
"puppet", -- puppet
|
||||||
|
"ruff_lsp", -- python
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
config = function()
|
||||||
|
local on_attach = function(_, _)
|
||||||
|
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, {})
|
||||||
|
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, {})
|
||||||
|
|
||||||
|
vim.keymap.set("n", "gd", vim.lsp.buf.definition, {})
|
||||||
|
vim.keymap.set("n", "gi", vim.lsp.buf.implementation, {})
|
||||||
|
vim.keymap.set("n", "gr", require("telescope.builtin").lsp_references, {})
|
||||||
|
vim.keymap.set("n", "K", vim.lsp.buf.hover, {})
|
||||||
|
end
|
||||||
|
|
||||||
|
local lspconfig = require("lspconfig")
|
||||||
|
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
|
|
||||||
|
lspconfig.lua_ls.setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
on_attach = on_attach,
|
||||||
|
settings = { Lua = { diagnostics = { globals = { "vim" } } } },
|
||||||
|
})
|
||||||
|
|
||||||
|
lspconfig.nil_ls.setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
on_attach = on_attach,
|
||||||
|
})
|
||||||
|
|
||||||
|
local puppet_languageserver = vim.fn.expand(
|
||||||
|
"$HOME/.local/share/nvim/mason/packages/puppet-editor-services/libexec/puppet-languageserver"
|
||||||
|
)
|
||||||
|
|
||||||
|
lspconfig.puppet.setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
on_attach = on_attach,
|
||||||
|
cmd = { puppet_languageserver },
|
||||||
|
})
|
||||||
|
lspconfig.ruff_lsp.setup({ on_attach = on_attach })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
return {
|
return {
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
config = function ()
|
config = function()
|
||||||
require('lualine').setup {
|
require("lualine").setup({
|
||||||
options = {
|
options = {
|
||||||
icons_enabled = true,
|
icons_enabled = true,
|
||||||
theme = 'dracula-nvim',
|
-- theme = "dracula-nvim",
|
||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
lualine_a = {
|
lualine_a = {
|
||||||
{
|
{
|
||||||
'filename',
|
"filename",
|
||||||
path = 1,
|
path = 1,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
})
|
||||||
end
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
return {
|
|
||||||
"williamboman/mason-lspconfig.nvim",
|
|
||||||
config = function()
|
|
||||||
require("mason-lspconfig").setup({
|
|
||||||
ensure_installed = {
|
|
||||||
"lua_ls", -- lua
|
|
||||||
"nil_ls", -- nix
|
|
||||||
"puppet", -- puppet
|
|
||||||
"ruff_lsp", -- python
|
|
||||||
}
|
|
||||||
})
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
return {
|
|
||||||
"jay-babu/mason-null-ls.nvim",
|
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
|
||||||
dependencies = {
|
|
||||||
"williamboman/mason.nvim",
|
|
||||||
"nvimtools/none-ls.nvim",
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("mason-null-ls").setup({
|
|
||||||
ensure_installed = {
|
|
||||||
"prettier", -- HTML, JS, JSON, etc.
|
|
||||||
"ruff", -- Pyhton
|
|
||||||
"stylua", -- LUA
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
return { "williamboman/mason.nvim", config = true }
|
|
||||||
|
|
@ -7,19 +7,22 @@ return {
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
"MunifTanjim/nui.nvim",
|
"MunifTanjim/nui.nvim",
|
||||||
},
|
},
|
||||||
config = function ()
|
config = function()
|
||||||
vim.g.loaded_netrw = 1
|
vim.g.loaded_netrw = 1
|
||||||
vim.g.loaded_netrwPlugin = 1
|
vim.g.loaded_netrwPlugin = 1
|
||||||
vim.keymap.set('n', '<C-n>', ':Neotree toggle<CR>', {})
|
vim.keymap.set("n", "<C-n>", ":Neotree toggle<CR>", {})
|
||||||
require("neo-tree").setup({
|
require("neo-tree").setup({
|
||||||
filesystem = {
|
filesystem = {
|
||||||
hijack_netrw_behavior = "open_default"
|
follow_current_file = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
hijack_netrw_behavior = "open_default",
|
||||||
},
|
},
|
||||||
follow_current_file = { enabled = true },
|
follow_current_file = { enabled = true },
|
||||||
source_selector = {
|
source_selector = {
|
||||||
winbar = true,
|
winbar = true,
|
||||||
statusline = false
|
statusline = false,
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
end
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,43 @@
|
||||||
return {
|
return {
|
||||||
"nvimtools/none-ls.nvim",
|
{
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
"jay-babu/mason-null-ls.nvim",
|
||||||
config = function()
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
local null_ls = require("null-ls")
|
dependencies = {
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
"nvimtools/none-ls.nvim",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("mason-null-ls").setup({
|
||||||
|
ensure_installed = {
|
||||||
|
"prettier", -- HTML, JS, JSON, etc.
|
||||||
|
"ruff", -- Pyhton
|
||||||
|
"stylua", -- LUA
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
-- none-ls replaces null_ls... it's weird
|
||||||
|
"nvimtools/none-ls.nvim",
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
config = function()
|
||||||
|
local null_ls = require("null-ls")
|
||||||
|
|
||||||
null_ls.setup({
|
null_ls.setup({
|
||||||
sources = {
|
sources = {
|
||||||
null_ls.builtins.completion.spell,
|
null_ls.builtins.completion.spell,
|
||||||
null_ls.builtins.diagnostics.puppet_lint,
|
null_ls.builtins.diagnostics.puppet_lint,
|
||||||
null_ls.builtins.diagnostics.rubocop,
|
null_ls.builtins.diagnostics.rubocop,
|
||||||
null_ls.builtins.diagnostics.ruff,
|
null_ls.builtins.diagnostics.ruff,
|
||||||
null_ls.builtins.formatting.prettier,
|
null_ls.builtins.formatting.prettier,
|
||||||
null_ls.builtins.formatting.puppet_lint,
|
null_ls.builtins.formatting.puppet_lint,
|
||||||
null_ls.builtins.formatting.rubocop,
|
null_ls.builtins.formatting.rubocop,
|
||||||
null_ls.builtins.formatting.ruff_format,
|
null_ls.builtins.formatting.ruff_format,
|
||||||
null_ls.builtins.formatting.stylua,
|
null_ls.builtins.formatting.stylua,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>gf", vim.lsp.buf.format, {})
|
vim.keymap.set("n", "<leader>gf", vim.lsp.buf.format, {})
|
||||||
end,
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
return {
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
config = function()
|
|
||||||
local on_attach = function(_, _)
|
|
||||||
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, {})
|
|
||||||
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, {})
|
|
||||||
|
|
||||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, {})
|
|
||||||
vim.keymap.set("n", "gi", vim.lsp.buf.implementation, {})
|
|
||||||
vim.keymap.set("n", "gr", require("telescope.builtin").lsp_references, {})
|
|
||||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, {})
|
|
||||||
end
|
|
||||||
|
|
||||||
local lspconfig = require("lspconfig")
|
|
||||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
|
||||||
|
|
||||||
lspconfig.lua_ls.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
|
||||||
settings = { Lua = { diagnostics = { globals = { "vim" } } } },
|
|
||||||
})
|
|
||||||
|
|
||||||
lspconfig.nil_ls.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
|
||||||
})
|
|
||||||
|
|
||||||
local puppet_languageserver =
|
|
||||||
vim.fn.expand("$HOME/.local/share/nvim/mason/packages/puppet-editor-services/libexec/puppet-languageserver")
|
|
||||||
|
|
||||||
lspconfig.puppet.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
|
||||||
cmd = { puppet_languageserver },
|
|
||||||
})
|
|
||||||
lspconfig.ruff_lsp.setup({ on_attach = on_attach })
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
@ -1 +1,4 @@
|
||||||
return { "nvim-tree/nvim-web-devicons", config = true }
|
return {
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
config = true,
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
return {
|
|
||||||
"nvim-telescope/telescope-cheat.nvim",
|
|
||||||
dependencies = {
|
|
||||||
"kkharji/sqlite.lua",
|
|
||||||
"nvim-telescope/telescope.nvim",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
return { "nvim-telescope/telescope-symbols.nvim" }
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
return {
|
|
||||||
"nvim-telescope/telescope-ui-select.nvim",
|
|
||||||
}
|
|
||||||
|
|
@ -1,29 +1,40 @@
|
||||||
return {
|
return {
|
||||||
"nvim-telescope/telescope.nvim",
|
{
|
||||||
tag = "0.1.5",
|
"nvim-telescope/telescope.nvim",
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
tag = "0.1.5",
|
||||||
config = function()
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
-- This is your opts table
|
config = function()
|
||||||
require("telescope").setup({
|
-- This is your opts table
|
||||||
extensions = {
|
require("telescope").setup({
|
||||||
["ui-select"] = {
|
extensions = {
|
||||||
require("telescope.themes").get_dropdown({
|
["ui-select"] = {
|
||||||
-- even more opts
|
require("telescope.themes").get_dropdown({
|
||||||
}),
|
-- even more opts
|
||||||
|
}),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
})
|
||||||
})
|
|
||||||
|
|
||||||
-- load_extension, somewhere after setup function:
|
-- load_extension, somewhere after setup function:
|
||||||
require("telescope").load_extension("cheat")
|
require("telescope").load_extension("cheat")
|
||||||
require("telescope").load_extension("ui-select")
|
require("telescope").load_extension("ui-select")
|
||||||
|
|
||||||
local builtin = require("telescope.builtin")
|
local builtin = require("telescope.builtin")
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>ts", ":Telescope<CR>")
|
vim.keymap.set("n", "<leader>ts", ":Telescope<CR>")
|
||||||
vim.keymap.set("n", "<C-p>", builtin.find_files, {})
|
vim.keymap.set("n", "<C-p>", builtin.find_files, {})
|
||||||
vim.keymap.set("n", "<leader><leader>", builtin.oldfiles, {})
|
vim.keymap.set("n", "<leader><leader>", builtin.oldfiles, {})
|
||||||
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {})
|
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {})
|
||||||
vim.keymap.set("n", "<leader>fh", builtin.help_tags, {})
|
vim.keymap.set("n", "<leader>fh", builtin.help_tags, {})
|
||||||
end,
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nvim-telescope/telescope-cheat.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"kkharji/sqlite.lua",
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ "nvim-telescope/telescope-symbols.nvim" },
|
||||||
|
{ "nvim-telescope/telescope-ui-select.nvim" },
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
return {
|
||||||
|
"folke/todo-comments.nvim",
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
opts = {
|
||||||
|
-- your configuration comes here
|
||||||
|
-- or leave it empty to use the default settings
|
||||||
|
-- refer to the configuration section below
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
return {
|
return {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
config = function ()
|
config = function()
|
||||||
local config = require('nvim-treesitter.configs')
|
local config = require("nvim-treesitter.configs")
|
||||||
config.setup {
|
config.setup({
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
highlight = { enable = true },
|
highlight = { enable = true },
|
||||||
indent = { enable = true },
|
indent = { enable = true },
|
||||||
|
|
@ -48,6 +48,6 @@ return {
|
||||||
"xml",
|
"xml",
|
||||||
"yaml",
|
"yaml",
|
||||||
},
|
},
|
||||||
}
|
})
|
||||||
end
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
return {
|
return {
|
||||||
"folke/trouble.nvim",
|
"folke/trouble.nvim",
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
config = true,
|
config = true,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
return {
|
return {
|
||||||
"christoomey/vim-tmux-navigator"
|
"christoomey/vim-tmux-navigator",
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1 +1,4 @@
|
||||||
return { "folke/which-key.nvim", config = true }
|
return {
|
||||||
|
"folke/which-key.nvim",
|
||||||
|
config = true,
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue