Compare commits
4 Commits
c7333aa79a
...
c21c9096c9
Author | SHA1 | Date | |
---|---|---|---|
c21c9096c9 | |||
6b23fdf858 | |||
1fe23703f4 | |||
20b9e02adb |
@ -48,6 +48,7 @@ https://www.youtube.com/feeds/videos.xml?channel_id=UCjHh3N6jUJKdrtTqNorpRhg "Sk
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCdtrhMQTlTWNLGcmx1Qy80Q "Ski" "Fabien Maierhofer"
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UChkpEJqHjX-tGmYoGf8jdGA "Escalade" "EpicTV Relais Vertical"
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCJlvyoYGLr3UIV0oD4-aarA "Sports" "Riding zone"
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCy0I5Hcl2k7dN4UdZTedfeQ "Sports" "Hit the road"
|
||||
|
||||
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCgkhWgBGRp0sdFy2MHDWfSg "Math" "El Ji"
|
||||
|
@ -1,13 +1,13 @@
|
||||
local has_words_before = function()
|
||||
if vim.api.nvim_buf_get_option(0, "buftype") == "prompt" then
|
||||
return false
|
||||
end
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
if vim.api.nvim_buf_get_option(0, "buftype") == "prompt" then
|
||||
return false
|
||||
end
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
end
|
||||
|
||||
local feedkey = function(key, mode)
|
||||
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true), mode, true)
|
||||
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true), mode, true)
|
||||
end
|
||||
|
||||
local lsp_symbols = {
|
||||
@ -41,9 +41,9 @@ local lsp_symbols = {
|
||||
local status, cmp = pcall(require, "cmp")
|
||||
if (not status) then return end
|
||||
|
||||
cmp.setup{
|
||||
cmp.setup {
|
||||
completion = {
|
||||
completeopt = 'menuone,noinsert,noselect',
|
||||
completeopt = 'menuone,noinsert,noselect',
|
||||
},
|
||||
formatting = {
|
||||
format = function(entry, vim_item)
|
||||
@ -66,7 +66,7 @@ cmp.setup{
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
["<cr>"] = cmp.mapping.confirm({select = false, behavior = cmp.ConfirmBehavior.Replace}),
|
||||
["<cr>"] = cmp.mapping.confirm({ select = false, behavior = cmp.ConfirmBehavior.Replace }),
|
||||
-- ["<Tab>"] = cmp.mapping.confirm({select = true, behavior = cmp.ConfirmBehavior.Insert}),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
@ -92,9 +92,9 @@ cmp.setup{
|
||||
{ name = 'vsnip' },
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'path' },
|
||||
{
|
||||
name = 'buffer',
|
||||
keyword_length = 4,
|
||||
{
|
||||
name = 'buffer',
|
||||
keyword_length = 4,
|
||||
keyword_pattern = [[\d\@!\k\k*]],
|
||||
options = {
|
||||
-- keyword_pattern = [[\k\+]]-- for non ascii caracters
|
||||
@ -123,8 +123,7 @@ cmp.setup.cmdline('/', {
|
||||
cmp.setup.cmdline(':', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' }
|
||||
}, {
|
||||
{ name = 'path' },
|
||||
{ name = 'cmdline' }
|
||||
})
|
||||
})
|
||||
|
@ -3,6 +3,14 @@ if not null_ls_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local mason_null_ls_status_ok, mason_null_ls = pcall(require, "mason-null-ls")
|
||||
if not null_ls_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
require("mason-null-ls").setup({
|
||||
})
|
||||
|
||||
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting
|
||||
local formatting = null_ls.builtins.formatting
|
||||
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
|
||||
@ -18,6 +26,3 @@ null_ls.setup {
|
||||
diagnostics.yamllint,
|
||||
},
|
||||
}
|
||||
|
||||
local map = vim.api.nvim_set_keymap
|
||||
map('n', '<leader>f', '<cmd>lua vim.lsp.buf.formatting_sync()<cr>', {})
|
||||
|
@ -3,7 +3,7 @@ if (not status) then return end
|
||||
|
||||
ts.setup {
|
||||
-- One of "all", "maintained" (parsers with maintainers), or a list of languages
|
||||
ensure_installed = {"python", "css", "html", "lua", "javascript", "vue", "c", "markdown", "rst"},
|
||||
ensure_installed = {"python", "css", "html", "lua", "javascript", "vue", "c", "markdown", "rst", "cpp"},
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
|
@ -1,20 +1,5 @@
|
||||
local lsp_installer = require("nvim-lsp-installer")
|
||||
|
||||
-- Register a handler that will be called for each installed server when it's ready (i.e. when installation is finished
|
||||
-- or if the server is already installed).
|
||||
lsp_installer.on_server_ready(function(server)
|
||||
local opts = {}
|
||||
|
||||
-- (optional) Customize the options passed to the server
|
||||
-- if server.name == "tsserver" then
|
||||
-- opts.root_dir = function() ... end
|
||||
-- end
|
||||
|
||||
-- This setup() function will take the provided server configuration and decorate it with the necessary properties
|
||||
-- before passing it onwards to lspconfig.
|
||||
-- Refer to https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
||||
server:setup(opts)
|
||||
end)
|
||||
require("mason").setup()
|
||||
require("mason-lspconfig").setup()
|
||||
|
||||
local nvim_lsp = require('lspconfig')
|
||||
-- Use an on_attach function to only map the following keys
|
||||
@ -46,7 +31,7 @@ local on_attach = function(client, bufnr)
|
||||
buf_set_keymap('n', '<leader>dp', '<cmd>lua vim.diagnostic.goto_next()<CR>', opts)
|
||||
-- Get diagnostic on local list
|
||||
buf_set_keymap('n', '<leader>q', '<cmd>lua vim.diagnostic.setloclist()<CR>', opts)
|
||||
buf_set_keymap("n", "<leader>f", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
|
||||
buf_set_keymap("n", "<leader>f", "<cmd>lua vim.lsp.buf.format()<CR>", opts)
|
||||
|
||||
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)
|
||||
@ -81,3 +66,11 @@ nvim_lsp.vuels.setup{
|
||||
client.resolved_capabilities.document_formatting = true
|
||||
end;
|
||||
}
|
||||
|
||||
nvim_lsp.ltex.setup{
|
||||
settings = {
|
||||
ltex = {
|
||||
language = "fr",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -60,10 +60,11 @@ return packer.startup(function(use)
|
||||
use 'tpope/vim-repeat'
|
||||
|
||||
use {
|
||||
"williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
'neovim/nvim-lspconfig',
|
||||
requires = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
'williamboman/nvim-lsp-installer',
|
||||
}
|
||||
}
|
||||
use {
|
||||
@ -85,7 +86,10 @@ return packer.startup(function(use)
|
||||
-- for formatters and linters
|
||||
use {
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
config = [[require('config.null-ls')]]
|
||||
config = [[require('config.null-ls')]],
|
||||
requires = {
|
||||
"jayp0521/mason-null-ls.nvim"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -97,7 +101,9 @@ return packer.startup(function(use)
|
||||
}
|
||||
|
||||
use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }
|
||||
use { "nvim-telescope/telescope-file-browser.nvim" }
|
||||
use {
|
||||
"nvim-telescope/telescope-file-browser.nvim"
|
||||
}
|
||||
|
||||
use {
|
||||
'lervag/vimtex',
|
||||
|
@ -234,6 +234,8 @@ fileviewer *.[1-8] man ./%c | col -b
|
||||
|
||||
" Images
|
||||
filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
|
||||
\ {View in feh}
|
||||
\ feh %f,
|
||||
\ {View in sxiv}
|
||||
\ sxiv %f,
|
||||
\ {View in gpicview}
|
||||
|
Loading…
Reference in New Issue
Block a user