Compare commits
2 Commits
271a18b3a8
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 2b47d7a9cd | |||
| 107a257642 |
4
init.lua
4
init.lua
@@ -6,5 +6,7 @@ require('plugins')
|
|||||||
require('colorscheme')
|
require('colorscheme')
|
||||||
require('lsp')
|
require('lsp')
|
||||||
require('keybindings')
|
require('keybindings')
|
||||||
require('diary')
|
|
||||||
require('layout')
|
require('layout')
|
||||||
|
if vim.loop.os_gethostname() == 'ccflow' then
|
||||||
|
require('diary')
|
||||||
|
end
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
local diary_open = function(opts)
|
local diary_open = function(opts)
|
||||||
local date = opts.args ~= '' and opts.args or os.date('%Y-%m-%d')
|
local date = opts.args ~= '' and opts.args or os.date('%Y-%m-%d')
|
||||||
local year, month = date:match('(%d%d%d%d)-(%d%d)')
|
local year, month = date:match('(%d%d%d%d)-(%d%d)')
|
||||||
local folder = string.format('~/.diary/asciidoc/%s', year)
|
local folder = vim.fs.joinpath(vim.env.HOME, string.format('.diary/asciidoc/%s', year))
|
||||||
vim.fn.mkdir(folder, "p")
|
vim.fn.mkdir(folder, "p")
|
||||||
local file = string.format('%s/diary-%s-%s.adoc', folder, year, month)
|
local file = string.format('%s/diary-%s-%s.adoc', folder, year, month)
|
||||||
print("file is:", file)
|
print("file is:", file)
|
||||||
|
|||||||
@@ -25,22 +25,26 @@ vim.keymap.set('n', '<leader>T', ":Neotree reveal<CR>", { desc = "Neotree Files"
|
|||||||
vim.keymap.set('n', '<leader>F', ":Fyler kind=split_left<CR>", { desc = "Fyler Files" })
|
vim.keymap.set('n', '<leader>F', ":Fyler kind=split_left<CR>", { desc = "Fyler Files" })
|
||||||
|
|
||||||
-- calendar
|
-- calendar
|
||||||
vim.keymap.set('n', '<leader>c', ":Calendar -split=horizontal -position=below -height=12<CR>", { desc = "Show calendar below" })
|
vim.keymap.set('n', '<leader>c', ":Calendar -split=horizontal -position=below -height=12<CR>",
|
||||||
|
{ desc = "Show calendar below" })
|
||||||
vim.keymap.set('n', '<leader>C', ":Calendar -view=year -split=vertical -width=27<CR>", { desc = "Show calendar right" })
|
vim.keymap.set('n', '<leader>C', ":Calendar -view=year -split=vertical -width=27<CR>", { desc = "Show calendar right" })
|
||||||
|
|
||||||
-- Open current file in browser (chromium)
|
-- Open current file in browser (chromium)
|
||||||
vim.keymap.set('n', '<space>o', ":silent !chromium '%'<cr>", { desc = "Open in browser" })
|
vim.keymap.set('n', '<space>o', ":silent !chromium '%'<cr>", { desc = "Open in browser" })
|
||||||
|
|
||||||
-- Open org file folder in neotree
|
if vim.loop.os_gethostname() == 'ccflow' then
|
||||||
vim.keymap.set('n', '<leader>of', ':silent :Neotree dir=/home/saschal/Documents/Eigene\\ (Briefe\\ etc.)/org<cr>', { desc = "Open org folder" })
|
-- Open org file folder in neotree
|
||||||
|
vim.keymap.set('n', '<leader>of', ':silent :Neotree dir=/home/saschal/Documents/Eigene\\ (Briefe\\ etc.)/org<cr>',
|
||||||
|
{ desc = "Open org folder" })
|
||||||
|
end
|
||||||
|
|
||||||
-- toggle colorscheme between dark and light
|
-- toggle colorscheme between dark and light
|
||||||
vim.keymap.set('n', '<leader>m', function()
|
vim.keymap.set('n', '<leader>m', function()
|
||||||
if vim.opt.background:get() == "dark" then
|
if vim.opt.background:get() == "dark" then
|
||||||
vim.o.background = "light"
|
vim.o.background = "light"
|
||||||
else
|
else
|
||||||
vim.o.background = "dark"
|
vim.o.background = "dark"
|
||||||
end
|
end
|
||||||
end, { desc = "Toggle dark/light mode" })
|
end, { desc = "Toggle dark/light mode" })
|
||||||
|
|
||||||
--
|
--
|
||||||
@@ -115,7 +119,7 @@ vim.keymap.set('i', '<M-Down>', "<c-o>:m +1<cr>", { desc = "Move current line do
|
|||||||
------------------------------------------
|
------------------------------------------
|
||||||
vim.keymap.set('n', '<space>q', "gwap", { desc = "Wrap paragraph" })
|
vim.keymap.set('n', '<space>q', "gwap", { desc = "Wrap paragraph" })
|
||||||
vim.keymap.set('n', '<esc><esc>', ":silent! nohls<CR>", { desc = "Clear search" })
|
vim.keymap.set('n', '<esc><esc>', ":silent! nohls<CR>", { desc = "Clear search" })
|
||||||
vim.keymap.set('i', '<c-Del>', '<c-o>dW', {desc = "Delete word right" })
|
vim.keymap.set('i', '<c-Del>', '<c-o>dW', { desc = "Delete word right" })
|
||||||
|
|
||||||
-- horizontally scroll with mouse
|
-- horizontally scroll with mouse
|
||||||
vim.keymap.set('n', '<S-ScrollWheelUp>', 'zh')
|
vim.keymap.set('n', '<S-ScrollWheelUp>', 'zh')
|
||||||
|
|||||||
78
lua/lsp.lua
78
lua/lsp.lua
@@ -66,46 +66,52 @@ function LSPRangeFormatFunction()
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local enable_this_lsp = {}
|
||||||
-- VUE and Typescript as of vue-language-server 3.0.x
|
if vim.loop.os_gethostname() == 'ccflow' then
|
||||||
-- taken from:
|
-- VUE and Typescript as of vue-language-server 3.0.x
|
||||||
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#vtsls
|
-- taken from:
|
||||||
local vue_language_server_path = '/home/saschal/.config/yarn/global/node_modules'
|
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#vtsls
|
||||||
local vue_plugin = {
|
local vue_language_server_path = '/home/saschal/.config/yarn/global/node_modules'
|
||||||
name = '@vue/typescript-plugin',
|
local vue_plugin = {
|
||||||
location = vue_language_server_path,
|
name = '@vue/typescript-plugin',
|
||||||
languages = { 'vue' },
|
location = vue_language_server_path,
|
||||||
configNamespace = 'typescript',
|
languages = { 'vue' },
|
||||||
}
|
configNamespace = 'typescript',
|
||||||
local vtsls_config = {
|
}
|
||||||
settings = {
|
local vtsls_config = {
|
||||||
vtsls = {
|
settings = {
|
||||||
tsserver = {
|
vtsls = {
|
||||||
globalPlugins = {
|
tsserver = {
|
||||||
vue_plugin,
|
globalPlugins = {
|
||||||
|
vue_plugin,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' },
|
||||||
filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' },
|
}
|
||||||
}
|
vim.lsp.config('vtsls', vtsls_config)
|
||||||
vim.lsp.config('vtsls', vtsls_config)
|
|
||||||
|
|
||||||
-- enable this list of lsps
|
-- enable this list of lsps
|
||||||
local enable_this_lsp = {
|
enable_this_lsp = {
|
||||||
'vue_ls',
|
'vue_ls',
|
||||||
'vtsls',
|
'vtsls',
|
||||||
'gopls',
|
'gopls',
|
||||||
'bashls',
|
'bashls',
|
||||||
'html',
|
'html',
|
||||||
'lua_ls',
|
'lua_ls',
|
||||||
'jsonls', -- arch extra: vscode-json-languageserver
|
'jsonls', -- arch extra: vscode-json-languageserver
|
||||||
'kotlin_lsp', -- arch aur: kotlin-lsp-bin
|
'kotlin_lsp', -- arch aur: kotlin-lsp-bin
|
||||||
'lemminx', -- arch aur: lemminx
|
'lemminx', -- arch aur: lemminx
|
||||||
'clangd',
|
'clangd',
|
||||||
'basedpyright',
|
'basedpyright',
|
||||||
'wgsl_analyzer',
|
'wgsl_analyzer',
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
-- any lsp which should be enabled in all situations
|
||||||
|
enable_this_lsp = {
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
for l in pairs(enable_this_lsp) do
|
for l in pairs(enable_this_lsp) do
|
||||||
vim.lsp.enable(enable_this_lsp[l])
|
vim.lsp.enable(enable_this_lsp[l])
|
||||||
|
|||||||
@@ -507,42 +507,43 @@ require("lazy").setup({
|
|||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
{
|
-- 2026-02-18 nice plugin, but still more irritating than helpful
|
||||||
'sphamba/smear-cursor.nvim',
|
-- {
|
||||||
opts = {
|
-- 'sphamba/smear-cursor.nvim',
|
||||||
-- cursor_color = "#ff4000",
|
-- opts = {
|
||||||
cursor_color = "#8b0000",
|
-- -- cursor_color = "#ff4000",
|
||||||
stiffness = 1,
|
-- cursor_color = "#8b0000",
|
||||||
trailing_stiffness = 1,
|
-- stiffness = 1,
|
||||||
trailing_exponent = 0,
|
-- trailing_stiffness = 1,
|
||||||
matrix_pixel_threshold = 1,
|
-- trailing_exponent = 0,
|
||||||
damping = 0.9,
|
-- matrix_pixel_threshold = 1,
|
||||||
gradient_exponent = 0,
|
-- damping = 0.9,
|
||||||
gamma = 1,
|
-- gradient_exponent = 0,
|
||||||
never_draw_over_target = true, -- if you want to actually see under the cursor
|
-- gamma = 1,
|
||||||
hide_target_hack = true, -- same
|
-- never_draw_over_target = true, -- if you want to actually see under the cursor
|
||||||
legacy_computing_symbols_support = true,
|
-- hide_target_hack = true, -- same
|
||||||
|
-- legacy_computing_symbols_support = true,
|
||||||
-- Only smear cursor when moving at least these distances
|
--
|
||||||
-- value of 2 inhibits smear while typing
|
-- -- Only smear cursor when moving at least these distances
|
||||||
min_horizontal_distance_smear = 2,
|
-- -- value of 2 inhibits smear while typing
|
||||||
min_vertical_distance_smear = 2,
|
-- min_horizontal_distance_smear = 2,
|
||||||
|
-- min_vertical_distance_smear = 2,
|
||||||
smear_insert_mode = false,
|
--
|
||||||
|
-- smear_insert_mode = false,
|
||||||
-- particles configuration
|
--
|
||||||
particles_enabled = true,
|
-- -- particles configuration
|
||||||
particle_spread = 1,
|
-- particles_enabled = true,
|
||||||
particles_per_second = 200,
|
-- particle_spread = 1,
|
||||||
particles_per_length = 50,
|
-- particles_per_second = 200,
|
||||||
particle_max_lifetime = 800,
|
-- particles_per_length = 50,
|
||||||
particle_max_initial_velocity = 20,
|
-- particle_max_lifetime = 800,
|
||||||
particle_velocity_from_cursor = 0.5,
|
-- particle_max_initial_velocity = 20,
|
||||||
particle_damping = 0.15,
|
-- particle_velocity_from_cursor = 0.5,
|
||||||
particle_gravity = 50,
|
-- particle_damping = 0.15,
|
||||||
min_distance_emit_particles = 0,
|
-- particle_gravity = 50,
|
||||||
},
|
-- min_distance_emit_particles = 0,
|
||||||
},
|
-- },
|
||||||
|
-- },
|
||||||
|
|
||||||
{
|
{
|
||||||
"A7Lavinraj/fyler.nvim",
|
"A7Lavinraj/fyler.nvim",
|
||||||
|
|||||||
Reference in New Issue
Block a user