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
|
||||
|
||||
-- load additional settings
|
||||
require("config.keymaps")
|
||||
require("config.vim-options")
|
||||
require("lazy").setup("plugins")
|
||||
|
||||
-- tell sqlite.lua where to find the bits it needs
|
||||
|
|
|
|||
|
|
@ -12,3 +12,6 @@ vim.opt.shiftwidth = 2
|
|||
vim.opt.shiftround = true
|
||||
|
||||
vim.keymap.set("n", "<leader>h", ":nohlsearch<CR>")
|
||||
|
||||
vim.wo.relativenumber = true
|
||||
|
||||
|
|
@ -3,6 +3,6 @@ return {
|
|||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
vim.cmd.colorscheme "dracula"
|
||||
vim.cmd.colorscheme("dracula")
|
||||
end,
|
||||
}
|
||||
|
|
@ -29,4 +29,3 @@ return {
|
|||
alpha.setup(dashboard.opts)
|
||||
end,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,6 @@ return {
|
|||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
vim.cmd.colorscheme "catppuccin"
|
||||
vim.cmd.colorscheme("catppuccin")
|
||||
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 {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
config = function ()
|
||||
require('lualine').setup {
|
||||
config = function()
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'dracula-nvim',
|
||||
-- theme = "dracula-nvim",
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {
|
||||
{
|
||||
'filename',
|
||||
"filename",
|
||||
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",
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
config = function ()
|
||||
config = function()
|
||||
vim.g.loaded_netrw = 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({
|
||||
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 = {
|
||||
winbar = true,
|
||||
statusline = false
|
||||
}
|
||||
statusline = false,
|
||||
},
|
||||
})
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,43 @@
|
|||
return {
|
||||
"nvimtools/none-ls.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
config = function()
|
||||
local null_ls = require("null-ls")
|
||||
{
|
||||
"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,
|
||||
},
|
||||
{
|
||||
-- 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({
|
||||
sources = {
|
||||
null_ls.builtins.completion.spell,
|
||||
null_ls.builtins.diagnostics.puppet_lint,
|
||||
null_ls.builtins.diagnostics.rubocop,
|
||||
null_ls.builtins.diagnostics.ruff,
|
||||
null_ls.builtins.formatting.prettier,
|
||||
null_ls.builtins.formatting.puppet_lint,
|
||||
null_ls.builtins.formatting.rubocop,
|
||||
null_ls.builtins.formatting.ruff_format,
|
||||
null_ls.builtins.formatting.stylua,
|
||||
},
|
||||
})
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
null_ls.builtins.completion.spell,
|
||||
null_ls.builtins.diagnostics.puppet_lint,
|
||||
null_ls.builtins.diagnostics.rubocop,
|
||||
null_ls.builtins.diagnostics.ruff,
|
||||
null_ls.builtins.formatting.prettier,
|
||||
null_ls.builtins.formatting.puppet_lint,
|
||||
null_ls.builtins.formatting.rubocop,
|
||||
null_ls.builtins.formatting.ruff_format,
|
||||
null_ls.builtins.formatting.stylua,
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>gf", vim.lsp.buf.format, {})
|
||||
end,
|
||||
vim.keymap.set("n", "<leader>gf", vim.lsp.buf.format, {})
|
||||
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 {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
tag = "0.1.5",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
config = function()
|
||||
-- This is your opts table
|
||||
require("telescope").setup({
|
||||
extensions = {
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown({
|
||||
-- even more opts
|
||||
}),
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
tag = "0.1.5",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
config = function()
|
||||
-- This is your opts table
|
||||
require("telescope").setup({
|
||||
extensions = {
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown({
|
||||
-- even more opts
|
||||
}),
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
-- load_extension, somewhere after setup function:
|
||||
require("telescope").load_extension("cheat")
|
||||
require("telescope").load_extension("ui-select")
|
||||
-- load_extension, somewhere after setup function:
|
||||
require("telescope").load_extension("cheat")
|
||||
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", "<C-p>", builtin.find_files, {})
|
||||
vim.keymap.set("n", "<leader><leader>", builtin.oldfiles, {})
|
||||
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {})
|
||||
vim.keymap.set("n", "<leader>fh", builtin.help_tags, {})
|
||||
end,
|
||||
vim.keymap.set("n", "<leader>ts", ":Telescope<CR>")
|
||||
vim.keymap.set("n", "<C-p>", builtin.find_files, {})
|
||||
vim.keymap.set("n", "<leader><leader>", builtin.oldfiles, {})
|
||||
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {})
|
||||
vim.keymap.set("n", "<leader>fh", builtin.help_tags, {})
|
||||
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",
|
||||
build = ":TSUpdate",
|
||||
config = function ()
|
||||
local config = require('nvim-treesitter.configs')
|
||||
config.setup {
|
||||
config = function()
|
||||
local config = require("nvim-treesitter.configs")
|
||||
config.setup({
|
||||
auto_install = true,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
|
|
@ -48,6 +48,6 @@ return {
|
|||
"xml",
|
||||
"yaml",
|
||||
},
|
||||
}
|
||||
end
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
return {
|
||||
"folke/trouble.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
config = true,
|
||||
"folke/trouble.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
config = true,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
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