first solid config. Can still be improved
This commit is contained in:
parent
cd41c0b2e4
commit
31de117293
@ -1,4 +1,8 @@
|
|||||||
# kickstart.nvim
|
# kickstart.nvim - CrawDad Fork
|
||||||
|
|
||||||
|
still working on some lsp issues on local machine
|
||||||
|
|
||||||
|
Check 'myChanges.md' and 'myWinDeps.md' for changes and required dependencies for my changes.
|
||||||
|
|
||||||
### Introduction
|
### Introduction
|
||||||
|
|
||||||
|
4
ftplugin/fsharp.lua
Normal file
4
ftplugin/fsharp.lua
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
-- previous binding
|
||||||
|
-- runs selected code in FSI, exit fsi with "i<cr>" after done scrolling/viewing
|
||||||
|
vim.keymap.set('v', '<A-CR>', 'y:new<CR>:term<CR>idotnet fsi <CR><C-\\><C-n>pGA;;<CR>#quit;;<CR>exit<CR><C-\\><C-n>G')
|
44
init.lua
44
init.lua
@ -90,6 +90,7 @@ require('lazy').setup({
|
|||||||
-- Automatically install LSPs to stdpath for neovim
|
-- Automatically install LSPs to stdpath for neovim
|
||||||
'williamboman/mason.nvim',
|
'williamboman/mason.nvim',
|
||||||
'williamboman/mason-lspconfig.nvim',
|
'williamboman/mason-lspconfig.nvim',
|
||||||
|
'RishabhRD/nvim-lsputils',
|
||||||
|
|
||||||
-- Useful status updates for LSP
|
-- Useful status updates for LSP
|
||||||
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
|
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
|
||||||
@ -107,6 +108,8 @@ require('lazy').setup({
|
|||||||
|
|
||||||
-- Useful plugin to show you pending keybinds.
|
-- Useful plugin to show you pending keybinds.
|
||||||
{ 'folke/which-key.nvim', opts = {} },
|
{ 'folke/which-key.nvim', opts = {} },
|
||||||
|
{ 'folke/trouble.nvim', opts = {} },
|
||||||
|
'nvim-tree/nvim-web-devicons',
|
||||||
{ -- Adds git releated signs to the gutter, as well as utilities for managing changes
|
{ -- Adds git releated signs to the gutter, as well as utilities for managing changes
|
||||||
'lewis6991/gitsigns.nvim',
|
'lewis6991/gitsigns.nvim',
|
||||||
opts = {
|
opts = {
|
||||||
@ -204,6 +207,8 @@ require('lazy').setup({
|
|||||||
-- [[ Setting options ]]
|
-- [[ Setting options ]]
|
||||||
-- See `:help vim.o`
|
-- See `:help vim.o`
|
||||||
|
|
||||||
|
-- uses spaces for indentation
|
||||||
|
vim.o.inde = " "
|
||||||
-- Set highlight on search
|
-- Set highlight on search
|
||||||
vim.o.hlsearch = false
|
vim.o.hlsearch = false
|
||||||
|
|
||||||
@ -249,6 +254,10 @@ vim.o.termguicolors = true
|
|||||||
-- normal mode
|
-- normal mode
|
||||||
-- **filepath stuff**
|
-- **filepath stuff**
|
||||||
vim.keymap.set('n', 'gf', ':vert winc f<cr>')
|
vim.keymap.set('n', 'gf', ':vert winc f<cr>')
|
||||||
|
|
||||||
|
-- this line does 2 things at once!
|
||||||
|
-- copies curent path to register: f, path + file to register: F
|
||||||
|
vim.keymap.set('n', 'yf', ':let @f = expand("%:p") |:let @F = expand("%:p:h")<CR>')
|
||||||
-- moves split panes
|
-- moves split panes
|
||||||
vim.keymap.set('n', '<A-h>', '<C-W>H')
|
vim.keymap.set('n', '<A-h>', '<C-W>H')
|
||||||
vim.keymap.set('n', '<A-j>', '<C-W>J')
|
vim.keymap.set('n', '<A-j>', '<C-W>J')
|
||||||
@ -259,6 +268,9 @@ vim.keymap.set('n', '<C-h>', '<C-w>h')
|
|||||||
vim.keymap.set('n', '<C-j>', '<C-w>j')
|
vim.keymap.set('n', '<C-j>', '<C-w>j')
|
||||||
vim.keymap.set('n', '<C-k>', '<C-w>k')
|
vim.keymap.set('n', '<C-k>', '<C-w>k')
|
||||||
vim.keymap.set('n', '<C-l>', '<C-w>l')
|
vim.keymap.set('n', '<C-l>', '<C-w>l')
|
||||||
|
-- insert line break left of cursor
|
||||||
|
vim.keymap.set('n', 'K', 'i<cr><Esc>^')
|
||||||
|
|
||||||
-- insert mode
|
-- insert mode
|
||||||
-- these 2 shift current line in insert mode
|
-- these 2 shift current line in insert mode
|
||||||
vim.keymap.set('i', '<A-j>', '<Esc>:m .+1<CR>==gi')
|
vim.keymap.set('i', '<A-j>', '<Esc>:m .+1<CR>==gi')
|
||||||
@ -267,6 +279,11 @@ vim.keymap.set('i', '<A-k>', '<Esc>:m .-2<CR>==gi')
|
|||||||
-- these 2 exit insert mode easily
|
-- these 2 exit insert mode easily
|
||||||
vim.keymap.set('i', 'JJ', '<Esc>')
|
vim.keymap.set('i', 'JJ', '<Esc>')
|
||||||
vim.keymap.set('i', 'jk', '<Esc>')
|
vim.keymap.set('i', 'jk', '<Esc>')
|
||||||
|
-- remove comment on line
|
||||||
|
vim.keymap.set('i', '<C-/>', '<C-o>gcc')
|
||||||
|
-- Terminal mode
|
||||||
|
-- easier normal mode
|
||||||
|
vim.keymap.set('t', 'JJ', "<C-\\><C-n>")
|
||||||
|
|
||||||
-- Keymaps for better default experience
|
-- Keymaps for better default experience
|
||||||
-- See `:help vim.keymap.set()`
|
-- See `:help vim.keymap.set()`
|
||||||
@ -327,7 +344,7 @@ require('nvim-treesitter.configs').setup {
|
|||||||
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'help', 'vim' },
|
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'help', 'vim' },
|
||||||
|
|
||||||
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
||||||
auto_install = false,
|
auto_install = true,
|
||||||
|
|
||||||
highlight = { enable = true },
|
highlight = { enable = true },
|
||||||
indent = { enable = true, disable = { 'python' } },
|
indent = { enable = true, disable = { 'python' } },
|
||||||
@ -420,8 +437,8 @@ local on_attach = function(_, bufnr)
|
|||||||
nmap('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
|
nmap('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
|
||||||
|
|
||||||
-- See `:help K` for why this keymap
|
-- See `:help K` for why this keymap
|
||||||
nmap('K', vim.lsp.buf.hover, 'Hover Documentation')
|
nmap('gh', vim.lsp.buf.hover, 'Hover Documentation')
|
||||||
nmap('<C-k>', vim.lsp.buf.signature_help, 'Signature Documentation')
|
nmap('gH', vim.lsp.buf.signature_help, 'Signature Documentation')
|
||||||
|
|
||||||
-- Lesser used LSP functionality
|
-- Lesser used LSP functionality
|
||||||
nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
||||||
@ -443,11 +460,12 @@ end
|
|||||||
-- Add any additional override configuration in the following tables. They will be passed to
|
-- Add any additional override configuration in the following tables. They will be passed to
|
||||||
-- the `settings` field of the server config. You must look up that documentation yourself.
|
-- the `settings` field of the server config. You must look up that documentation yourself.
|
||||||
local servers = {
|
local servers = {
|
||||||
-- clangd = {},
|
clangd = {},
|
||||||
-- gopls = {},
|
pyright = {},
|
||||||
-- pyright = {},
|
rust_analyzer = {},
|
||||||
-- rust_analyzer = {},
|
tsserver = {},
|
||||||
-- tsserver = {},
|
fsautocomplete = {},
|
||||||
|
jdtls = {},
|
||||||
|
|
||||||
lua_ls = {
|
lua_ls = {
|
||||||
Lua = {
|
Lua = {
|
||||||
@ -529,5 +547,15 @@ cmp.setup {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
--GUI settings
|
||||||
|
--NeoVide
|
||||||
|
if vim.g.neovide then
|
||||||
|
--do stuff for neovide Only
|
||||||
|
vim.g.neovide_cursor_animation_length = 0.35
|
||||||
|
vim.g.neovide_cursor_trail_size = 0.2
|
||||||
|
vim.g.neovide_cursor_vfx_mode = 'railgun'
|
||||||
|
vim.g.neovide_cursor_vfx_particle_lifetime = 1.2
|
||||||
|
vim.opt.guifont = { "Hack NF", "h16" }
|
||||||
|
end
|
||||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||||
-- vim: ts=2 sts=2 sw=2 et
|
-- vim: ts=2 sts=2 sw=2 et
|
||||||
|
45
myChanges.md
Normal file
45
myChanges.md
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# Changes made to base nvim-Kickstart
|
||||||
|
## working LSP
|
||||||
|
### ez
|
||||||
|
- python
|
||||||
|
### needs project file
|
||||||
|
- c++ (kind of picky, single file mode doesn't work well)
|
||||||
|
- F# (kind of picky, single file mode doesn't work well)
|
||||||
|
- rust 🦀 (.rsx files seem to work in single file mode)
|
||||||
|
|
||||||
|
## Settings
|
||||||
|
### nvim general settings
|
||||||
|
- set indents as 4 'space' characters
|
||||||
|
### nvim gui settings
|
||||||
|
- neovide gui
|
||||||
|
- added cursor trail config
|
||||||
|
- set font to NerdFonts / Hack h16
|
||||||
|
### Language server settings
|
||||||
|
- added server inits for:
|
||||||
|
- clangd
|
||||||
|
- pyright
|
||||||
|
- rust_analyzer
|
||||||
|
- tsserver
|
||||||
|
- fsautocomplete
|
||||||
|
- jdtls
|
||||||
|
## Plugins
|
||||||
|
- 'RishabhRD/nvim-lsputils' added for better lsp default settings
|
||||||
|
- 'folke/trouble.nvim' to view error messages at bottom
|
||||||
|
- 'nvim-tree/nvim-web-devicons' for icon support in trouble
|
||||||
|
### Misc
|
||||||
|
- set 'treesitter :: auto_install = true. should auto install grammars
|
||||||
|
- telescope fzf converted to use windows ripgrep
|
||||||
|
|
||||||
|
## Mappings
|
||||||
|
### Normal Mode
|
||||||
|
- 'yf' copies path to current file to register f and F
|
||||||
|
- 'K' inserts a line break left of cursor and places cursor on first non white-space character
|
||||||
|
- 'gh' for lsp hover docs
|
||||||
|
- 'gH' for lsp signature docs
|
||||||
|
### Insert Mode
|
||||||
|
- 'JJ' easily exits insert mode (even in terminal mode)
|
||||||
|
## FileType Scripts
|
||||||
|
### F#
|
||||||
|
- visual mode (selection)
|
||||||
|
- added <alt-return> binding to run selected code in FSI, similar to visual studio
|
||||||
|
|
39
myWinDeps.md
Normal file
39
myWinDeps.md
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# My Windows Dependencies
|
||||||
|
|
||||||
|
# Packages
|
||||||
|
I believe thse are the install commands used, many sub-packages also installed automatically
|
||||||
|
|
||||||
|
- neovim
|
||||||
|
- neovide.install
|
||||||
|
- lua
|
||||||
|
- nodejs.install
|
||||||
|
- ripgrep
|
||||||
|
- rust
|
||||||
|
- rustup.install
|
||||||
|
- FiraCode
|
||||||
|
- nerd-fonts-Hack
|
||||||
|
|
||||||
|
# Complete List
|
||||||
|
|
||||||
|
May have missed some dependencies, but this is a complete list of 'chocolatey' package manager installations used to make LSP work properly.
|
||||||
|
|
||||||
|
FiraCode 6.2
|
||||||
|
KB2919355 1.0.20160915
|
||||||
|
KB2919442 1.0.20160915
|
||||||
|
KB2999226 1.0.20181019
|
||||||
|
KB3033929 1.0.5
|
||||||
|
KB3035131 1.0.3
|
||||||
|
lua 5.1.5.52
|
||||||
|
neovide 0.10.3
|
||||||
|
neovide.install 0.10.3
|
||||||
|
neovim 0.8.3
|
||||||
|
nerd-fonts-Hack 2.3.3
|
||||||
|
nodejs 19.6.0
|
||||||
|
nodejs.install 19.6.0
|
||||||
|
ripgrep 13.0.0.20220913
|
||||||
|
rust 1.67.1
|
||||||
|
rustup.install 1.25.1
|
||||||
|
vcredist140 14.34.31938
|
||||||
|
vcredist2005 8.0.50727.619501
|
||||||
|
vcredist2015 14.0.24215.20170201
|
||||||
|
vim 9.0.1221
|
Loading…
x
Reference in New Issue
Block a user