···11+-- configure firenvim for the browser
22+if vim.g.started_by_firenvim then
33+ vim.cmd("source $HOME/.config/nvim/plugin/firenvim.vim")
44+end
55+
+16-11
nvim/after/plugin/lsp.lua
···55lsp.ensure_installed({
66 'eslint',
77 'rust_analyzer',
88+ 'sumneko_lua',
89})
9101111+-- Fix Undefined global 'vim'
1212+lsp.configure('sumneko_lua', {
1313+ settings = {
1414+ Lua = {
1515+ diagnostics = {
1616+ globals = { 'vim' }
1717+ }
1818+ }
1919+ }
2020+})
10211122local cmp = require('cmp')
1223local cmp_select = {behavior = cmp.SelectBehavior.Select}
···4556 virtual_text = true,
4657})
47585959+4860lsp.on_attach(function(client, bufnr)
4961 local opts = {buffer = bufnr, remap = false}
5062···6577 vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts)
6678 vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
67798080+ -- turn on grammarly language server only for filetype=markdown
8181+ if client.name == "grammarly" then
8282+ vim.api.nvim_buf_set_option(bufnr, "filetype", "markdown")
8383+ end
6884end)
69857086lsp.setup()
718772887373---lua
7474-require'lspconfig'.sumneko_lua.setup {
7575- settings = {
7676- Lua = {
7777- diagnostics = {
7878- -- Get the language server to recognize the `vim` global
7979- globals = {'vim'},
8080- },
8181- },
8282- },
8383-}
-6
nvim/lua/old_config.vim
···97979898"ranger nvim
9999" nnoremap <leader>e :RnvimrToggl<CR>
100100-nnoremap <leader>e :Explore<CR>
101100102101"
103102" Replace `$EDITOR` candidate with this command to open the selected file
···129128let w:surround_{char2nr('w')} = "```\r```"
130129let b:surround_{char2nr('b')} = "**\r**"
131130132132-133133-" configure firenvim for the browser
134134-if exists("g:started_by_firenvim")
135135- source $HOME/.config/nvim/plugin/firenvim.vim
136136-endif
137131138132139133
···11--general
22-local map = vim.api.nvim_set_keymap
33-vim.keymap.set("n", "<leader>e", ":Explore<CR>") --netrw file explorer
22+vim.keymap.set("n", "<leader>e", ":Explore<CR>")
435465-- s-shortcuts is for search -> without leader, directly with s
77-vim.keymap.set('n','sb', ':Buffers<CR>')
66+vim.keymap.set('n', 'sb', ':Buffers<CR>')
87vim.keymap.set('n', 's/', ':History/<CR>')
98vim.keymap.set('n', 's;', ':Commands<CR>')
109vim.keymap.set('n', 'sa', ':Ag<CR>')
···5958vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
60596160--vim.keymap.set("n", "<Leader>lf", "vim.lsp.buf.format()<CR>")
6161+vim.keymap.set("n", "<Leader>li", ":Mason<CR>")
62626363-- moving blocks with automatically indenting
6464vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
+4
nvim/lua/sspaeti/set.lua
···4343vim.opt.tabstop = 2 -- Insert 2 spaces for a tab
4444vim.opt.shiftwidth = 2 -- Change the number of space characters inserted for indentation
4545vim.opt.softtabstop = 2 --Number of spaces that a <Tab> counts for while performing editing operations, like inserting a <Tab> or using <BS>
4646+4747+--wrap lines for markdown only
4648vim.opt.wrap = false -- Display long lines as just one line
4949+vim.cmd("autocmd FileType markdown setlocal wrap")
5050+4751vim.opt.expandtab = true -- Converts tabs to spaces
4852vim.opt.smarttab = true -- Makes tabbing smarter will realize you have 2 vs 4
4953vim.opt.smartindent = true -- Makes indenting smart