diff --git a/roles/neovim/files/init.lua b/roles/neovim/files/init.lua index 025c0d1..92cf997 100644 --- a/roles/neovim/files/init.lua +++ b/roles/neovim/files/init.lua @@ -1,15 +1 @@ -return require('packer').startup(function(use) - use 'wbthomason/packer.nvim' - use { - 'monaqa/dial.nvim', - config = function () - vim.api.nvim_set_keymap("n", "", require("dial.map").inc_normal(), {noremap = true}) - vim.api.nvim_set_keymap("n", "", require("dial.map").dec_normal(), {noremap = true}) - vim.api.nvim_set_keymap("v", "", require("dial.map").inc_visual(), {noremap = true}) - vim.api.nvim_set_keymap("v", "", require("dial.map").dec_visual(), {noremap = true}) - vim.api.nvim_set_keymap("v", "g", require("dial.map").inc_gvisual(), {noremap = true}) - vim.api.nvim_set_keymap("v", "g", require("dial.map").dec_gvisual(), {noremap = true}) - end - - } -end) +require('plugins') diff --git a/roles/neovim/files/lua/plugins.lua b/roles/neovim/files/lua/plugins.lua new file mode 100644 index 0000000..5be29a5 --- /dev/null +++ b/roles/neovim/files/lua/plugins.lua @@ -0,0 +1,7 @@ +return require('packer').startup(function() + --- Packer can manage itself + use 'wbthomason/packer.nvim' + + -- Colorscheme + use 'gruvbox-community/gruvbox' +end) diff --git a/roles/neovim/files/plugin/gruvbox.lua b/roles/neovim/files/plugin/gruvbox.lua new file mode 100644 index 0000000..cd896be --- /dev/null +++ b/roles/neovim/files/plugin/gruvbox.lua @@ -0,0 +1 @@ +vim.cmd[[ colorscheme gruvbox ]] diff --git a/roles/neovim/tasks/main.yml b/roles/neovim/tasks/main.yml index 458cdb9..6953ce3 100644 --- a/roles/neovim/tasks/main.yml +++ b/roles/neovim/tasks/main.yml @@ -18,17 +18,25 @@ become: true apt: name: neovim -- name: Create pack directory - file: - path: ~/.config/nvim/pack/packer/start - state: directory - recurse: true -- name: Clone packer repository - git: - repo: https://github.com/wbthomason/packer.nvim - dest: ~/.config/nvim/pack/packer/start/packer.nvim - depth: 1 - name: Copy init.lua copy: src: "{{ role_path }}/files/init.lua" dest: ~/.config/nvim/init.lua +- name: Create plugin directory + file: + path: ~/.config/nvim/plugin + state: directory + recurse: true +- name: Copy plugin configuration files + copy: + src: "{{ role_path }}/files/plugin/" + dest: ~/.config/nvim/plugin +- name: Create lua directory + file: + path: ~/.config/nvim/lua + state: directory + recurse: true +- name: Copy lua files + copy: + src: "{{ role_path }}/files/lua/" + dest: ~/.config/nvim/lua