Compare commits
7 commits
6115ca4be2
...
2bbf7655c9
| Author | SHA1 | Date | |
|---|---|---|---|
| 2bbf7655c9 | |||
| a3353cc601 | |||
| f45918c93d | |||
| d300288799 | |||
| b663f3bb20 | |||
| 9183c29751 | |||
| f61a044c86 |
7 changed files with 23 additions and 75 deletions
|
|
@ -112,18 +112,10 @@
|
||||||
dest: '{{ xdg_config_dir }}/nvim/after/ftplugin/yaml.lua',
|
dest: '{{ xdg_config_dir }}/nvim/after/ftplugin/yaml.lua',
|
||||||
}
|
}
|
||||||
- { src: 'templates/nvim/init.lua.j2', dest: '{{ xdg_config_dir }}/nvim/init.lua' }
|
- { src: 'templates/nvim/init.lua.j2', dest: '{{ xdg_config_dir }}/nvim/init.lua' }
|
||||||
- {
|
|
||||||
src: 'templates/nvim/lua/auto-commands.lua.j2',
|
|
||||||
dest: '{{ xdg_config_dir }}/nvim/lua/auto-commands.lua',
|
|
||||||
}
|
|
||||||
- {
|
- {
|
||||||
src: 'templates/nvim/lua/lsp.lua.j2',
|
src: 'templates/nvim/lua/lsp.lua.j2',
|
||||||
dest: '{{ xdg_config_dir }}/nvim/lua/lsp.lua',
|
dest: '{{ xdg_config_dir }}/nvim/lua/lsp.lua',
|
||||||
}
|
}
|
||||||
- {
|
|
||||||
src: 'templates/nvim/lua/nvim-cmp.lua.j2',
|
|
||||||
dest: '{{ xdg_config_dir }}/nvim/lua/nvim-cmp.lua',
|
|
||||||
}
|
|
||||||
- {
|
- {
|
||||||
src: 'templates/nvim/lua/options.lua.j2',
|
src: 'templates/nvim/lua/options.lua.j2',
|
||||||
dest: '{{ xdg_config_dir }}/nvim/lua/options.lua',
|
dest: '{{ xdg_config_dir }}/nvim/lua/options.lua',
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
require('options')
|
require('options')
|
||||||
require('lsp')
|
require('lsp')
|
||||||
require('nvim-cmp')
|
|
||||||
require('auto-commands')
|
|
||||||
require('tree-sitter')
|
require('tree-sitter')
|
||||||
require('lua-line')
|
require('lua-line')
|
||||||
require('git-signs')
|
require('git-signs')
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
-- {{ ansible_managed }}
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('Filetype', {
|
|
||||||
pattern = 'TelescopeResults',
|
|
||||||
command = [[:setlocal nofoldenable]],
|
|
||||||
})
|
|
||||||
|
|
@ -68,22 +68,6 @@ nvim_lsp.ruff.setup({
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
nvim_lsp.pylsp.setup({
|
|
||||||
on_attach = on_attach,
|
|
||||||
capabilities = capabilities,
|
|
||||||
cmd = { 'pylsp', '--verbose' },
|
|
||||||
settings = {
|
|
||||||
pylsp = {
|
|
||||||
plugins = {
|
|
||||||
ruff = {
|
|
||||||
enabled = false -- now through ruff lsp
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
root_dir = python_root_dir
|
|
||||||
})
|
|
||||||
|
|
||||||
nvim_lsp.pyright.setup({
|
nvim_lsp.pyright.setup({
|
||||||
settings = {
|
settings = {
|
||||||
pyright = {
|
pyright = {
|
||||||
|
|
@ -120,12 +104,25 @@ cmp.setup({
|
||||||
|
|
||||||
formatting = {
|
formatting = {
|
||||||
format = function(entry, vim_item)
|
format = function(entry, vim_item)
|
||||||
vim_item.menu = string.format('[%s]', entry.source.source.client.name)
|
if entry.source.name == 'nvim_lsp' then
|
||||||
|
vim_item.menu = string.format('[%s]', entry.source.source.client.name)
|
||||||
|
else
|
||||||
|
vim_item.menu = string.format('[%s]', entry.source.name)
|
||||||
|
end
|
||||||
|
|
||||||
return vim_item
|
return vim_item
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
mapping = cmp.mapping.preset.insert({
|
mapping = cmp.mapping.preset.insert({
|
||||||
|
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||||
|
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||||
|
['<C-Space>'] = cmp.mapping.complete(),
|
||||||
|
['<C-e>'] = cmp.mapping.close(),
|
||||||
|
['<CR>'] = cmp.mapping.confirm {
|
||||||
|
behavior = cmp.ConfirmBehavior.Replace,
|
||||||
|
select = true,
|
||||||
|
},
|
||||||
['<Tab>'] = cmp.mapping(function(fallback)
|
['<Tab>'] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_next_item()
|
cmp.select_next_item()
|
||||||
|
|
@ -152,3 +149,10 @@ cmp.setup({
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
vim.diagnostic.config({
|
||||||
|
float = {
|
||||||
|
source = 'always',
|
||||||
|
border = border
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
-- {{ ansible_managed }}
|
|
||||||
|
|
||||||
local cmp = require('cmp')
|
|
||||||
|
|
||||||
cmp.setup {
|
|
||||||
mapping = {
|
|
||||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
|
||||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
|
||||||
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
|
||||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
|
||||||
['<C-Space>'] = cmp.mapping.complete(),
|
|
||||||
['<C-e>'] = cmp.mapping.close(),
|
|
||||||
['<CR>'] = cmp.mapping.confirm {
|
|
||||||
behavior = cmp.ConfirmBehavior.Replace,
|
|
||||||
select = true,
|
|
||||||
},
|
|
||||||
['<Tab>'] = function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_next_item()
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
['<S-Tab>'] = function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_prev_item()
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
sources = {
|
|
||||||
{ name = 'nvim_lsp' },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -51,13 +51,9 @@ vim.o.cursorline = true
|
||||||
-- theme related
|
-- theme related
|
||||||
vim.o.termguicolors = true
|
vim.o.termguicolors = true
|
||||||
|
|
||||||
-- enable statusbar
|
|
||||||
vim.o.laststatus = 2
|
|
||||||
vim.o.statusline = ' %F %m%r%w %= %{hostname()} %{strlen(&ft)?&ft:"none"} %{(&bomb?",BOM":"")} %{&ff} %l/%L %c %P'
|
|
||||||
|
|
||||||
-- use a dedicated file explorer
|
-- use a dedicated file explorer
|
||||||
vim.g.loaded_netrw = 1
|
vim.g.loaded_netrw = 1
|
||||||
vim.g.loaded_netrwPlugin = 1
|
vim.g.loaded_netrwPlugin = 1
|
||||||
|
|
||||||
-- python interpreter
|
-- python interpreter
|
||||||
vim.g.python3_host_prog = './env/bin/python'
|
vim.g.python3_host_prog = '/usr/bin/python3'
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ packages:
|
||||||
- git
|
- git
|
||||||
- vim
|
- vim
|
||||||
- neovim
|
- neovim
|
||||||
|
- python-pynvim
|
||||||
- wl-clipboard
|
- wl-clipboard
|
||||||
- npm
|
- npm
|
||||||
- docker
|
- docker
|
||||||
|
|
@ -37,8 +38,6 @@ aur_build_dir: '/usr/local/src'
|
||||||
python_build_dir: '/usr/local/src'
|
python_build_dir: '/usr/local/src'
|
||||||
python_install_dir: '/opt'
|
python_install_dir: '/opt'
|
||||||
|
|
||||||
# Note that the "python-lsp-server" and "neovim" python
|
|
||||||
# packages should be installed to the corresponding virtualenv as well.
|
|
||||||
language_servers:
|
language_servers:
|
||||||
- {
|
- {
|
||||||
package: ansible-language-server,
|
package: ansible-language-server,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue