diff options
| author | Thomas Schmucker <ts@its1.de> | 2026-02-21 13:00:37 +0100 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2026-02-21 13:00:37 +0100 |
| commit | b3da492bf2575ce82f68ed18181d68bd1ee1853f (patch) | |
| tree | 85304e32911202d8b5cf212f7c35e630d158c1b1 /nvim/lua | |
| parent | eefea590f72bf5fa1a94ff73433125fa0a658179 (diff) | |
| download | dotfiles-b3da492bf2575ce82f68ed18181d68bd1ee1853f.tar.gz dotfiles-b3da492bf2575ce82f68ed18181d68bd1ee1853f.tar.bz2 dotfiles-b3da492bf2575ce82f68ed18181d68bd1ee1853f.zip | |
neovim: aktiviere Github-Copilot
Diffstat (limited to 'nvim/lua')
| -rw-r--r-- | nvim/lua/config/keymaps.lua | 5 | ||||
| -rw-r--r-- | nvim/lua/plugins/copilot.lua | 26 |
2 files changed, 30 insertions, 1 deletions
diff --git a/nvim/lua/config/keymaps.lua b/nvim/lua/config/keymaps.lua index 2c1d383..72030c4 100644 --- a/nvim/lua/config/keymaps.lua +++ b/nvim/lua/config/keymaps.lua | |||
| @@ -72,6 +72,11 @@ function M.gitsigns() | |||
| 72 | map("n", "<leader>tb", require("gitsigns").toggle_current_line_blame) | 72 | map("n", "<leader>tb", require("gitsigns").toggle_current_line_blame) |
| 73 | end | 73 | end |
| 74 | 74 | ||
| 75 | function M.copilot() | ||
| 76 | map("n", "<leader>ce", ":Copilot enable<CR>") | ||
| 77 | map("n", "<leader>cd", ":Copilot disable<CR>") | ||
| 78 | end | ||
| 79 | |||
| 75 | function M.global() | 80 | function M.global() |
| 76 | local opts = { | 81 | local opts = { |
| 77 | silent = true, | 82 | silent = true, |
diff --git a/nvim/lua/plugins/copilot.lua b/nvim/lua/plugins/copilot.lua index bcd4480..392e831 100644 --- a/nvim/lua/plugins/copilot.lua +++ b/nvim/lua/plugins/copilot.lua | |||
| @@ -1,4 +1,28 @@ | |||
| 1 | return { | 1 | return { |
| 2 | "github/copilot.vim", | 2 | "github/copilot.vim", |
| 3 | enabled = false, | 3 | -- enabled = false, |
| 4 | |||
| 5 | event = "InsertEnter", | ||
| 6 | config = function() | ||
| 7 | vim.g.copilot_filetypes = { | ||
| 8 | ["*"] = false, -- Standardmäßig aus, ... | ||
| 9 | |||
| 10 | -- außer für diese Dateitypen: | ||
| 11 | lua = true, | ||
| 12 | python = true, | ||
| 13 | javascript = true, | ||
| 14 | typescript = true, | ||
| 15 | go = true, | ||
| 16 | cpp = true, | ||
| 17 | c = true, | ||
| 18 | rust = true, | ||
| 19 | java = true, | ||
| 20 | html = true, | ||
| 21 | css = true, | ||
| 22 | markdown = true, | ||
| 23 | } | ||
| 24 | |||
| 25 | local keymaps = require("config.keymaps") | ||
| 26 | keymaps.copilot() | ||
| 27 | end, | ||
| 4 | } | 28 | } |
