Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
59181b2772
23 changed files with 149 additions and 63 deletions
|
@ -4,6 +4,7 @@ dev_stuffs:
|
|||
- ansible
|
||||
- docker
|
||||
- network
|
||||
- perl
|
||||
- php
|
||||
- python
|
||||
- shell
|
||||
|
|
|
@ -4,9 +4,11 @@ dev_stuffs:
|
|||
- shell
|
||||
- network
|
||||
- ansible
|
||||
- perl
|
||||
- python
|
||||
extensions:
|
||||
- gh
|
||||
x11_screens:
|
||||
- HDMI-1
|
||||
- HDMI-2
|
||||
base16_scheme: solarized-light
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
register: base16_schemes
|
||||
tags:
|
||||
- color
|
||||
- i3
|
||||
|
||||
- name: Configure Alacritty
|
||||
template:
|
||||
|
@ -106,6 +107,7 @@
|
|||
- i3-reload
|
||||
tags:
|
||||
- color
|
||||
- i3
|
||||
when: display_server == 'x11'
|
||||
|
||||
- name: Set base16 theme for rofi
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
ansible
|
||||
ansible-lint
|
||||
ansible-language-server
|
||||
{# EOF #}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
{% if arch_based %}
|
||||
perl-perl-languageserver
|
||||
{% endif %}
|
|
@ -1,5 +1,5 @@
|
|||
Section "Device"
|
||||
Identifier "intel"
|
||||
Identifier "Intel Graphics"
|
||||
Driver "intel"
|
||||
Option "Backlight" "intel_backlight"
|
||||
EndSection
|
||||
|
|
|
@ -39,3 +39,8 @@
|
|||
debug:
|
||||
msg: "The Panfrost display driver configuration was changed, but needs a reboot to be applied."
|
||||
listen: panfrost config changed
|
||||
|
||||
- name: Reload systemd-logind
|
||||
command: systemctl kill -s HUP systemd-logind
|
||||
become: yes
|
||||
listen: systemd-logind config changed
|
||||
|
|
|
@ -356,6 +356,19 @@
|
|||
- etc changed
|
||||
- systemd changed
|
||||
|
||||
- name: Disable power button
|
||||
lineinfile:
|
||||
path: /etc/systemd/logind.conf
|
||||
line: 'HandlePowerKey=ignore'
|
||||
regexp: '^#? *HandlePowerKey='
|
||||
insertafter: '^\[Login\]$'
|
||||
become: yes
|
||||
notify: systemd-logind config changed
|
||||
# Reason: I sometimes press it accidentally
|
||||
# (hoping to start it when it's already started,
|
||||
# or really accidentally on the Pinebook).
|
||||
# Suspend would be nice, but it doesn't have the locker then
|
||||
|
||||
# TODO Hibernation, if that's relevant
|
||||
# $ sudo blkid | grep 'TYPE="swap"'
|
||||
# $ sudoedit /etc/default/grub
|
||||
|
|
|
@ -3,44 +3,49 @@
|
|||
lua << EOF
|
||||
local nvim_lsp = require('lspconfig')
|
||||
|
||||
-- Mappings.
|
||||
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
||||
local opts = { noremap=true, silent=true }
|
||||
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts)
|
||||
vim.keymap.set('n', '[e', vim.diagnostic.goto_prev, opts)
|
||||
vim.keymap.set('n', ']e', vim.diagnostic.goto_next, opts)
|
||||
-- vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
|
||||
|
||||
-- Use an on_attach function to only map the following keys
|
||||
-- after the language server attaches to the current buffer
|
||||
local on_attach = function(client, bufnr)
|
||||
|
||||
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
|
||||
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
|
||||
|
||||
--Enable completion triggered by <c-x><c-o>
|
||||
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
|
||||
-- Mappings.
|
||||
local opts = { noremap=true, silent=true }
|
||||
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
buf_set_keymap('n', 'gD', '<Cmd>lua vim.lsp.buf.declaration()<CR>', opts)
|
||||
-- buf_set_keymap('n', 'gd', '<Cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
||||
buf_set_keymap('n', 'K', '<Cmd>lua vim.lsp.buf.hover()<CR>', opts)
|
||||
buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
|
||||
buf_set_keymap('n', '<C-S-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
|
||||
buf_set_keymap('n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
|
||||
-- buf_set_keymap('n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
|
||||
-- buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
|
||||
buf_set_keymap('n', '[e', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
|
||||
buf_set_keymap('n', ']e', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
|
||||
-- buf_set_keymap('n', '<space>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
|
||||
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
|
||||
buf_set_keymap("v", "<space>f", "<cmd>lua vim.lsp.buf.range_formatting()<CR><Esc>", opts)
|
||||
|
||||
local bufopts = { noremap=true, silent=true, buffer=bufnr }
|
||||
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
|
||||
-- vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
|
||||
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
|
||||
vim.keymap.set('n', '<C-S-k>', vim.lsp.buf.signature_help, bufopts)
|
||||
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, bufopts)
|
||||
vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, bufopts)
|
||||
vim.keymap.set('n', '<space>wl', function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
end, bufopts)
|
||||
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, bufopts)
|
||||
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, bufopts)
|
||||
-- vim.keymap.set('n', '<space>ca', vim.lsp.buf.code_action, bufopts)
|
||||
-- vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
|
||||
vim.keymap.set('n', '<space>f', function() vim.lsp.buf.format { async = true } end, bufopts)
|
||||
end
|
||||
|
||||
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||
-- map buffer local keybindings when the language server attaches
|
||||
local servers = {
|
||||
{% if 'ansible' in dev_stuffs %}
|
||||
"ansiblels",
|
||||
{% endif %}
|
||||
{% if 'perl' in dev_stuffs %}
|
||||
"perlls",
|
||||
{% endif %}
|
||||
{% if 'python' in dev_stuffs %}
|
||||
"pylsp",
|
||||
{% endif %}
|
||||
|
@ -56,7 +61,6 @@ for _, lsp in ipairs(servers) do
|
|||
on_attach = on_attach,
|
||||
flags = {
|
||||
debounce_text_changes = 150,
|
||||
|
||||
}
|
||||
}
|
||||
end
|
||||
|
|
|
@ -23,6 +23,7 @@ vnoremap ga <cmd>Telescope lsp_range_code_actions<cr>
|
|||
noremap ge <cmd>Telescope lsp_document_diagnostics<cr>
|
||||
noremap gE <cmd>Telescope lsp_workspace_diagnostics<cr>
|
||||
noremap gd <cmd>Telescope lsp_definitions<cr>
|
||||
noremap gs <cmd>Telescope lsp_document_symbols<cr>
|
||||
|
||||
lua << EOF
|
||||
require('telescope').setup{
|
||||
|
|
|
@ -5,7 +5,44 @@
|
|||
#}
|
||||
lua <<EOF
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
ensure_installed = "maintained",
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"bibtex",
|
||||
"c",
|
||||
"cmake",
|
||||
"comment",
|
||||
"cpp",
|
||||
"css",
|
||||
"diff",
|
||||
"dockerfile",
|
||||
"dot",
|
||||
"git_rebase",
|
||||
"gitattributes",
|
||||
"gitignore",
|
||||
"go",
|
||||
"help",
|
||||
"html",
|
||||
"http",
|
||||
"java",
|
||||
"javascript",
|
||||
"json",
|
||||
"latex",
|
||||
"llvm",
|
||||
"lua",
|
||||
"make",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"perl",
|
||||
"php",
|
||||
"python",
|
||||
"regex",
|
||||
"ruby",
|
||||
"scss",
|
||||
"sql",
|
||||
"verilog",
|
||||
"vim",
|
||||
"yaml",
|
||||
},
|
||||
ignore_install = {},
|
||||
highlight = {
|
||||
enable = true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue