mirror of
https://github.com/don-philipe/dotfiles.git
synced 2026-03-31 02:33:11 +02:00
Compare commits
3 Commits
d6707b3dff
...
434df00be3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
434df00be3 | ||
|
|
6a82e1dc6f | ||
|
|
081a2f5498 |
@@ -1,3 +1,6 @@
|
|||||||
|
-- utilities functions
|
||||||
|
require("utils")
|
||||||
|
|
||||||
require("config.remap")
|
require("config.remap")
|
||||||
require("config.set")
|
require("config.set")
|
||||||
require("config.commands")
|
require("config.commands")
|
||||||
@@ -11,7 +14,6 @@ require("config.lazy")
|
|||||||
|
|
||||||
-- plugins
|
-- plugins
|
||||||
require("config.cmp")
|
require("config.cmp")
|
||||||
require("config.gen-private")
|
|
||||||
require("config.lsp")
|
require("config.lsp")
|
||||||
require("config.mason")
|
require("config.mason")
|
||||||
require("config.treesitter")
|
require("config.treesitter")
|
||||||
@@ -22,6 +24,8 @@ require("config.telescope")
|
|||||||
require("config.indentline")
|
require("config.indentline")
|
||||||
require("config.redmine")
|
require("config.redmine")
|
||||||
require("config.diffview")
|
require("config.diffview")
|
||||||
|
require("config.dap")
|
||||||
|
require("config.parrot")
|
||||||
|
|
||||||
-- for some reason this must be placed in init.lua file
|
-- for some reason this must be placed in init.lua file
|
||||||
-- it doesn't work in any lua/config/*.lua files
|
-- it doesn't work in any lua/config/*.lua files
|
||||||
|
|||||||
@@ -21,3 +21,47 @@ vim.api.nvim_create_autocmd('Filetype', {
|
|||||||
},
|
},
|
||||||
command = 'setlocal shiftwidth=2 tabstop=2 expandtab'
|
command = 'setlocal shiftwidth=2 tabstop=2 expandtab'
|
||||||
})
|
})
|
||||||
|
if vim.filetype then
|
||||||
|
vim.filetype.add({
|
||||||
|
pattern = {
|
||||||
|
[".*/defaults/.*%.ya?ml"] = "yaml.ansible",
|
||||||
|
[".*/host_vars/.*%.ya?ml"] = "yaml.ansible",
|
||||||
|
[".*/group_vars/.*%.ya?ml"] = "yaml.ansible",
|
||||||
|
[".*/group_vars/.*/.*%.ya?ml"] = "yaml.ansible",
|
||||||
|
[".*/playbook.*%.ya?ml"] = "yaml.ansible",
|
||||||
|
[".*/playbooks/.*%.ya?ml"] = "yaml.ansible",
|
||||||
|
[".*/roles/.*/tasks/.*%.ya?ml"] = "yaml.ansible",
|
||||||
|
[".*/roles/.*/handlers/.*%.ya?ml"] = "yaml.ansible",
|
||||||
|
[".*/tasks/.*%.ya?ml"] = "yaml.ansible",
|
||||||
|
[".*/molecule/.*%.ya?ml"] = "yaml.ansible",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
else
|
||||||
|
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
|
||||||
|
pattern = {
|
||||||
|
"*/defaults/*.yml",
|
||||||
|
"*/defaults/*.yaml",
|
||||||
|
"*/host_vars/*.yml",
|
||||||
|
"*/host_vars/*.yaml",
|
||||||
|
"*/group_vars/*.yml",
|
||||||
|
"*/group_vars/*.yaml",
|
||||||
|
"*/group_vars/*/*.yml",
|
||||||
|
"*/group_vars/*/*.yaml",
|
||||||
|
"*/playbook*.yml",
|
||||||
|
"*/playbook*.yaml",
|
||||||
|
"*/playbooks/*.yml",
|
||||||
|
"*/playbooks/*.yaml",
|
||||||
|
"*/roles/*/tasks/*.yml",
|
||||||
|
"*/roles/*/tasks/*.yaml",
|
||||||
|
"*/roles/*/handlers/*.yml",
|
||||||
|
"*/roles/*/handlers/*.yaml",
|
||||||
|
"*/tasks/*.yml",
|
||||||
|
"*/tasks/*.yaml",
|
||||||
|
"*/molecule/*.yml",
|
||||||
|
"*/molecule/*.yaml",
|
||||||
|
},
|
||||||
|
callback = function()
|
||||||
|
vim.bo.filetype = "yaml.ansible"
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|||||||
@@ -32,3 +32,10 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
|||||||
vim.keymap.set('n', '<F4>', '<cmd>lua vim.lsp.buf.code_action()<cr>', opts)
|
vim.keymap.set('n', '<F4>', '<cmd>lua vim.lsp.buf.code_action()<cr>', opts)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- helper plugin configuration
|
||||||
|
require'py_lsp'.setup{
|
||||||
|
host_python = '/usr/bin/python3',
|
||||||
|
default_venv_name = "venv",
|
||||||
|
language_server = "pylsp",
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
local ok, vars = pcall(require, 'config.gen-private')
|
|
||||||
if not ok then
|
|
||||||
print("Missing gen-private configuration file.")
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
{ "David-Kunz/gen.nvim",
|
|
||||||
opts = {
|
|
||||||
model = vars["model"],
|
|
||||||
host = vars["host"],
|
|
||||||
port = vars["port"],
|
|
||||||
https = vars["https"],
|
|
||||||
show_prompt = true,
|
|
||||||
debug = false,
|
|
||||||
|
|
||||||
-- https://github.com/David-Kunz/gen.nvim/issues/116
|
|
||||||
command = function(options)
|
|
||||||
local body = { model = options.model, stream = true }
|
|
||||||
local schema = "http"
|
|
||||||
if options.https then
|
|
||||||
schema = "https"
|
|
||||||
end
|
|
||||||
return "curl --silent --no-buffer -X POST " .. schema .. "://" .. options.host .. ":" .. options.port .. "/api/chat -d $body"
|
|
||||||
end,
|
|
||||||
}},
|
|
||||||
}
|
|
||||||
@@ -2,4 +2,6 @@ return {
|
|||||||
{'neovim/nvim-lspconfig', tag = 'v1.7.0'}, -- pin to a version thats compatible with nvim < 0.10
|
{'neovim/nvim-lspconfig', tag = 'v1.7.0'}, -- pin to a version thats compatible with nvim < 0.10
|
||||||
{'hrsh7th/cmp-nvim-lsp'},
|
{'hrsh7th/cmp-nvim-lsp'},
|
||||||
{'hrsh7th/nvim-cmp'},
|
{'hrsh7th/nvim-cmp'},
|
||||||
|
-- helper plugins
|
||||||
|
{'HallerPatrick/py_lsp.nvim'},
|
||||||
}
|
}
|
||||||
|
|||||||
4
.config/nvim/lua/plugins/parrot.lua
Normal file
4
.config/nvim/lua/plugins/parrot.lua
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
return {
|
||||||
|
"frankroeder/parrot.nvim",
|
||||||
|
dependencies = { "ibhagwan/fzf-lua", "nvim-lua/plenary.nvim" },
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user