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:
David Ibia
2024-01-03 01:44:36 +01:00
parent 68421c4615
commit 6aa492bca8
7 changed files with 100 additions and 6 deletions

View 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

View File

@@ -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({

View 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 = "🐍"