mirror of
https://github.com/boxpositron/absolute-vim.git
synced 2026-02-28 11:40:36 +00:00
chore(.gitignore): update .gitignore file to include Lua-related files and directories
feat(gitignore.lua): add Lua script to generate .gitignore file using gitignore.nvim plugin chore(lsp-config.lua): comment out configuration for pyright server feat(poet-v.lua): add poet-v plugin for managing Python virtual environments
This commit is contained in:
26
lua/absolute/after/gitignore.lua
Normal file
26
lua/absolute/after/gitignore.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
local gitignore = require("gitignore")
|
||||
|
||||
function GetProjectRoot()
|
||||
local git_root = vim.fn.systemlist("git rev-parse --show-toplevel")[1]
|
||||
if git_root == nil then
|
||||
return vim.fn.getcwd()
|
||||
else
|
||||
return git_root
|
||||
end
|
||||
end
|
||||
|
||||
-- Keymaps
|
||||
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
opts.desc = "Generate .gitignore"
|
||||
|
||||
vim.keymap.set("n", "<leader>gi", function()
|
||||
local path = GetProjectRoot()
|
||||
|
||||
gitignore.generate(path)
|
||||
end, opts)
|
||||
|
||||
-- Global Settings
|
||||
|
||||
vim.g.gitignore_nvim_overwrite = true
|
||||
@@ -111,11 +111,11 @@ lspconfig["emmet_ls"].setup({
|
||||
filetypes = { "html", "typescriptreact", "javascriptreact", "css", "sass", "scss", "less", "svelte" },
|
||||
})
|
||||
|
||||
-- configure python server
|
||||
lspconfig["pyright"].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
-- -- configure python server
|
||||
-- lspconfig["pyright"].setup({
|
||||
-- capabilities = capabilities,
|
||||
-- on_attach = on_attach,
|
||||
-- })
|
||||
|
||||
-- configure python lsp
|
||||
lspconfig["pylsp"].setup({
|
||||
|
||||
4
lua/absolute/after/poet-v.lua
Normal file
4
lua/absolute/after/poet-v.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
vim.g.poetv_executables = { "poetry", "pipenv" }
|
||||
vim.g.poetv_auto_activate = 1
|
||||
vim.g.poetv_set_environment = 1
|
||||
vim.g.poetv_statusline_symbol = "🐍"
|
||||
9
lua/absolute/plugins/gitignore.lua
Normal file
9
lua/absolute/plugins/gitignore.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
"wintermute-cell/gitignore.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("absolute.after.gitignore")
|
||||
end
|
||||
}
|
||||
7
lua/absolute/plugins/poet-v.lua
Normal file
7
lua/absolute/plugins/poet-v.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
"petobens/poet-v",
|
||||
config = function()
|
||||
require("absolute.after.poet-v")
|
||||
end,
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user