Skip to content

Commit

Permalink
Add github copilot. Fix issue with lua and vim global
Browse files Browse the repository at this point in the history
 * and add a couple more smaller vim plugins
  • Loading branch information
cpow committed Dec 12, 2022
1 parent 7b2653c commit ad54036
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lua/core/plugin_config/copilot.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--highlight gray
--highlight gray guifg=#5c6370
vim.cmd[[highlight CopilotSuggestion ctermfg=8 guifg=white guibg=#5c6370]]
1 change: 1 addition & 0 deletions lua/core/plugin_config/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ require("core.plugin_config.telescope")
require("core.plugin_config.vim-test")
require("core.plugin_config.lsp_config")
require("core.plugin_config.gitsigns")
require("core.plugin_config.copilot")
15 changes: 14 additions & 1 deletion lua/core/plugin_config/lsp_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,20 @@ local on_attach = function(_, _)
end

require("lspconfig").sumneko_lua.setup {
on_attach = on_attach
on_attach = on_attach,
settings = {
Lua = {
diagnostics = {
globals = { "vim" },
},
workspace = {
library = {
[vim.fn.expand "$VIMRUNTIME/lua"] = true,
[vim.fn.stdpath "config" .. "/lua"] = true,
},
},
},
}
}

require("lspconfig").solargraph.setup {
Expand Down
4 changes: 4 additions & 0 deletions lua/core/plugin_config/vim-test.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
vim.cmd [[
let test#strategy = "vimux"
]]

vim.keymap.set('n', '<leader>t', ':TestNearest<CR>')
vim.keymap.set('n', '<leader>T', ':TestFile<CR>')
3 changes: 3 additions & 0 deletions lua/core/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ return require('packer').startup(function(use)
use 'bluz71/vim-nightfly-colors'
use 'vim-test/vim-test'
use 'lewis6991/gitsigns.nvim'
use 'preservim/vimux'
use 'christoomey/vim-tmux-navigator'
use 'github/copilot.vim'

use {
"williamboman/mason.nvim",
Expand Down

0 comments on commit ad54036

Please sign in to comment.